author | Thomas Rast <trast@student.ethz.ch> | |
Tue, 6 Jan 2009 18:53:32 +0000 (19:53 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 7 Jan 2009 07:18:20 +0000 (23:18 -0800) | ||
commit | e423ffd8a6f46a14ecbb637d909290bd3579cebd | |
tree | dcb6814de273d92e9577b1ee6e459657b468e7b0 | tree | snapshot |
parent | a567fdcb016e8e882ec0a1e044c9caac8f70e693 | commit | diff |
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>
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>
diff-no-index.c | diff | blob | history | |
t/t4013-diff-various.sh | diff | blob | history | |
t/t4013/diff.diff_--no-index_--name-status_--_dir2_dir | [new file with mode: 0644] | blob |