Skip to content
Snippets Groups Projects
Commit 7cb6ac1e authored by Ann T Ropea's avatar Ann T Ropea Committed by Junio C Hamano
Browse files

diff: diff_aligned_abbrev: remove ellipsis after abbreviated SHA-1 value


Neither Git nor the user are in need of this (visual) aid anymore, but
we must offer a transition period.

A follow-up patch (series) will rectify the situation by covering the
new output format as well as the backward compatible one.

Also, fix a typo: "abbbreviated" ---> "abbreviated".

Signed-off-by: default avatarAnn T Ropea <bedhanger@gmx.de>
Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
parent b4c02c30
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -4903,14 +4903,20 @@ const char *diff_aligned_abbrev(const struct object_id *oid, int len)
int abblen;
const char *abbrev;
 
/* Do we want all 40 hex characters? */
if (len == GIT_SHA1_HEXSZ)
return oid_to_hex(oid);
 
/* An abbreviated value is fine, possibly followed by an ellipsis. */
abbrev = diff_abbrev_oid(oid, len);
if (!print_sha1_ellipsis())
return abbrev;
abblen = strlen(abbrev);
 
/*
* In well-behaved cases, where the abbbreviated result is the
* In well-behaved cases, where the abbreviated result is the
* same as the requested length, append three dots after the
* abbreviation (hence the whole logic is limited to the case
* where abblen < 37); when the actual abbreviated result is a
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment