From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael Haggerty <mhagger@alum.mit.edu>, git@vger.kernel.org
Subject: Re: What's cooking in git.git (Mar 2014, #02; Tue, 11)
Date: Wed, 12 Mar 2014 15:35:09 -0400 [thread overview]
Message-ID: <20140312193509.GA1816@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqq7g80o05g.fsf@gitster.dls.corp.google.com>
On Tue, Mar 11, 2014 at 03:12:11PM -0700, Junio C Hamano wrote:
> * jk/warn-on-object-refname-ambiguity (2014-01-09) 6 commits
> - get_sha1: drop object/refname ambiguity flag
> - get_sha1: speed up ambiguous 40-hex test
> - FIXUP: teach DO_FOR_EACH_NO_RECURSE to prime_ref_dir()
> - refs: teach for_each_ref a flag to avoid recursion
> - cat-file: fix a minor memory leak in batch_objects
> - cat-file: refactor error handling of batch_objects
>
> Expecting a reroll.
I finally got a chance to return to this one. Michael had some good
comments on the refactoring that was going on in the middle patches. He
ended with:
Yes. Still, the code is really piling up for this one warning for the
contrived eventuality that somebody wants to pass SHA-1s and branch
names together in a single cat-file invocation *and* wants to pass
lots of inputs at once and so is worried about performance *and* has
reference names that look like SHA-1s. Otherwise we could just leave
the warning disabled in this case, as now. Or we could add a new
"--hashes-only" option that tells cat-file to treat all of its
arguments/inputs as SHA-1s; such an option would permit an even faster
code path for bulk callers.
Having looked at it again, I really think it is not worth pursuing. The
end goal is not that interesting, there is a lot of code introduced, and
a reasonable chance of accidentally introducing regressions and/or
making the code less maintainable. Keeping the existing code (which
just disables the check for cat-file) is probably the sanest course of
action. We can do a similar thing for "rev-list --stdin" if we want, or
we can wait until somebody complains.
The bottom two patches are reasonable cleanups we should keep, though
(and the rest can just be discarded).
-Peff
next prev parent reply other threads:[~2014-03-12 19:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 22:12 What's cooking in git.git (Mar 2014, #02; Tue, 11) Junio C Hamano
2014-03-11 23:22 ` Duy Nguyen
2014-03-12 18:31 ` Junio C Hamano
2014-03-12 19:35 ` Jeff King [this message]
2014-03-12 19:49 ` Junio C Hamano
2014-03-12 20:03 ` Jeff King
2014-03-12 20:05 ` [PATCH 1/2] cat-file: restore warn_on_object_refname_ambiguity flag Jeff King
2014-03-12 20:06 ` [PATCH 2/2] rev-list: disable object/refname ambiguity check with --stdin Jeff King
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140312193509.GA1816@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mhagger@alum.mit.edu \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).