diff options
author | Thomas Rast <trast@student.ethz.ch> | 2009-01-06 19:53:32 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-06 23:18:20 -0800 |
commit | e423ffd8a6f46a14ecbb637d909290bd3579cebd (patch) | |
tree | dcb6814de273d92e9577b1ee6e459657b468e7b0 /t | |
parent | format-patch: autonumber by default (diff) | |
download | tgif-e423ffd8a6f46a14ecbb637d909290bd3579cebd.tar.xz |
diff: accept -- when using --no-index
Accept -- as an "end of options" marker even when using --no-index.
Previously, the -- triggered a "normal" index/tree diff and subsequently
failed because of the unrecognized (in that mode) --no-index.
Note that the second loop can treat '--' as a normal option, because
the preceding checks ensure it is the third-to-last argument.
While at it, fix the parsing of "-q" option in --no-index mode as well.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t4013-diff-various.sh | 1 | ||||
-rw-r--r-- | t/t4013/diff.diff_--no-index_--name-status_--_dir2_dir | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index aeb5405cfe..aba53202f8 100755 --- a/t/t4013-diff-various.sh +++ b/t/t4013-diff-various.sh @@ -261,6 +261,7 @@ diff --patch-with-stat -r initial..side diff --patch-with-raw -r initial..side diff --name-status dir2 dir diff --no-index --name-status dir2 dir +diff --no-index --name-status -- dir2 dir diff master master^ side EOF diff --git a/t/t4013/diff.diff_--no-index_--name-status_--_dir2_dir b/t/t4013/diff.diff_--no-index_--name-status_--_dir2_dir new file mode 100644 index 0000000000..6756f8de67 --- /dev/null +++ b/t/t4013/diff.diff_--no-index_--name-status_--_dir2_dir @@ -0,0 +1,3 @@ +$ git diff --no-index --name-status -- dir2 dir +A dir/sub +$ |