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

15 commits

Author SHA1 Message Date
Zachary Dremann
062f7a252b cli: Allow repeated -m options for multi-paragraph descriptions
Emulates git's behavior:
https://www.git-scm.com/docs/git-commit#Documentation/git-commit.txt--mltmsggt
2023-08-13 05:06:35 -04:00
Martin von Zweigbergk
00d2d2d4fc cli: indicate empty files in default diff format
Empty files can be confusing in diff output. For example:


```
Added regular file file1:
Added regular file file2:
        1: foo
```

This commit adds an "(empty)" placeholder instead. Since it's not
colored, and doesn't have line numbers, it will hopefully not be
mistaken for a file with the contents "(empty)".
2023-08-13 01:51:43 +00:00
Yuya Nishihara
d57237af5d cli: on "git clone --colocate", set up .git/info/exclude to ignore .jj dir 2023-08-13 06:56:44 +09:00
Yuya Nishihara
8b5ff20874 cli: discard "unborn" default branch before checking out fetched head
AFAIK, we can't make HEAD detached in an empty Git repository, so we need
to temporarily switch to the new default branch before checking out.

Fixes #2047
2023-08-13 06:44:50 +09:00
Ben Saunders
e563d60e64 Update docs and errors to use XDG config path 2023-08-11 13:21:44 -07:00
Yuya Nishihara
4c9c923258 cli: show warning if external diff generator exited with non-zero status 2023-08-11 13:47:13 +09:00
Ilya Grigoriev
6fa8a25839 cli templates: include branches in short commit description
They are shown next to the change and commit id, since they are other names the
commit can be referred by. 

The description is separated from the branches by a ` | ` when there are
branches, so that one can tell the branches from the description without color.

The result looks like this: ![image](https://github.com/martinvonz/jj/assets/4123047/a38aff7b-2b47-49e6-8461-c42e8eb535a4)
2023-08-10 20:58:40 -07:00
Yuya Nishihara
17b45d642f cli: add "--limit N" option to log-like commands
Copied from Mercurial. This isn't a revset predicate since our revset is
conceptually unordered.
2023-08-11 10:40:40 +09:00
Yuya Nishihara
b2101d15c8 cli: detect .git symlink as a colocated workspace
Maybe we could load GitBackend without resolving .git symlink, but that would
introduce more subtle bugs. Instead, we calculate the expected Git workdir path
from the canonical ".git" path.

Fixes #2011
2023-08-10 14:53:54 +09:00
Yuya Nishihara
97b6eb2684 cli: clean up .git directory if "jj git clone --colocate" failed 2023-08-10 07:18:06 +09:00
Yuya Nishihara
6625e91a4b cli: send "Failed to clean up" message to stderr 2023-08-10 07:18:06 +09:00
Yuya Nishihara
d039008db8 cli: add tests for failed "jj git clone"
Perhaps, the message "(os error 39)" isn't portable, but I don't care since
it will be fixed by later patch.
2023-08-10 07:18:06 +09:00
Ilya Grigoriev
a9e5e97025 test_git_push: Test git.push-branch-prefix config 2023-08-07 19:10:10 -07:00
Ilya Grigoriev
add867cfae test_git_push: use -c instead of --change occasionally 2023-08-07 19:10:10 -07:00
Martin von Zweigbergk
0075174308 tests: move tests/ under cli/ so they're run again
Thanks to @ilyagr for noticing that they should be moved.
2023-08-05 06:18:59 +00:00