diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-09-06 16:47:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-09-06 16:47:32 -0700 |
commit | 4a09bc966449ca0a7e9a5bb70f91b47debdd7c4e (patch) | |
tree | e5bfb6f6467031660b19a3afeb51cbd732664342 /builtin-blame.c | |
parent | 80d12c23de4fbddfaee2f9bf7fe809f57d02e171 (diff) | |
parent | aaefbfa66c348a461b3081873ef42819c8b38dac (diff) | |
download | git-4a09bc966449ca0a7e9a5bb70f91b47debdd7c4e.tar.gz |
Merge branch 'maint'
* maint:
Update draft release notes for 1.6.0.2
stash: refresh the index before deciding if the work tree is dirty
Mention the fact that 'git annotate' is only for backward compatibility.
"blame -c" should be compatible with "annotate"
git-gui: Fix diff parsing for lines starting with "--" or "++"
git-gui: Fix string escaping in po2msg.sh
git gui: show diffs with a minimum of 1 context line
git-gui: update all remaining translations to French.
git-gui: Update french translation
Diffstat (limited to 'builtin-blame.c')
-rw-r--r-- | builtin-blame.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/builtin-blame.c b/builtin-blame.c index adc3dc7270..6b7b9f4466 100644 --- a/builtin-blame.c +++ b/builtin-blame.c @@ -38,7 +38,6 @@ static int show_root; static int reverse; static int blank_boundary; static int incremental; -static int cmd_is_annotate; static int xdl_opts = XDF_NEED_MINIMAL; static struct string_list mailmap; @@ -1682,7 +1681,7 @@ static void emit_other(struct scoreboard *sb, struct blame_entry *ent, int opt) if (suspect->commit->object.flags & UNINTERESTING) { if (blank_boundary) memset(hex, ' ', length); - else if (!cmd_is_annotate) { + else if (!(opt & OUTPUT_ANNOTATE_COMPAT)) { length--; putchar('^'); } @@ -2313,8 +2312,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix) }; struct parse_opt_ctx_t ctx; - - cmd_is_annotate = !strcmp(argv[0], "annotate"); + int cmd_is_annotate = !strcmp(argv[0], "annotate"); git_config(git_blame_config, NULL); init_revisions(&revs, NULL); @@ -2342,6 +2340,9 @@ int cmd_blame(int argc, const char **argv, const char *prefix) parse_done: argc = parse_options_end(&ctx); + if (cmd_is_annotate) + output_option |= OUTPUT_ANNOTATE_COMPAT; + if (DIFF_OPT_TST(&revs.diffopt, FIND_COPIES_HARDER)) opt |= (PICKAXE_BLAME_COPY | PICKAXE_BLAME_MOVE | PICKAXE_BLAME_COPY_HARDER); |