git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Unexpected error: short SHA1 is ambiguous
@ 2010-06-27  2:16 Jay Soffian
  2010-06-27  3:35 ` Nicolas Pitre
  0 siblings, 1 reply; 4+ messages in thread
From: Jay Soffian @ 2010-06-27  2:16 UTC (permalink / raw)
  To: git

In my copy of git.git:

$ git rev-list aabb^0 --
error: short SHA1 aabb is ambiguous.
fatal: bad revision 'aabb'

$ git rev-list --all --objects | grep ^aabb
aabb2e515c334cbca9d9ae9873a188cef2c9b3ba
aabb9750fddbc28091c46780ccf7b835b62b04c7 Documentation/hooks.txt
aabb1bcbe2b8ce00ced1a749cbab5c1646e0e1f2 Documentation

So a couple things:

1. Since I restricted to commits with ^0, and there's only one such
commit, shouldn't rev-list give me what I want? (rev-parse similarly
fails).

2. Shouldn't rev-list spit out whatever matches, even if it's
ambiguous? (I can understand that rev-parse wouldn't, but rev-list,
well, I expect a list of SHA1s from it.)

j.

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

* Re: Unexpected error: short SHA1 is ambiguous
  2010-06-27  2:16 Unexpected error: short SHA1 is ambiguous Jay Soffian
@ 2010-06-27  3:35 ` Nicolas Pitre
  2010-06-27  4:02   ` Jay Soffian
  2010-06-27 19:02   ` Andreas Schwab
  0 siblings, 2 replies; 4+ messages in thread
From: Nicolas Pitre @ 2010-06-27  3:35 UTC (permalink / raw)
  To: Jay Soffian; +Cc: git

On Sat, 26 Jun 2010, Jay Soffian wrote:

> In my copy of git.git:
> 
> $ git rev-list aabb^0 --
> error: short SHA1 aabb is ambiguous.
> fatal: bad revision 'aabb'
> 
> $ git rev-list --all --objects | grep ^aabb
> aabb2e515c334cbca9d9ae9873a188cef2c9b3ba
> aabb9750fddbc28091c46780ccf7b835b62b04c7 Documentation/hooks.txt
> aabb1bcbe2b8ce00ced1a749cbab5c1646e0e1f2 Documentation
> 
> So a couple things:
> 
> 1. Since I restricted to commits with ^0, and there's only one such
> commit, shouldn't rev-list give me what I want? (rev-parse similarly
> fails).

No, the ^0 is not restricting anything.  It merely says you want to walk 
through zero parents from the specified commit, but the commit 
specification is ambiguous (3 possibilities exist).

> 2. Shouldn't rev-list spit out whatever matches, even if it's
> ambiguous? (I can understand that rev-parse wouldn't, but rev-list,
> well, I expect a list of SHA1s from it.)

rev-list will give you a range of commits.  But again, which range do 
you want? There are 3 possible starting points when only specifying 
aabb.


Nicolas

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

* Re: Unexpected error: short SHA1 is ambiguous
  2010-06-27  3:35 ` Nicolas Pitre
@ 2010-06-27  4:02   ` Jay Soffian
  2010-06-27 19:02   ` Andreas Schwab
  1 sibling, 0 replies; 4+ messages in thread
From: Jay Soffian @ 2010-06-27  4:02 UTC (permalink / raw)
  To: Nicolas Pitre; +Cc: git

On Sat, Jun 26, 2010 at 11:35 PM, Nicolas Pitre <nico@fluxnic.net> wrote:

> No, the ^0 is not restricting anything.  It merely says you want to walk
> through zero parents from the specified commit, but the commit
> specification is ambiguous (3 possibilities exist).

Okay.

> rev-list will give you a range of commits.  But again, which range do
> you want? There are 3 possible starting points when only specifying
> aabb.

I see. Well, I guess I'd wanted something like "rev-list --no-walk
--all-matches <ambiguous SHA-1>" as a way to say "return everything
even if it isn't canonical".

In any case, I found a better way to go about what I was trying to do.

Thanks,

j.

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

* Re: Unexpected error: short SHA1 is ambiguous
  2010-06-27  3:35 ` Nicolas Pitre
  2010-06-27  4:02   ` Jay Soffian
@ 2010-06-27 19:02   ` Andreas Schwab
  1 sibling, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 2010-06-27 19:02 UTC (permalink / raw)
  To: Nicolas Pitre; +Cc: Jay Soffian, git

Nicolas Pitre <nico@fluxnic.net> writes:

> On Sat, 26 Jun 2010, Jay Soffian wrote:
>> 1. Since I restricted to commits with ^0, and there's only one such
>> commit, shouldn't rev-list give me what I want? (rev-parse similarly
>> fails).
>
> No, the ^0 is not restricting anything.  It merely says you want to walk 
> through zero parents from the specified commit, but the commit 
> specification is ambiguous (3 possibilities exist).

But ^0 can only be applied to a commit, and only one commit matches
aabb.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

end of thread, other threads:[~2010-06-27 19:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-27  2:16 Unexpected error: short SHA1 is ambiguous Jay Soffian
2010-06-27  3:35 ` Nicolas Pitre
2010-06-27  4:02   ` Jay Soffian
2010-06-27 19:02   ` Andreas Schwab

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).