git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] blame: use DEFAULT_ABBREV macro

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 28, 2016, 21:57 UTC
Message-ID
<xmqq4m4zit68.fsf@gitster.mtv.corp.google.com>

This does not make any practical difference in today's code, but everybody else accesses the default abbreviation length via the DEFAULT_ABBREV macro. Make sure this oddball codepath does not stray from the convention.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin/blame.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/blame.c b/builtin/blame.c
index a5bbf91..f618392 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -2111,7 +2111,7 @@ static void find_alignment(struct scoreboard *sb, int *option)
 	unsigned largest_score = 0;
 	struct blame_entry *e;
 	int compute_auto_abbrev = (abbrev < 0);
-	int auto_abbrev = default_abbrev;
+	int auto_abbrev = DEFAULT_ABBREV;
 
 	for (e = sb->ent; e; e = e->next) {
 		struct origin *suspect = e->suspect;
-- 
2.10.0-582-gfa57e49
Message 1 of 1 in “blame: use DEFAULT_ABBREV macro”
  1. blame: use DEFAULT_ABBREV macroJunio C Hamano, Sep 28, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.