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

5 commits

Author SHA1 Message Date
Yuya Nishihara
cec4d6c214 cli: allow multiple diff outputs
"jj log -p --summary" now shows summary and color-words diff, like
"hg log -p --stat".

Handling of "-p" is tricky. I first considered "-p" would turn on the default
diff output, but I found it would be confusing if "jj log -p --git" showed
both color-words and git diffs. So the default format is inserted only if
no --git nor --color-words is explicitly specified.
2022-12-15 11:41:42 +09:00
Danny Hooper
6787e17254 Do not use "..." between diff chunks when it only replaces 1 line of the diff
The number of lines in the diff output is unchanged.

This makes diffs a little more readable when the "..." would otherwise hide a
single line of code that helps in understanding the surrounding context lines.

This change mostly rearranges the loop that consumes the diff lines, so it can
buffer up to num_context_lines*2+1 lines instead of just num_context_lines.
There's a bit of extra code to handle times when a "..." replaces the last line
of a diff.

Note that `jj diff --git` is unchanged, and will still output `@@` lines that
replace a single line of context.
2022-12-09 20:39:40 -06:00
Martin von Zweigbergk
d8feed9be4 copyright: change from "Google LLC" to "The Jujutsu Authors"
Let's acknowledge everyone's contributions by replacing "Google LLC"
in the copyright header by "The Jujutsu Authors". If I understand
correctly, it won't have any legal effect, but maybe it still helps
reduce concerns from contributors (though I haven't heard any
concerns).

Google employees can read about Google's policy at
go/releasing/contributions#copyright.
2022-11-28 06:05:45 -10:00
Yuya Nishihara
c2ce1eedca diff: make sure word diff print final newline
Since whitespace change is barely visible in color-words diff, I think it
would be too verbose to add "\ No newline at end of file" marker. Let's just
append missing newline to make the command output readable.
2022-07-07 23:29:18 +09:00
Martin von Zweigbergk
e7648b6342 tests: add tests for jj diff 2022-04-02 14:22:58 -07:00