Code

Merge branch 'maint'
authorShawn O. Pearce <spearce@spearce.org>
Mon, 6 Oct 2008 15:56:07 +0000 (08:56 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Mon, 6 Oct 2008 15:56:07 +0000 (08:56 -0700)
* maint:
  Update release notes for 1.6.0.3
  Teach rebase -i to honor pre-rebase hook
  docs: describe pre-rebase hook
  do not segfault if make_cache_entry failed
  make prefix_path() never return NULL
  fix bogus "diff --git" header from "diff --no-index"
  Fix fetch/clone --quiet when stdout is connected
  builtin-blame: Fix blame -C -C with submodules.
  bash: remove fetch, push, pull dashed form leftovers

Conflicts:
diff.c

1  2 
builtin-blame.c
contrib/completion/git-completion.bash
diff.c
t/t4012-diff-binary.sh
transport.c

diff --cc builtin-blame.c
Simple merge
diff --cc diff.c
index 4e4e439e03f13a2bd9aaf63179ce50e4b72ed48e,f91f256c56e5e4be0b3f162695e1d35e63124569..02e948c9dd6244a0003c2c6bc81f55e46cf0ad2b
--- 1/diff.c
--- 2/diff.c
+++ b/diff.c
@@@ -1498,19 -1464,13 +1498,23 @@@ static void builtin_diff(const char *na
        char *a_one, *b_two;
        const char *set = diff_get_color_opt(o, DIFF_METAINFO);
        const char *reset = diff_get_color_opt(o, DIFF_RESET);
 +      const char *a_prefix, *b_prefix;
 +
 +      diff_set_mnemonic_prefix(o, "a/", "b/");
 +      if (DIFF_OPT_TST(o, REVERSE_DIFF)) {
 +              a_prefix = o->b_prefix;
 +              b_prefix = o->a_prefix;
 +      } else {
 +              a_prefix = o->a_prefix;
 +              b_prefix = o->b_prefix;
 +      }
  
 -      a_one = quote_two(o->a_prefix, name_a + (*name_a == '/'));
 -      b_two = quote_two(o->b_prefix, name_b + (*name_b == '/'));
+       /* Never use a non-valid filename anywhere if at all possible */
+       name_a = DIFF_FILE_VALID(one) ? name_a : name_b;
+       name_b = DIFF_FILE_VALID(two) ? name_b : name_a;
 +      a_one = quote_two(a_prefix, name_a + (*name_a == '/'));
 +      b_two = quote_two(b_prefix, name_b + (*name_b == '/'));
        lbl[0] = DIFF_FILE_VALID(one) ? a_one : "/dev/null";
        lbl[1] = DIFF_FILE_VALID(two) ? b_two : "/dev/null";
        fprintf(o->file, "%sdiff --git %s %s%s\n", set, a_one, b_two, reset);
Simple merge
diff --cc transport.c
Simple merge