From: Jeff King <peff@peff.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Sebastian Schuberth <sschuberth@gmail.com>,
git@vger.kernel.org, szeder@ira.uka.de,
Junio C Hamano <gitster@pobox.com>,
tr@thomasrast.ch
Subject: Re: [PATCH] git-completion.bash: always swallow error output of for-each-ref
Date: Thu, 4 Feb 2016 06:45:06 -0500 [thread overview]
Message-ID: <20160204114506.GA1710@sigill.intra.peff.net> (raw)
In-Reply-To: <alpine.DEB.2.20.1602041216240.2964@virtualbox>
On Thu, Feb 04, 2016 at 12:26:19PM +0100, Johannes Schindelin wrote:
> > Hmm. I feel like this case (HEAD points to a branch, then `fetch
> > --prune` deletes it) came up recently and we discussed quieting that
> > warning. But now I cannot seem to find it.
>
> I am pretty certain that it came up in my patch series:
>
> http://thread.gmane.org/gmane.comp.version-control.git/278538
Good, I'm not going crazy! But my search skills are apparently
atrophying. :)
It looks like we just addressed the git-gc issue there. for-each-ref
uses the "rawref" interface, so it gets fed broken things and warns
about them.
I'm tempted to say that it should just silently ignore broken symrefs,
as they're kind-of a normal thing. But I also think Sebastian's patch to
squelch stderr during completion is quite reasonable, too.
> This is funny: after reading the commit message at
> https://github.com/git/git/commit/0571979b it eludes me why strip=2 should
> be so much faster than short...
:short is slow because it checks for ambiguity. So it has to walk the
dwim_ref() rules backwards, checking if each possibility is an existing
ref.
Whereas strip=2 is literally just skipping past the early bits of the
refname string.
-Peff
next prev parent reply other threads:[~2016-02-04 11:45 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-04 10:34 [PATCH] git-completion.bash: always swallow error output of for-each-ref Sebastian Schuberth
2016-02-04 11:13 ` Jeff King
2016-02-04 11:26 ` Johannes Schindelin
2016-02-04 11:45 ` Jeff King [this message]
2016-02-04 19:06 ` Junio C Hamano
2016-02-12 23:21 ` SZEDER Gábor
2016-02-12 23:40 ` Jeff King
2016-02-13 1:07 ` SZEDER Gábor
2016-02-13 9:21 ` Johannes Schindelin
2016-02-13 13:53 ` SZEDER Gábor
2016-02-13 17:14 ` Johannes Schindelin
2016-02-13 16:57 ` Jeff King
2016-02-12 23:43 ` SZEDER Gábor
2016-02-12 23:46 ` Jeff King
2016-02-13 0:53 ` Duy Nguyen
2016-02-12 20:00 ` Junio C Hamano
2016-02-12 20:10 ` Jeff King
2016-02-12 20:26 ` Junio C Hamano
2016-02-12 21:40 ` SZEDER Gábor
2016-02-12 22:16 ` Jeff King
2016-02-12 23:37 ` Junio C Hamano
2016-02-23 23:30 ` Junio C Hamano
2016-02-24 7:48 ` Sebastian Schuberth
2016-02-12 9:23 ` Sebastian Schuberth
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=20160204114506.GA1710@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sschuberth@gmail.com \
--cc=szeder@ira.uka.de \
--cc=tr@thomasrast.ch \
/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).