From: Junio C Hamano Date: Sat, 24 Feb 2007 09:42:06 +0000 (-0800) Subject: Merge branch 'maint' X-Git-Tag: v1.5.1-rc1~138 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8a13becc0dd4c8876ebf471bf880446c1a10b7e9;p=git.git Merge branch 'maint' * 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 --- 8a13becc0dd4c8876ebf471bf880446c1a10b7e9 diff --cc builtin-show-ref.c index ae0edddac,75211e64f..9463ff0e6 --- a/builtin-show-ref.c +++ b/builtin-show-ref.c @@@ -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) { + unsigned char sha1[20]; + - if (!strncmp(*pattern, "refs/", 5) && + if (!prefixcmp(*pattern, "refs/") && resolve_ref(*pattern, sha1, 1, NULL)) { if (!quiet) show_one(*pattern, sha1); diff --cc diff.c index 5ecb12225,b8a90e91a..d1eae7214 --- a/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);