Code

git-merge: fix confusion between tag and branch
[git.git] / builtin-blame.c
index 066dee743e9fdd80478395c605d9afc4682600c6..dc3ffeaff82377262f0ae47993cf0883b2552092 100644 (file)
@@ -1435,14 +1435,14 @@ static void find_alignment(struct scoreboard *sb, int *option)
                struct commit_info ci;
                int num;
 
+               if (strcmp(suspect->path, sb->path))
+                       *option |= OUTPUT_SHOW_NAME;
+               num = strlen(suspect->path);
+               if (longest_file < num)
+                       longest_file = num;
                if (!(suspect->commit->object.flags & METAINFO_SHOWN)) {
                        suspect->commit->object.flags |= METAINFO_SHOWN;
                        get_commit_info(suspect->commit, &ci, 1);
-                       if (strcmp(suspect->path, sb->path))
-                               *option |= OUTPUT_SHOW_NAME;
-                       num = strlen(suspect->path);
-                       if (longest_file < num)
-                               longest_file = num;
                        num = strlen(ci.author);
                        if (longest_author < num)
                                longest_author = num;
@@ -1787,6 +1787,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
        /* Now we got rev and path.  We do not want the path pruning
         * but we may want "bottom" processing.
         */
+       argv[unk++] = "--"; /* terminate the rev name */
        argv[unk] = NULL;
 
        init_revisions(&revs, NULL);