cli: fix: add --summary --stat and --patch/-p to display changes made by the command - #9934
cli: fix: add --summary --stat and --patch/-p to display changes made by the command#9934jlndr wants to merge 4 commits into
--summary --stat and --patch/-p to display changes made by the command#9934Conversation
e805f17 to
e5d734f
Compare
|
Per https://docs.jj-vcs.dev/latest/contributing/#commit-guidelines, each individual commit should be standalone and self-contained.
|
|
And for the topic(s), I think you can use |
b7a89a3 to
22e85b8
Compare
Moved the changelog updates into each commit, mentioned the issues and removed the markdown tag :) PTAL if I missed something |
--summary --stat and --patch/-p to fix to display changes made by the command--summary --stat and --patch/-p to display changes made by the command
|
LGTM, but needs maintainer approval. |
|
Appreciate the review! @josephlou5 |
|
just my two cents but shouldn't a output template fix all of these issues at once? Otherwise people will expect similar flags for |
Not necessarily. I assume a template for |
|
Maybe I'm misunderstanding the concern but other commands have both capabilities AFAIK, e.g. I don't know if the same flags would be suitable for No strong opinions really, keeping just a template for now would also be fine with me |
| * honglooker | ||
| * hooper | ||
| * incognito124 | ||
| * jlinder |
There was a problem hiding this comment.
This should be your GitHub account name, not your Google account.
…mmit. This adds `--summary` flag to `fix` command to show modified files per commit. Note: we can't use the shortflag `-s` since it's already used by `--source`. Issue jj-vcs#9715. Example: ``` $ jj fix --summary -s vyxlzqxr::mopmyzxr Fixed 3 commits of 3 checked. mopmyzxr 3e0efd9b another comment to fix M cli/tests/test_fix_command.rs vyxlzqxr 4f66ccc2 test fix M cli/src/commands/fix.rs Working copy (@) now at: vnozyxkm 34ecd51c (empty) (no description set) Parent commit (@-) : mopmyzxr 3e0efd9b another comment to fix Added 0 files, modified 2 files, removed 0 files ```
… commit. This adds `--stat` flag to `fix` command to show histogram of changes per commit. Issue jj-vcs#9715 Example: ``` $ jj fix --stat -s vyxlzqxr::mopmyzxr Fixed 3 commits of 3 checked. mopmyzxr 8315f1d4 another comment to fix cli/tests/test_fix_command.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) vyxlzqxr 8b92fb74 test fix cli/src/commands/fix.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Working copy (@) now at: vnozyxkm f4970928 (empty) (no description set) Parent commit (@-) : mopmyzxr 8315f1d4 another comment to fix Added 0 files, modified 2 files, removed 0 files ```
… commit. This adds `-p`/`--patch` flag to `fix` command to show patch of changes per commit. Fixes jj-vcs#9715. Example: ``` $ jj --config ui.diff.format=git fix -p -s vyxlzqxr::mopmyzxr Fixed 3 commits of 3 checked. mopmyzxr bc7260bf another comment to fix diff --git a/cli/tests/test_fix_command.rs b/cli/tests/test_fix_command.rs index 5636280845..74e5fe7feb 100644 --- a/cli/tests/test_fix_command.rs +++ b/cli/tests/test_fix_command.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -fn unformatted_test_fn_2( name: &str , count: u32 ) -> String { - let s = format!( "{name}_{count}" ); +fn unformatted_test_fn_2(name: &str, count: u32) -> String { + let s = format!("{name}_{count}"); s } vyxlzqxr 50f927a4 test fix diff --git a/cli/src/commands/fix.rs b/cli/src/commands/fix.rs index 4f6ba84f1e..a1dd971a8c 100644 --- a/cli/src/commands/fix.rs +++ b/cli/src/commands/fix.rs @@ -159,9 +159,9 @@ /// ``` /// The revisions are now all correctly formatted according to the /// configuration. -fn unformatted_test_fn_1( a : usize , b: &str ) -> bool { - let x=1+2; - x==3 +fn unformatted_test_fn_1(a: usize, b: &str) -> bool { + let x = 1 + 2; + x == 3 } #[derive(clap::Args, Clone, Debug)] ```
Enable feedback for
jj fix, issue #9715Checklist
If applicable:
CHANGELOG.mdREADME.md,docs/,demos/)cli/src/config-schema.json)how it works, how it's organized), including any code drafted by an LLM.
an eye towards deleting anything that is irrelevant, clarifying anything
that is confusing, and adding details that are relevant. This includes,
for example, commit descriptions, PR descriptions, and code comments.
jj fix -pwith native formater: