From: David Aguilar <davvid@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, "Christian Couder" <chriscool@tuxfamily.org>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Jon Seymour" <jon.seymour@gmail.com>,
"Ronnie Sahlberg" <sahlberg@google.com>,
"Michael Haggerty" <mhagger@alum.mit.edu>,
"Fabian Ruch" <bafain@gmail.com>, "Johannes Sixt" <j6t@kdbg.org>
Subject: Re: [PATCH 2/2] rev-parse: honor --quiet when asking for reflog dates that do not exist
Date: Thu, 18 Sep 2014 20:47:17 -0700 [thread overview]
Message-ID: <20140919034715.GA26728@gmail.com> (raw)
In-Reply-To: <xmqqmw9wq54z.fsf@gitster.dls.corp.google.com>
On Thu, Sep 18, 2014 at 09:12:44AM -0700, Junio C Hamano wrote:
> David Aguilar <davvid@gmail.com> writes:
>
> > @@ -514,8 +514,11 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1,
> >
> > if (warn_ambiguous_refs &&
> > (refs_found > 1 ||
> > - !get_short_sha1(str, len, tmp_sha1, GET_SHA1_QUIETLY)))
> > - warning(warn_msg, len, str);
> > + !get_short_sha1(str, len, tmp_sha1, GET_SHA1_QUIETLY))) {
> > + if (!(flags & GET_SHA1_QUIETLY)) {
> > + warning(warn_msg, len, str);
> > + }
> > + }
>
> Hmph, wouldn't it be simpler to read and understand if it were done
> this way instead?
>
> - if (warn_ambiguous_refs &&
> + if (warn_ambiguous_refs && !(flags & GET_SHA1_QUIETLY) &&
> (refs_found > 1 || !get_short_sha1(...)))
> waqrning(...);
>
Yes, it would.
I squashed this patch into the original "make rev-parse --quiet actually quiet"
patch, along with your suggestions, and sent it as a replacement
patch for the commit in pu.
--
David
prev parent reply other threads:[~2014-09-19 3:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-17 4:35 [PATCH 1/2] fixup! refs: make rev-parse --quiet actually quiet David Aguilar
2014-09-17 4:35 ` [PATCH 2/2] rev-parse: honor --quiet when asking for reflog dates that do not exist David Aguilar
2014-09-18 16:07 ` Junio C Hamano
2014-09-18 16:12 ` Junio C Hamano
2014-09-19 3:47 ` David Aguilar [this message]
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=20140919034715.GA26728@gmail.com \
--to=davvid@gmail.com \
--cc=avarab@gmail.com \
--cc=bafain@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=jon.seymour@gmail.com \
--cc=mhagger@alum.mit.edu \
--cc=sahlberg@google.com \
/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).