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

* Re: [PATCH] git-rev-parse: Fix --short= option parsing
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2006-02-18  6:50 UTC (permalink / raw)
  To: Jonas Fonseca; +Cc: git

Thanks.  I queued the two fixes from you.

They will first appear in "next" and also in 1.2.2.

> Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
>
> ---
> commit 013b99654ee464856d266a72f0203d0fee2b0d11
> tree 3c961d6ebb8b9805ee3950ec081679de15f5a9ba
> parent 16e2efc524d181cf46dcb252532139a0aff4a28f
> author Jonas Fonseca <fonseca@diku.dk> Sat, 18 Feb 2006 02:05:11 +0100
> committer Jonas Fonseca <fonseca@antimatter.localdomain> Sat, 18 Feb 2006 02:05:11 +0100

BTW, what git-based tool do you use to spit out this ugly format?
Full object name of the parent commit is useful only if the
recipient has that object, and it is not one of mine, so it is
unlikely nobody but you would have it.  Name of the tree is what
you would get _after_ applying this patch, so it also is not
very useful for e-mail communication.

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

* Re: [PATCH] git-rev-parse: Fix --short= option parsing
  2006-02-18  6:50 ` Junio C Hamano
@ 2006-02-18 15:07   ` Jonas Fonseca
  0 siblings, 0 replies; 3+ messages in thread
From: Jonas Fonseca @ 2006-02-18 15:07 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Junio C Hamano <junkio@cox.net> wrote Fri, Feb 17, 2006:
> > Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
> >
> > ---
> > commit 013b99654ee464856d266a72f0203d0fee2b0d11
> > tree 3c961d6ebb8b9805ee3950ec081679de15f5a9ba
> > parent 16e2efc524d181cf46dcb252532139a0aff4a28f
> > author Jonas Fonseca <fonseca@diku.dk> Sat, 18 Feb 2006 02:05:11 +0100
> > committer Jonas Fonseca <fonseca@antimatter.localdomain> Sat, 18 Feb 2006 02:05:11 +0100
> 
> BTW, what git-based tool do you use to spit out this ugly format?

Cogito.

> Full object name of the parent commit is useful only if the
> recipient has that object, and it is not one of mine, so it is
> unlikely nobody but you would have it.  Name of the tree is what
> you would get _after_ applying this patch, so it also is not
> very useful for e-mail communication.

I agree most of this is useless and will look into making a patch to so
Cogito will also use the more or less standard From and Date headers
with parent prefixed to the diff.

-- 
Jonas Fonseca

^ permalink raw reply	[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).