diff-tree: don't print multiple headers for merges when silent.
[git.git] / diff-cache.c
index a5deb8c..c604359 100644 (file)
@@ -8,7 +8,7 @@ static int line_termination = '\n';
 static int detect_rename = 0;
 static int reverse_diff = 0;
 static int diff_score_opt = 0;
-static char *pickaxe = 0;
+static const char *pickaxe = NULL;
 
 /* A file entry went away or appeared */
 static void show_file(const char *prefix, struct cache_entry *ce, unsigned char *sha1, unsigned int mode)
@@ -71,7 +71,8 @@ static int show_modified(struct cache_entry *old,
        }
 
        oldmode = old->ce_mode;
-       if (mode == oldmode && !memcmp(sha1, old->sha1, 20))
+       if (mode == oldmode && !memcmp(sha1, old->sha1, 20) &&
+           detect_rename < 2)
                return 0;
 
        mode = ntohl(mode);