Re: [RFC PATCH 00/18] Multi-pack index (MIDX)
- From
Jeff King <peff@peff.net>
- Date
- Jan 9, 2018, 06:50 UTC
- Message-ID
- <20180109065018.GA32257@sigill.intra.peff.net>
- In-Reply-To
- <nycvar.QRO.7.76.6.1801081438470.31@ZVAVAG-6OXH6DA.rhebcr.pbec.zvpebfbsg.pbz>
On Mon, Jan 08, 2018 at 02:43:00PM +0100, Johannes Schindelin wrote:
Show 7 quoted lines
> Take the interactive rebase for example. It generates todo lists with > abbreviated commit names, for readability (and it is *really* important to > keep this readable). As we expect new objects to be introduced by the > interactive rebase, we convert that todo list to unabbreviated commit > names before executing the interactive rebase. > > Your idea (to not care about unambiguous abbreviations) would break that.
I think that could be easily worked around for rebase by asking git to check ambiguity during the conversion. Speed is much less of a problem there, because we're doing a relatively small number of abbreviations (compared to "git log --oneline --raw", which is abbreviating almost every object in the repository).
But I agree it's a potential problem for other scripts that we might not have control over. I hadn't really intended this to be the default behavior (my patch was just trying to show the direction). But it does make for a pretty awful interface if callers have to opt into it manually ("git log --oneline --no-really-go-fast").
I am a bit curious if there's a bounded probability that people would find acceptable for Git to give an ambiguous abbreviation. We already accept 1 in 2^160, of course. But would, e.g., one in a million be OK?
-Peff