Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] revision: add --reflog-message to grep reflog messages

From: Jeff King <hidden>
Date: 2016-06-15 22:54:53

On Thu, Sep 27, 2012 at 10:09:28AM -0700, Junio C Hamano wrote:
quoted
+--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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help