gitweb: Allow PNG, GIF, JPEG images to be displayed in "blob" view
[gitweb.git] / builtin-diff.c
index a6590205e8f746304f3d06d3e328a05bf2bf954e..1c535b1dd620ce40814da41bdddb8638cafeceb4 100644 (file)
@@ -137,7 +137,7 @@ static int builtin_diff_index(struct rev_info *revs,
        int cached = 0;
        while (1 < argc) {
                const char *arg = argv[1];
-               if (!strcmp(arg, "--cached"))
+               if (!strcmp(arg, "--index") || !strcmp(arg, "--cached"))
                        cached = 1;
                else
                        usage(builtin_diff_usage);