git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jeff King <peff@peff.net>
Date
Sep 27, 2012, 17:28 UTC
Message-ID
<20120927172844.GC1547@sigill.intra.peff.net>
In-Reply-To
<7v4nmjs88n.fsf@alter.siamese.dyndns.org>
On Thu, Sep 27, 2012 at 10:09:28AM -0700, Junio C Hamano wrote:
Show 11 quoted lines
> > +--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
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 25 in “revision: add --reflog-message=<pattern> to grep reflog messages”
  1. revision: add --reflog-message=<pattern> to grep reflog messagesNguyễn Thái Ngọc Duy, Sep 26, 2012
  2. Junio C HamanoSep 26, 2012
  3. Nguyen Thai Ngoc DuySep 26, 2012
  4. Junio C HamanoSep 26, 2012
  5. revision: add --reflog-message to grep reflog messagesNguyễn Thái Ngọc Duy, Sep 27, 2012
  6. Junio C HamanoSep 27, 2012
  7. Jeff KingSep 27, 2012
  8. Junio C HamanoSep 27, 2012
  9. 1/3 grep: generalize header grep code to accept arbitrary headersNguyễn Thái Ngọc Duy, Sep 28, 2012
  10. 2/3 revision: add --grep-reflog to filter commits by reflog messagesNguyễn Thái Ngọc Duy, Sep 28, 2012
  11. Junio C HamanoSep 28, 2012
  12. Nguyễn Thái Ngọc DuySep 29, 2012
  13. 1/3 grep: prepare for new header field filterNguyễn Thái Ngọc Duy, Sep 29, 2012
  14. Jeff KingSep 29, 2012
  15. 2/3 revision: add --grep-reflog to filter commits by reflog messagesNguyễn Thái Ngọc Duy, Sep 29, 2012
  16. Jeff KingSep 29, 2012
  17. Junio C HamanoSep 29, 2012
  18. Nguyen Thai Ngoc DuySep 29, 2012
  19. Junio C HamanoSep 29, 2012
  20. Nguyen Thai Ngoc DuySep 30, 2012
  21. Jeff KingSep 29, 2012
  22. 3/3 revision: make --grep search in notes too if shownNguyễn Thái Ngọc Duy, Sep 29, 2012
  23. Junio C HamanoSep 29, 2012
  24. 3/3 revision: make --grep search in notes too if shownNguyễn Thái Ngọc Duy, Sep 28, 2012
  25. Junio C HamanoSep 28, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.