aboutsummaryrefslogtreecommitdiff
path: root/name-rev.c
Commit message (Collapse)AuthorAge
* name-rev: fix parent counting.Junio C Hamano2005-11-28
| | | | | | | Noticed by linux@horizon.com. The first merge parent (typically "our branch") is ^1, not ^0, and the first other branch is ^2. Signed-off-by: Junio C Hamano <junkio@cox.net>
* name-rev: fix off-by-one error in --stdin.Junio C Hamano2005-11-25
| | | | | | | | | It dropped the last hexdigit in the object name. [jc: Noticed and patch supplied by ALASCM, reworked to apply at the right place by me] Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix sparse warningsTimo Hirvonen2005-11-20
| | | | | | | | | Make some functions static and convert func() function prototypes to to func(void). Fix declaration after statement, missing declaration and redundant declaration warnings. Signed-off-by: Timo Hirvonen <tihirvon@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Be careful when dereferencing tags.Junio C Hamano2005-11-02
| | | | | | | | | | One caller of deref_tag() was not careful enough to make sure what deref_tag() returned was not NULL (i.e. we found a tag object that points at an object we do not have). Fix it, and warn about refs that point at such an incomplete tag where needed. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add git-name-revJohannes Schindelin2005-10-26
git-name-rev tries to find nice symbolic names for commits. It does so by walking the commits from the refs. When the symbolic name is ambiguous, the following heuristic is applied: Try to avoid too many ~'s, and if two ambiguous names have the same count of ~'s, take the one whose last number is smaller. With "--tags", the names are derived only from tags. With "--stdin", the stdin is parsed, and after every sha1 for which a name could be found, the name is appended. (Try "git log | git name-rev --stdin".) Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>