Fix up rev-list option parsing.
authorJunio C Hamano <junkio@cox.net>
Sat, 15 Apr 2006 05:43:34 +0000 (22:43 -0700)
committerJunio C Hamano <junkio@cox.net>
Sat, 15 Apr 2006 05:43:34 +0000 (22:43 -0700)
rev-list does not take diff options, so barf after seeing some.

Signed-off-by: Junio C Hamano <junkio@cox.net>
rev-list.c

index 963707a495092405c3eb5b155c195b2968afdac7..0de21810c9fc1af91f6697ade2ab051b343886b9 100644 (file)
@@ -365,8 +365,10 @@ int main(int argc, const char **argv)
 
        list = revs.commits;
 
-       if (!list &&
-           (!(revs.tag_objects||revs.tree_objects||revs.blob_objects) && !revs.pending_objects))
+       if ((!list &&
+            (!(revs.tag_objects||revs.tree_objects||revs.blob_objects) &&
+             !revs.pending_objects)) ||
+           revs.diff)
                usage(rev_list_usage);
 
        save_commit_buffer = verbose_header;