Re: [PATCH] describe: Don’t look up commits with --exact-match
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Dec 6, 2010, 17:47 UTC
- Message-ID
- <20101206174723.GB6272@burratino>
- In-Reply-To
- <alpine.DEB.2.02.1012061159500.23348@dr-wily.mit.edu>
Anders Kaseorg wrote:
Show 5 quoted lines
> Yeah. Okay, I see that “lookup” implies unpacking, as opposed to “find”, > which doesn’t. The important part is to avoid the find, of course, > because the I/O is expensive. > > Anyway, here’s a series with that change split out.
Thanks.
In theory finding an object would only require looking at the pack index (and directory listings), but find_pack_entry does
/* * We are about to tell the caller where they can * locate the requested object. We better make * sure the packfile is still here and can be * accessed before supplying that answer, as * it may have been deleted since the index * was loaded! */
which spoils that plan.
Your original use of the word "lookup" seemed sane, too; I was just fishing for a more detailed explanation.
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
> -- 8< -- > From 2ad1e58b8f6e9c117c77748b6e8b85227d9d5412 Mon Sep 17 00:00:00 2001
[...]
For the future: this does not follow the preferred patch format (one patch per message, each of the form "description/---/diff"). In this case I am guessing it won't be much trouble to massage on the receiving end, so no terrible loss.