git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-rev-parse: Fix --short= option parsing
@ 2006-02-18  1:10 Jonas Fonseca
  2006-02-18  6:50 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Jonas Fonseca @ 2006-02-18  1:10 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>

---
commit 16e2efc524d181cf46dcb252532139a0aff4a28f
tree c57ea8bf09b25fb643aadd224e7e73673187cc60
parent b867c7c23a42fbe9f261153a9814a5efbc071a29
author Jonas Fonseca <fonseca@diku.dk> Sat, 18 Feb 2006 02:04:26 +0100
committer Jonas Fonseca <fonseca@antimatter.localdomain> Sat, 18 Feb 2006 02:04:26 +0100

 rev-parse.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/rev-parse.c b/rev-parse.c
index b82f294..70a8271 100644
--- a/rev-parse.c
+++ b/rev-parse.c
@@ -225,12 +225,12 @@ int main(int argc, char **argv)
 				continue;
 			}
 			if (!strcmp(arg, "--short") ||
-			    !strncmp(arg, "--short=", 9)) {
+			    !strncmp(arg, "--short=", 8)) {
 				filter &= ~(DO_FLAGS|DO_NOREV);
 				verify = 1;
 				abbrev = DEFAULT_ABBREV;
-				if (arg[8] == '=')
-					abbrev = strtoul(arg + 9, NULL, 10);
+				if (arg[7] == '=')
+					abbrev = strtoul(arg + 8, NULL, 10);
 				if (abbrev < MINIMUM_ABBREV)
 					abbrev = MINIMUM_ABBREV;
 				else if (40 <= abbrev)

-- 
Jonas Fonseca

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-02-18 15:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-18  1:10 [PATCH] git-rev-parse: Fix --short= option parsing Jonas Fonseca
2006-02-18  6:50 ` Junio C Hamano
2006-02-18 15:07   ` Jonas Fonseca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).