{"thread":{"id":"24208","subject":"Unexpected error: short SHA1 is ambiguous","startedAt":"2010-06-27T02:16:42Z","lastAt":"2010-06-27T19:02:56Z","messageCount":4,"participants":["Jay Soffian","Nicolas Pitre","Andreas Schwab"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"144342","messageId":"AANLkTikSUBgySbxtKO1iB-GYFgxaL5lY0mfbb5f_xxMS@mail.gmail.com","threadId":"24208","inReplyTo":null,"subject":"Unexpected error: short SHA1 is ambiguous","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2010-06-27T02:16:42Z","receivedAt":"2010-06-27T02:16:42Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"In my copy of git.git:\n\n$ git rev-list aabb^0 --\nerror: short SHA1 aabb is ambiguous.\nfatal: bad revision 'aabb'\n\n$ git rev-list --all --objects | grep ^aabb\naabb2e515c334cbca9d9ae9873a188cef2c9b3ba\naabb9750fddbc28091c46780ccf7b835b62b04c7 Documentation/hooks.txt\naabb1bcbe2b8ce00ced1a749cbab5c1646e0e1f2 Documentation\n\nSo a couple things:\n\n1. Since I restricted to commits with ^0, and there's only one such\ncommit, shouldn't rev-list give me what I want? (rev-parse similarly\nfails).\n\n2. Shouldn't rev-list spit out whatever matches, even if it's\nambiguous? (I can understand that rev-parse wouldn't, but rev-list,\nwell, I expect a list of SHA1s from it.)\n\nj.\n"},{"id":"144344","messageId":"alpine.LFD.2.00.1006262323310.24097@xanadu.home","threadId":"24208","inReplyTo":"AANLkTikSUBgySbxtKO1iB-GYFgxaL5lY0mfbb5f_xxMS@mail.gmail.com","subject":"Re: Unexpected error: short SHA1 is ambiguous","fromName":"Nicolas Pitre","fromEmail":"nico@fluxnic.net","sentAt":"2010-06-27T03:35:24Z","receivedAt":"2010-06-27T03:35:24Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Sat, 26 Jun 2010, Jay Soffian wrote:\n\n> In my copy of git.git:\n> \n> $ git rev-list aabb^0 --\n> error: short SHA1 aabb is ambiguous.\n> fatal: bad revision 'aabb'\n> \n> $ git rev-list --all --objects | grep ^aabb\n> aabb2e515c334cbca9d9ae9873a188cef2c9b3ba\n> aabb9750fddbc28091c46780ccf7b835b62b04c7 Documentation/hooks.txt\n> aabb1bcbe2b8ce00ced1a749cbab5c1646e0e1f2 Documentation\n> \n> So a couple things:\n> \n> 1. Since I restricted to commits with ^0, and there's only one such\n> commit, shouldn't rev-list give me what I want? (rev-parse similarly\n> fails).\n\nNo, the ^0 is not restricting anything.  It merely says you want to walk \nthrough zero parents from the specified commit, but the commit \nspecification is ambiguous (3 possibilities exist).\n\n> 2. Shouldn't rev-list spit out whatever matches, even if it's\n> ambiguous? (I can understand that rev-parse wouldn't, but rev-list,\n> well, I expect a list of SHA1s from it.)\n\nrev-list will give you a range of commits.  But again, which range do \nyou want? There are 3 possible starting points when only specifying \naabb.\n\n\nNicolas\n"},{"id":"144345","messageId":"AANLkTik_TqDoNxEbQW8lTv7l-qfCLR9ICXEabGCSGy_5@mail.gmail.com","threadId":"24208","inReplyTo":"alpine.LFD.2.00.1006262323310.24097@xanadu.home","subject":"Re: Unexpected error: short SHA1 is ambiguous","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2010-06-27T04:02:35Z","receivedAt":"2010-06-27T04:02:35Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Sat, Jun 26, 2010 at 11:35 PM, Nicolas Pitre <nico@fluxnic.net> wrote:\n\n> No, the ^0 is not restricting anything.  It merely says you want to walk\n> through zero parents from the specified commit, but the commit\n> specification is ambiguous (3 possibilities exist).\n\nOkay.\n\n> rev-list will give you a range of commits.  But again, which range do\n> you want? There are 3 possible starting points when only specifying\n> aabb.\n\nI see. Well, I guess I'd wanted something like \"rev-list --no-walk\n--all-matches <ambiguous SHA-1>\" as a way to say \"return everything\neven if it isn't canonical\".\n\nIn any case, I found a better way to go about what I was trying to do.\n\nThanks,\n\nj.\n"},{"id":"144355","messageId":"m2lja0wb6n.fsf@igel.home","threadId":"24208","inReplyTo":"alpine.LFD.2.00.1006262323310.24097@xanadu.home","subject":"Re: Unexpected error: short SHA1 is ambiguous","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2010-06-27T19:02:56Z","receivedAt":"2010-06-27T19:02:56Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Nicolas Pitre <nico@fluxnic.net> writes:\n\n> On Sat, 26 Jun 2010, Jay Soffian wrote:\n>> 1. Since I restricted to commits with ^0, and there's only one such\n>> commit, shouldn't rev-list give me what I want? (rev-parse similarly\n>> fails).\n>\n> No, the ^0 is not restricting anything.  It merely says you want to walk \n> through zero parents from the specified commit, but the commit \n> specification is ambiguous (3 possibilities exist).\n\nBut ^0 can only be applied to a commit, and only one commit matches\naabb.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"}]}