git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] revision: add --reflog-message to grep reflog messages
Date: Thu, 27 Sep 2012 13:28:44 -0400	[thread overview]
Message-ID: <20120927172844.GC1547@sigill.intra.peff.net> (raw)
In-Reply-To: <7v4nmjs88n.fsf@alter.siamese.dyndns.org>

On Thu, Sep 27, 2012 at 10:09:28AM -0700, Junio C Hamano wrote:

> > +--reflog-message=<pattern>::
> > +	Limit the commits output to ones with reflog entries that
> > +	match the specified pattern (regular expression). Ignored unless
> > +	--walk-reflogs is given.
> > +
> 
> I am debating myself if it is sane for this option to have no hint
> that it is about "limiting" in its name.  "--author/--committer"
> don't and it is clear from the context of the command that they are
> not about setting author/committer, so "--reflog-message" may be
> interpreted the same, perhaps.

I also found the name confusing on first-read. While "--author" is an
example in one direction, the fact that "--grep" is not called "--body"
is a counter-example.

I'd much rather see it as "--grep-reflog" or something. You could also
do "--grep-reflog-message", which would match a later
"--grep-reflog-author", but I am not sure anybody would want the latter,
and it makes the current name a lot longer.

I actually think just checking the reflog when we call "--grep" would
the most common workflow, and requires no extra work from the user.  My
only hesitation is that if somebody _does_ want to distinguish, there's
no escape hatch. Of course, the reflog walker is already full of such
weird conflations (e.g., the rewriting of parent and date information).

-Peff

  reply	other threads:[~2012-09-27 17:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26 12:12 [PATCH] revision: add --reflog-message=<pattern> to grep reflog messages Nguyễn Thái Ngọc Duy
2012-09-26 14:07 ` Junio C Hamano
2012-09-26 14:15   ` Nguyen Thai Ngoc Duy
2012-09-26 19:28     ` Junio C Hamano
2012-09-27 11:36       ` [PATCH] revision: add --reflog-message " Nguyễn Thái Ngọc Duy
2012-09-27 17:09         ` Junio C Hamano
2012-09-27 17:28           ` Jeff King [this message]
2012-09-27 18:16             ` Junio C Hamano
2012-09-28  7:01         ` [PATCH 1/3] grep: generalize header grep code to accept arbitrary headers Nguyễn Thái Ngọc Duy
2012-09-28  7:01           ` [PATCH 2/3] revision: add --grep-reflog to filter commits by reflog messages Nguyễn Thái Ngọc Duy
2012-09-28 17:55             ` Junio C Hamano
2012-09-29  4:41               ` Nguyễn Thái Ngọc Duy
2012-09-29  4:41                 ` [PATCH 1/3] grep: prepare for new header field filter Nguyễn Thái Ngọc Duy
2012-09-29  5:22                   ` Jeff King
2012-09-29  4:41                 ` [PATCH 2/3] revision: add --grep-reflog to filter commits by reflog messages Nguyễn Thái Ngọc Duy
2012-09-29  5:30                   ` Jeff King
2012-09-29  5:54                     ` Junio C Hamano
2012-09-29  6:13                       ` Nguyen Thai Ngoc Duy
2012-09-29 19:11                         ` Junio C Hamano
2012-09-30  3:45                           ` Nguyen Thai Ngoc Duy
2012-09-29  6:16                       ` Jeff King
2012-09-29  4:41                 ` [PATCH 3/3] revision: make --grep search in notes too if shown Nguyễn Thái Ngọc Duy
2012-09-29  5:35                 ` [PATCH 2/3] revision: add --grep-reflog to filter commits by reflog messages Junio C Hamano
2012-09-28  7:01           ` [PATCH 3/3] revision: make --grep search in notes too if shown Nguyễn Thái Ngọc Duy
2012-09-28 17:55             ` Junio C Hamano

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=20120927172844.GC1547@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.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).