diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-06-18 11:16:56 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-18 11:16:56 -0700 |
commit | 18fd805583130862632e40e98aecc7edcd16d878 (patch) | |
tree | a72e49115b5c03f9291545f44af78394e9765198 /diff.c | |
parent | ecdb3ec9846d06750a0d4b79884a763aa91daa40 (diff) | |
parent | 3e5a188f1d5b48dcc0bc73ad520925cdb846dfaf (diff) | |
download | git-18fd805583130862632e40e98aecc7edcd16d878.tar.gz |
Merge branch 'jh/diff-index-line-abbrev'
* jh/diff-index-line-abbrev:
diff.c: Ensure "index $from..$to" line contains unambiguous SHA1s
Conflicts:
diff.c
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2430,9 +2430,9 @@ static void fill_metainfo(struct strbuf *msg, (!fill_mmfile(&mf, two) && diff_filespec_is_binary(two))) abbrev = 40; } - strbuf_addf(msg, "%sindex %.*s..%.*s", set, - abbrev, sha1_to_hex(one->sha1), - abbrev, sha1_to_hex(two->sha1)); + strbuf_addf(msg, "%sindex %s..", set, + find_unique_abbrev(one->sha1, abbrev)); + strbuf_addstr(msg, find_unique_abbrev(two->sha1, abbrev)); if (one->mode == two->mode) strbuf_addf(msg, " %06o", one->mode); strbuf_addf(msg, "%s\n", reset); |