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

Re: [PATCH] --walk-reflogs: disallow uninteresting commits

From
Junio C Hamano <junkio@cox.net>
Date
Jan 20, 2007, 07:21 UTC
Message-ID
<7v64b29naa.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0701200325380.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 6 quoted lines
> 	> I think people may also appreciate timestamps on Reflog headers 
> 	> you add to the output.
>
> 	At the moment, if you ask for @{1} (or leave it out), you will see 
> 	them enumerated by number. If you ask for @{now}, you will see 
> 	them identified by date...

Thanks. This certainly needs a better documentation -- the attached is my try.

By the way, I haven't looked into it, but does this ring a bell?
    $ git-log --walk-reflogs -1 --pretty=s master@{1.day}
    commit 72fe6a59890870ed9c3e9e1e6381fc0d7ba75fe4
    Reflog: master@{Thu, 1 Jan 1970 00:00:00 +0000} ((null))
    Reflog message: (null)Author: Junio C Hamano <junkio@cox.net>
        Documentation: Generate command lists.
---
diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt
index 86c94e7..fcc540b 100644
--- a/Documentation/git-rev-list.txt
+++ b/Documentation/git-rev-list.txt
@@ -190,6 +190,21 @@ limiting may be applied.
 	In addition to the '<commit>' listed on the command
 	line, read them from the standard input.
 
+--walk-reflogs::
+
+	Instead of walking the commit ancestry chain, walk
+	reflog entries from the most recent one to older ones.
+	When this option is used you cannot specify commits to
+	exclude (that is, '{caret}commit', 'commit1..commit2',
+	nor 'commit1...commit2' notations cannot be used).
++
+With '\--pretty' format other than oneline (for obvious reasons),
+this causes the output to have two extra lines of information
+taken from the reflog.  By default, 'commit@{Nth}' notation is
+used in the output.  When the starting commit is specified as
+'commit@{now}', output also uses 'commit@{timestamp}' notation
+instead.
+
 --merge::
 
 	After a failed merge, show refs that touch files having a
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 9 of 11 in “show-branch --reflog: show the reflog message at the top.”
  1. 3/3 show-branch --reflog: show the reflog message at the top.Junio C Hamano, Jan 19, 2007
  2. Johannes SchindelinJan 20, 2007
  3. Junio C HamanoJan 20, 2007
  4. Johannes SchindelinJan 20, 2007
  5. Junio C HamanoJan 20, 2007
  6. Johannes SchindelinJan 20, 2007
  7. Junio C HamanoJan 20, 2007
  8. --walk-reflogs: disallow uninteresting commitsJohannes Schindelin, Jan 20, 2007
  9. Junio C HamanoJan 20, 2007
  10. Johannes SchindelinJan 20, 2007
  11. Junio C HamanoJan 20, 2007

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.