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

8 commits

Author SHA1 Message Date
Martin von Zweigbergk
b5378caa81 cli: make jj move/squash/unsquash ask for combined description
In 8ae9540f2c, I made `jj move/squash/unsquash` not abandon the
working copy if it became empty because that would lose any
description associated with it. It turned out that the new behavior
was also confusing because it made it unclear if the working-copy
commit was actually abandoned. Let's roll back that change and instead
ask the user for a combined description when both the source and
destination commits have non-empty descriptions. Not discarding a
non-empty description seems like a good improvement regardless of the
behavior related to working-copy commits. It's also how `hg fold`
behaves (though hg doesn't allow the description to be empty).
2022-08-30 21:41:26 -07:00
Martin von Zweigbergk
478dfd74fc tests: teach fake editor to check that initial text is as expected 2022-08-30 21:41:26 -07:00
Martin von Zweigbergk
6483aeefea cli: respect $VISUAL, overriding $EDITOR
With this patch, the order is this:

`$JJ_EDITOR` environement variable
`ui.editor` config
`$VISUAL` environement variable
`$EDITOR` environement variable
`pico`

That matches git, except that git falls back to an editor determined
at compile time (usually `vi`) instead of using `pico`.
2022-05-10 10:39:59 -07:00
Martin von Zweigbergk
8ef00a3498 tests: re-run with insta crate version b9d99e87065b 2022-04-28 16:55:10 -07:00
Martin von Zweigbergk
d6d2b8b5bc cli: allow overriding ui.editor config by $JJ_EDITOR variable 2022-04-10 09:13:51 -07:00
Martin von Zweigbergk
96d559a4b4 cli: allow overriding $EDITOR variable by ui.editor config 2022-04-10 09:13:51 -07:00
Martin von Zweigbergk
2958f5791c cli: don't crash if $EDITOR fails 2022-04-10 09:13:51 -07:00
Martin von Zweigbergk
f8724ee5a9 tests: add tests for jj describe 2022-04-10 09:13:51 -07:00