Commit 72a5b561 ("core.abbrevguard: Ensure short object names stay unique a bit longer") introduced this config variable to make object name unambiguously. Use it. Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxx> --- v2: - re-init 'length' in every loop builtin/blame.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/builtin/blame.c b/builtin/blame.c index aa30ec52692..cecfceea45f 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -1664,14 +1664,23 @@ static void emit_other(struct scoreboard *sb, struct blame_entry *ent, int opt) struct commit_info ci; char hex[41]; int show_raw_time = !!(opt & OUTPUT_RAW_TIMESTAMP); + int uniq_length; get_commit_info(suspect->commit, &ci, 1); strcpy(hex, sha1_to_hex(suspect->commit->object.sha1)); + if (opt & OUTPUT_LONG_OBJECT_NAME) + uniq_length = 40; + else { + uniq_length = 8 + unique_abbrev_extra_length; + if (uniq_length > 40) + uniq_length = 40; + } + cp = nth_line(sb, ent->lno); for (cnt = 0; cnt < ent->num_lines; cnt++) { char ch; - int length = (opt & OUTPUT_LONG_OBJECT_NAME) ? 40 : 8; + int length = uniq_length; if (suspect->commit->object.flags & UNINTERESTING) { if (blank_boundary) -- 1.7.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html