Code

diff --no-index: make the usage string less scary
authorJonathan Nieder <jrnieder@gmail.com>
Mon, 9 Nov 2009 15:05:04 +0000 (09:05 -0600)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Nov 2009 20:00:21 +0000 (12:00 -0800)
Start the diff --no-index usage string with "usage:" instead of
"fatal:".

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-no-index.c

index 4ebc1dbd87d9b90ad2aaa5c7d4601761e2d1d724..aae8e7accc1ff955bd76c62b379b37f343f61cc4 100644 (file)
@@ -201,8 +201,8 @@ void diff_no_index(struct rev_info *revs,
                        return;
        }
        if (argc != i + 2)
-               die("git diff %s takes two paths",
-                   no_index ? "--no-index" : "[--no-index]");
+               usagef("git diff %s <path> <path>",
+                      no_index ? "--no-index" : "[--no-index]");
 
        diff_setup(&revs->diffopt);
        for (i = 1; i < argc - 2; ) {