ok/jj
1
0
Fork 0
forked from mirrors/jj
Commit graph

5 commits

Author SHA1 Message Date
Yuya Nishihara
f8d56e816d cli: print parent commit summary on checkout
On "jj checkout", description of the working-copy commit is empty, and the
working-copy parent provides more information. It might be a bit verbose to
print parent summary on every history rewriting, but I think that's okay.
2023-05-02 15:04:13 +09:00
Martin von Zweigbergk
d6622e5d42 tests: make fake editor scripts initially empty
I would expect `set_up_fake_[diff_]editor()` to create an empty script
but it turns out they didn't even create the files. That means that
the caller needs to write an empty script to them if they want the
fake editors to not do anything. Let's instead write the empty
scripts, for a less surprising behavior.
2023-01-25 21:58:38 -08:00
Ilya Grigoriev
6b064ef54e run_merge_tool, edit_diff: Print command args with -v instead of errors 2023-01-12 23:07:59 -08:00
Yuya Nishihara
6f8fb09609 cli: append "\n" to commit description specified by -m/--message
Otherwise the description set by -m would differ from the one set by editor.
This fixes test_describe() which says "make no changes", but previously "\n"
would be added by the second "jj describe".

As you can see, almost all hashes change in CLI tests. This means in-flight
PRs will need to be rebased to update insta snapshots.

Description text could be normalized by CommitBuilder, but the caller would
have to normalize it beforehand to compare with the current description, so
we would need an explicit function anyway. Another idea is to add a newtype
that represents a normalized description, and make CommitBuilder require it.
Commit::description() will return &Description in place of &str to ensure
that commit.description() == raw_str wouldn't compile.

Git CLI provides --cleanup=<mode> option to switch normalization rules, but
I don't think we'll need such feature.
2022-12-22 14:59:03 +09:00
Ilya Grigoriev
386fdce631 Rename test_touchup_command.rs to test_diffedit_command.rs 2022-12-21 08:15:06 -08:00
Renamed from tests/test_touchup_command.rs (Browse further)