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

Re: Do we have a convenient way to refer to a specific commit in an already filtered rev-list?

From
Jeff King <peff@peff.net>
Date
Sep 27, 2011, 21:35 UTC
Message-ID
<20110927213517.GB5176@sigill.intra.peff.net>
In-Reply-To
<CAEvN+1jPD53-e8a31g+iz6vMB0-e2LECjouBELkBOXBV5=oGBg@mail.gmail.com>
On Sun, Sep 25, 2011 at 12:46:20AM +0800, Tzu-Jung Lee wrote:
Show 11 quoted lines
> Do we have a convenient/symbolic way to refer  to a specific commit of
> an already filtered rev-list? For example, I'm interested in the
> commits with some constraints:
> 
>     git log somepath --author=someone
> 
> Without gui/tui tools, I have to frequently CUT & PASTE the commit-ID
> for further manipulation (show, cherry-pick, ...), and possibly repeat
> the parsing couple of times if I didn't save the output. I wonder if
> we have a convenient way to refer to the discrete commits? like
> HEAD~4, HEAD@{3} or something magic.
Use the shell:
  git rev-list --author=someone HEAD >saved-query
  git log --no-walk --stdin <saved-query
  git cherry-pick `cat saved-query`
or even:
  q=`git rev-list --author=someone HEAD`
  git log --no-walk $q
  git cherry-pick $q
-Peff
Previous: Tzu-Jung LeeNext: Tzu-Jung Lee
Message 2 of 5 in “Do we have a convenient way to refer to a specific commit in an already filtered rev-list?”
  1. Tzu-Jung LeeSep 24, 2011
  2. Jeff KingSep 27, 2011
  3. Tzu-Jung LeeOct 3, 2011
  4. Junio C HamanoOct 3, 2011
  5. Jeff KingOct 4, 2011

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.