Re: Any objectsions to enhancing git-log to show tags/branch heads?
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")) {