From: Junio C Hamano <gitster@pobox.com>
To: Vladimir Panteleev <git@thecybershadow.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2 3/4] show-ref: Optimize show_ref a bit
Date: Sun, 22 Jan 2017 14:55:18 -0800 [thread overview]
Message-ID: <xmqq60l6vh61.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <xmqqa8aivhik.fsf@gitster.mtv.corp.google.com> (Junio C. Hamano's message of "Sun, 22 Jan 2017 14:47:47 -0800")
Junio C Hamano <gitster@pobox.com> writes:
> Having to do this change probably is an indication that the division
> of labour between show_ref() and show_one() up to this step needs to
> be rethought.
>
> Conceptually, "git show-ref" works in two ways:
>
> * When in --verify mode, the end user gives which refnames to
> consider showing.
>
> * Otherwise the end user gives pattern and the command infers which
> refnames to consider showing using the pattern.
>
> And for the refnames that are considered for showing, we may do
> various things, like -d to deref and --quiet to be silent. We want
> this actual "output" step to be the same between two modes of
> operation.
... also "error out if the named object did not exist" can be part
of this, which means ...
> So a better division of labour would be:
>
> * Make show_ref() about "using pattern, enumerate what refs to
> show" and call show_one().
>
> * Update show_one() and teach _it_ to handle quiet and deref_tags.
... "if (!has_sha1_file(oid->hash)) die()" in show_ref() would
probably want to be part of this update.
next prev parent reply other threads:[~2017-01-22 22:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-21 1:08 [PATCH v2] show-ref: Allow -d, --head to work with --verify Vladimir Panteleev
2017-01-21 1:08 ` [PATCH v2 1/4] show-ref: Allow " Vladimir Panteleev
2017-01-21 1:08 ` [PATCH v2 2/4] show-ref: Allow -d " Vladimir Panteleev
2017-01-21 1:08 ` [PATCH v2 3/4] show-ref: Optimize show_ref a bit Vladimir Panteleev
2017-01-22 22:47 ` Junio C Hamano
2017-01-22 22:55 ` Junio C Hamano [this message]
2017-01-21 1:08 ` [PATCH v2 4/4] show-ref: Inline show_one Vladimir Panteleev
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=xmqq60l6vh61.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@thecybershadow.net \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.