On Mon, Jan 06, 2014 at 07:35:04PM -0800, Brodie Rao wrote:

> On Mon, Jan 6, 2014 at 7:32 PM, Brodie Rao <bro...@sf.io> wrote:
> > This change ensures get_sha1_basic() doesn't try to resolve full hashes
> > as refs when ambiguous ref warnings are disabled.
> >
> > This provides a substantial performance improvement when passing many
> > hashes to a command (like "git rev-list --stdin") when
> > core.warnambiguousrefs is false. The check incurs 6 stat()s for every
> > hash supplied, which can be costly over NFS.
> Forgot to add:
> Signed-off-by: Brodie Rao <bro...@sf.io>

Looks good to me.

I wonder if I should have simply gone this route instead of adding
warn_on_object_refname_ambiguity, and then people who want "cat-file
--batch" to be fast could just turn off core.warnAmbiguousRefs. I wanted
it to happen automatically, though. Alternatively, I guess "cat-file
--batch" could just turn off warn_ambiguous_refs itself.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to