]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-blame.c
GIT-VERSION-FILE: check ./version first.
[thirdparty/git.git] / builtin-blame.c
index fb30c49280817b1b4f89608948a889cc65d98bd3..69fc145a38090488e8da4b60a56154fc999b6fe5 100644 (file)
@@ -18,7 +18,7 @@
 #include "cache-tree.h"
 
 static char blame_usage[] =
-"git-blame [-c] [-l] [-t] [-f] [-n] [-p] [-L n,m] [-S <revs-file>] [-M] [-C] [-C] [--contents <filename>] [commit] [--] file\n"
+"git-blame [-c] [-l] [-t] [-f] [-n] [-p] [-L n,m] [-S <revs-file>] [-M] [-C] [-C] [--contents <filename>] [--incremental] [commit] [--] file\n"
 "  -c, --compatibility Use the same output mode as git-annotate (Default: off)\n"
 "  -b                  Show blank SHA-1 for boundary commits (Default: off)\n"
 "  -l, --long          Show long commit SHA1 (Default: off)\n"
@@ -41,6 +41,7 @@ static int max_score_digits;
 static int show_root;
 static int blank_boundary;
 static int incremental;
+static int cmd_is_annotate;
 
 #ifndef DEBUG
 #define DEBUG 0
@@ -1554,12 +1555,12 @@ static void emit_other(struct scoreboard *sb, struct blame_entry *ent, int opt)
                int length = (opt & OUTPUT_LONG_OBJECT_NAME) ? 40 : 8;
 
                if (suspect->commit->object.flags & UNINTERESTING) {
-                       if (!blank_boundary) {
+                       if (blank_boundary)
+                               memset(hex, ' ', length);
+                       else if (!cmd_is_annotate) {
                                length--;
                                putchar('^');
                        }
-                       else
-                               memset(hex, ' ', length);
                }
 
                printf("%.*s", length, hex);
@@ -2070,6 +2071,8 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
        const char *bottomtop = NULL;
        const char *contents_from = NULL;
 
+       cmd_is_annotate = !strcmp(argv[0], "annotate");
+
        git_config(git_blame_config);
        save_commit_buffer = 0;