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

Re: Any objectsions to enhancing git-log to show tags/branch heads?

From
Junio C Hamano <junkio@cox.net>
Date
Apr 23, 2007, 10:00 UTC
Message-ID
<7vd51vh0m4.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0704161959230.5473@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 8 quoted lines
> On Tue, 17 Apr 2007, Jakub Narebski wrote:
>> 
>> You have to use --abbrev-commit (--abbrev is opassed to log machinery, and
>> covers object ids), which is undocumented option (mentioned only in passing
>> in git-reflog(1)).
>
> Yeah, it's irritated me often enough that I think we should just make 
> "--abbrev" set "--abbrev-commit" too.
Hmmm.  I do not know if this breaks anything...
---
 revision.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/revision.c b/revision.c
index ce70f48..78d144b 100644
--- a/revision.c
+++ b/revision.c
@@ -1081,6 +1081,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
 			}
 			if (!strcmp(arg, "--abbrev")) {
 				revs->abbrev = DEFAULT_ABBREV;
+				revs->abbrev_commit = 1;
 				continue;
 			}
 			if (!prefixcmp(arg, "--abbrev=")) {
@@ -1089,6 +1090,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
 					revs->abbrev = MINIMUM_ABBREV;
 				else if (revs->abbrev > 40)
 					revs->abbrev = 40;
+				else
+					revs->abbrev_commit = 1;
 				continue;
 			}
 			if (!strcmp(arg, "--abbrev-commit")) {
Previous: Linus TorvaldsNext: Theodore Tso
Message 14 of 15 in “Any objectsions to enhancing git-log to show tags/branch heads?”
  1. Theodore Ts'oApr 16, 2007
  2. Junio C HamanoApr 16, 2007
  3. Theodore TsoApr 16, 2007
  4. Peter BaumannApr 16, 2007
  5. J. Bruce FieldsApr 16, 2007
  6. Peter BaumannApr 17, 2007
  7. J. Bruce FieldsApr 17, 2007
  8. Julian PhillipsApr 16, 2007
  9. Peter BaumannApr 17, 2007
  10. Linus TorvaldsApr 16, 2007
  11. Theodore TsoApr 17, 2007
  12. Jakub NarebskiApr 17, 2007
  13. Linus TorvaldsApr 17, 2007
  14. Junio C HamanoApr 23, 2007
  15. Theodore TsoApr 17, 2007

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.