From: Mike Hommey <mh@glandium.org>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: Ambiguous sha-1 during a rebase
Date: Thu, 14 Apr 2016 18:38:47 +0900 [thread overview]
Message-ID: <20160414093847.GA10852@glandium.org> (raw)
In-Reply-To: <vpqr3e8wo99.fsf@anie.imag.fr>
On Thu, Apr 14, 2016 at 11:09:06AM +0200, Matthieu Moy wrote:
> I suspect you did:
>
> $ git rebase -i
> # editor pops up
> # switch to another terminal and fetch from elsewhere
> # close editor
That's possible, but I don't remember with certainty. At least it's
plausible.
> Then only, git turns short sha1s into long ones, and does not have the
> information to resolve ambiguities.
>
> We could save a map (short -> long) before poping the editor and use
> this map in priority when normalizing the todo-list to use long sha1s,
> but we currently don't.
>
> But I'm tempted to say that you just went very, very unlucky, and it's
> not worth fixing ...
Yeah, that definitely is a weird corner case. Interestingly, it was
complaining about "error: short SHA1 e34ff55 is ambiguous." when apply
*other* commits that were in the list prior to it, and then had the
fatal error when it reached it.
That said, that would be less likely to happen if disambiguation was
also checking checking the object type. Collisions between commits are
less likely than between objects of different types.
As a matter of fact, of the 293143 commits in my repository, only 156
have collisions with other commits (0.05%), but when comparing them to
all the 3260854 objects in the repository, I see 3545 have collisions
(1.2%).
Mike
next prev parent reply other threads:[~2016-04-14 9:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-13 22:29 Ambiguous sha-1 during a rebase Mike Hommey
2016-04-13 22:42 ` Junio C Hamano
2016-04-13 22:52 ` Mike Hommey
2016-04-14 9:09 ` Matthieu Moy
2016-04-14 9:38 ` Mike Hommey [this message]
2016-04-14 13:24 ` Matthieu Moy
2016-04-14 17:27 ` Remi Galan Alfonso
2016-04-14 15:55 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160414093847.GA10852@glandium.org \
--to=mh@glandium.org \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).