F2AAJYHTJFK567FTQINEZBGRDSOSO3HX7NIZVGZTSOJTQJEGTWBQC
FO6DL4ETPXHILV7DQK54XP6SY4YUPG3NENRMKCDBU65WES6MKCHAC
To clarify about diff in general (not about your changes potocpav), is the intended behavior of --untracked
to show a diff for ONLY the untracked files, or to add the diff for untracked files in addition to the rest of the diffs? The doc comment/help text seems to suggest the latter, but the current behavior is that it will show only the untracked diffs.
Oops, due to a bug in the Nest, I’ve lost these changes before I got a chance to merge them. Would you mind pushing them again to this discussion? Sorry :(
EWZ7VHV4N7QNK7GNG3FC6AQ6XVPH4ADJSUQADM7TZFYAD2AYNNTAC
I re-pushed one of the changes, but I’m not sure it’s too great anymore.
My motivation was: I want to find which files I modified by calling pijul diff --short
. But if my repository contains many files not tracked by Pijul, the results are drowned in the reports of untracked files (“U filename”). This would be solved by not showing these files, unless also the --untracked
flag is present (implemented in the change above).
But still, the interaction of short
and untracked
is pretty weird. Current behavior:
short | untracked | show what
------+-----------+--------------------------------------------
| | diffs of tracked files
yes | | *file names of modified and untracked files
| yes | file names of untracked files
yes | yes | file names of modified and untracked files
patched behavior:
short | untracked | show what
------+-----------+--------------------------------------------
| | diffs of tracked files
yes | | *file names of modified files
| yes | file names of untracked files
yes | yes | file names of modified and untracked files
Difference marked with asterix. But it all seems quite illogical.
Maybe this would be more logical, if we can display “diffs” of untracked files?
command | effect
--------------------------------+---------------------------------------
diff | diffs of modified files
diff --all | diffs of modified and untracked files
diff --untracked | diffs of untracked files
diff --short | names of modified files
diff --short --all | names of modified and untracked files
diff --short --untracked | names of untracked files
I still think your patched behaviour is better than the current one, I’m merging. Thanks!
I’m also closing this discussion. You can either continue pushing after it’s closed if you want to implement --all
, or open another one.
pijul diff --short
didn’t respect the--untracked
flag, so it was not very useful with many untracked files.These changes make it possible to see untracked files using
pijul diff -su
, which is the feature I miss fromgit status
the most.Feel free to reject some of the changes, I won’t be sad :-) Maybe there are reasons to avoid shortening options just now.