Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Sat, 6 Sep 2008 23:47:32 +0000 (16:47 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 6 Sep 2008 23:47:32 +0000 (16:47 -0700)
* 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

1  2 
builtin-blame.c
diff --combined builtin-blame.c
index adc3dc7270afd0dff8763d8c480c8ab98ee25b0d,9bc901c2922403dcf73c8275da73d6d37d220729..6b7b9f4466989ca02d3a5e53caac9ff5c7e8a922
@@@ -38,7 -38,6 +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;
  
@@@ -465,6 -464,7 +464,6 @@@ struct patch 
  };
  
  struct blame_diff_state {
 -      struct xdiff_emit_state xm;
        struct patch *ret;
        unsigned hunk_post_context;
        unsigned hunk_in_pre_context : 1;
@@@ -527,12 -527,15 +526,12 @@@ static struct patch *compare_buffer(mmf
        xpp.flags = xdl_opts;
        memset(&xecfg, 0, sizeof(xecfg));
        xecfg.ctxlen = context;
 -      ecb.outf = xdiff_outf;
 -      ecb.priv = &state;
        memset(&state, 0, sizeof(state));
 -      state.xm.consume = process_u_diff;
        state.ret = xmalloc(sizeof(struct patch));
        state.ret->chunks = NULL;
        state.ret->num = 0;
  
 -      xdi_diff(file_p, file_o, &xpp, &xecfg, &ecb);
 +      xdi_diff_outf(file_p, file_o, process_u_diff, &state, &xpp, &xecfg, &ecb);
  
        if (state.ret->num) {
                struct chunk *chunk;
@@@ -1682,7 -1685,7 +1681,7 @@@ static void emit_other(struct scoreboar
                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 -2316,7 +2312,7 @@@ int cmd_blame(int argc, const char **ar
        };
  
        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);
  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);