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

7 commits

Author SHA1 Message Date
Martin von Zweigbergk
6c6e6cb423 checkout: don't abandon old commit if it has non-empty description
If the user entered a description, we shouldn't abandon it even if it
has no changes to the content.
2022-05-21 22:12:15 -07:00
Martin von Zweigbergk
eedc315821 cli: make jj new always check out the new commit
Before this change, `jj new` would check out the new commit only if it
was created on top of the current commit. I never liked that
special-casing, and after thinking more about how the open/closed
should work (see discussion #321), I think we want `jj new` to behave
similar to how `git/hg checkout` works, so it can effectively replace
the current `jj checkout` command for the use case of starting new
work on top of an existing commit.
2022-05-21 22:12:15 -07:00
Martin von Zweigbergk
0865b1ccff cli: show placeholder text for empty commit message
It can be confusing that some commits (typically the working copy)
don't have a description. Let's show a placeholder text in such cases.

I chose the format to match the "(no email configured)" message we
already have.
2022-05-18 09:16:04 -07:00
Martin von Zweigbergk
bd035004b9 tests: use jj_cmd_success() in one more place 2022-04-14 23:46:28 -07:00
Martin von Zweigbergk
710d51c45b tests: move testutils from src/ to tests/ 2022-04-02 14:22:58 -07:00
Martin von Zweigbergk
a663a5d89c repo: don't abandon empty commit if it has descendants
It's unusual for the current commit to have descendants, but it can
happen. In particular, it can easily happen when you run `jj new`. You
probably don't want to abandon it in those cases.
2022-03-26 21:11:42 -07:00
Martin von Zweigbergk
0ceb4f0dce cli: teach jj new to set initial description with -m
I rarely use `jj new`, so this feature is mostly for use in tests.
2022-03-26 21:11:42 -07:00