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

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 20, 2007, 02:28 UTC
Message-ID
<Pine.LNX.4.63.0701200325380.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<7v4pqmbhzg.fsf@assigned-by-dhcp.cox.net>

Do not allow uninteresting commits with --walk-reflogs, since it is not clear what should be shown in these cases:

	$ git log --walk-reflogs master..next
	$ git log --walk-reflogs ^master
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
	On Fri, 19 Jan 2007, Junio C Hamano wrote:
	
	> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
	> 
	> > How about failing if there are _uninteresting_ commits? So,
	> >
	> > 	git log --walk-reflogs next master
	> >
	> > still works?
	> 
	> That feels like a good way to deal with it.
	Here you are.
	> 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...
 reflog-walk.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/reflog-walk.c b/reflog-walk.c
index d4b49c7..2d97411 100644
--- a/reflog-walk.c
+++ b/reflog-walk.c
@@ -145,6 +145,9 @@ void add_reflog_for_walk(struct reflog_walk_info *info,
 	char *branch, *at = strchr(name, '@');
 	struct commit_reflog *commit_reflog;
 
+	if (commit->object.flags & UNINTERESTING)
+		die ("Cannot walk reflogs for %s", name);
+
 	branch = xstrdup(name);
 	if (at && at[1] == '{') {
 		char *ep;
-- 
1.5.0.rc1.g5a400-dirty
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 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.