]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'maint'
authorJunio C Hamano <junkio@cox.net>
Sat, 24 Feb 2007 09:42:06 +0000 (01:42 -0800)
committerJunio C Hamano <junkio@cox.net>
Sat, 24 Feb 2007 09:42:06 +0000 (01:42 -0800)
* maint:
  diff-patch: Avoid emitting double-slashes in textual patch.
  Reword git-am 3-way fallback failure message.
  Limit filename for format-patch
  core.legacyheaders: Use the description used in RelNotes-1.5.0
  git-show-ref --verify: Fail if called without a reference

Conflicts:

builtin-show-ref.c
diff.c

1  2 
Documentation/config.txt
builtin-log.c
builtin-show-ref.c
diff.c

Simple merge
diff --cc builtin-log.c
Simple merge
index ae0edddac1ad63b849dc341c8dd6519181c1e18e,75211e64f9a850be95de3b85edaafdf0d9a5886a..9463ff0e69b15fc0e544259e64960bc942a98368
@@@ -221,10 -221,12 +221,12 @@@ int cmd_show_ref(int argc, const char *
        }
  
        if (verify) {
-               unsigned char sha1[20];
+               if (!pattern)
+                       die("--verify requires a reference");
                while (*pattern) {
 -                      if (!strncmp(*pattern, "refs/", 5) &&
+                       unsigned char sha1[20];
 +                      if (!prefixcmp(*pattern, "refs/") &&
                            resolve_ref(*pattern, sha1, 1, NULL)) {
                                if (!quiet)
                                        show_one(*pattern, sha1);
diff --cc diff.c
index 5ecb12225560e19142ad5b2936b311a9fce2a16a,b8a90e91a9af75e1e5f5d69ce45c2a59e64071d1..d1eae7214d863d5a87735059d509afcdf60507d7
--- 1/diff.c
--- 2/diff.c
+++ b/diff.c
@@@ -208,20 -204,9 +208,22 @@@ static void copy_file(int prefix, cons
  static void emit_rewrite_diff(const char *name_a,
                              const char *name_b,
                              struct diff_filespec *one,
 -                            struct diff_filespec *two)
 +                            struct diff_filespec *two,
 +                            int color_diff)
  {
        int lc_a, lc_b;
 +      const char *name_a_tab, *name_b_tab;
 +      const char *metainfo = diff_get_color(color_diff, DIFF_METAINFO);
 +      const char *fraginfo = diff_get_color(color_diff, DIFF_FRAGINFO);
 +      const char *old = diff_get_color(color_diff, DIFF_FILE_OLD);
 +      const char *new = diff_get_color(color_diff, DIFF_FILE_NEW);
 +      const char *reset = diff_get_color(color_diff, DIFF_RESET);
 +
++      name_a += (*name_a == '/');
++      name_b += (*name_b == '/');
 +      name_a_tab = strchr(name_a, ' ') ? "\t" : "";
 +      name_b_tab = strchr(name_b, ' ') ? "\t" : "";
 +
        diff_populate_filespec(one, 0);
        diff_populate_filespec(two, 0);
        lc_a = count_lines(one->data, one->size);