From: Jeff King <peff@peff.net>
To: Henning Moll <newsScott@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: sporadic git failures on interactive rebase
Date: Wed, 14 Jan 2015 07:35:36 -0500 [thread overview]
Message-ID: <20150114123536.GA31530@peff.net> (raw)
In-Reply-To: <20150114121915.GB30383@peff.net>
On Wed, Jan 14, 2015 at 07:19:15AM -0500, Jeff King wrote:
> Hmm. There are some instances in git where we know we are looking for an
> object of a particular type, and we can disambiguate a short-sha1 based
> on the type. And "git log" is just such a place, whereas a generic "git
> rev-parse" used by the git-rebase script would not be.
> [...]
> I don't think
> we _have_ a codepath to do type-dependent shortening, though, which
> is maybe an indication that this is a red herring.
Yeah, I think this cannot be it. There is a 7-character commit/blob
ambiguity in git. You can find it yourself with:
git rev-list --objects --all |
cut -d' ' -f1 |
sort | uniq -w 7 -D |
git cat-file --batch-check |
head -2
which produces:
01319837c53050109c60e6740dfa9462327161f0 commit 649
0131983dfbc143ce5dae77e067663bb2e7d5f126 blob 20638
And it behaves as expected. Running "git rev-parse 0131983" complains of
the ambiguity, but "git log 0131983" shows the commit.
What happens if we rebase with it?
$ git checkout 01319837
$ git rebase -i HEAD^
will yield a todo file with the 8-character unambiguous abbreviation.
So I guess all is working as intended there. Perhaps you really were
just very unlucky and an earlier step of the rebase created a
conflicting sha1.
-Peff
next prev parent reply other threads:[~2015-01-14 12:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-13 10:54 sporadic git failures on interactive rebase Henning Moll
2015-01-14 12:19 ` Jeff King
2015-01-14 12:35 ` Jeff King [this message]
2015-01-14 17:12 ` Junio C Hamano
2015-01-14 20:54 ` Jeff King
2015-01-14 21:00 ` Eric Sunshine
2015-01-14 21:02 ` Eric Sunshine
2015-01-14 21:02 ` Jeff King
2015-01-14 21:11 ` Eric Sunshine
2015-01-14 21:57 ` Junio C Hamano
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=20150114123536.GA31530@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=newsScott@gmx.de \
/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).