summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2a68a86)
raw | patch | inline | side by side (parent: 2a68a86)
author | Jonas Fonseca <fonseca@diku.dk> | |
Mon, 6 Jun 2005 21:27:00 +0000 (23:27 +0200) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Wed, 8 Jun 2005 20:03:25 +0000 (13:03 -0700) |
Parse everything after '--' as tree name or pathspec.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff-cache.c | patch | blob | history |
diff --git a/diff-cache.c b/diff-cache.c
index e95fd70da83640d821adb89e97c6fc8b24d649da..1d355aa028f2521e8da5b77d14f35bd26eaaa3e4 100644 (file)
--- a/diff-cache.c
+++ b/diff-cache.c
void *tree;
unsigned long size;
int ret;
+ int allow_options = 1;
int i;
read_cache();
for (i = 1; i < argc; i++) {
const char *arg = argv[i];
- if (*arg != '-') {
+ if (!allow_options || *arg != '-') {
if (tree_name) {
pathspec = argv + i;
break;
continue;
}
+ if (!strcmp(arg, "--")) {
+ allow_options = 0;
+ continue;
+ }
if (!strcmp(arg, "-r")) {
/* We accept the -r flag just to look like git-diff-tree */
continue;