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

[PATCH] --walk-reflogs: actually find the right commit by date.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 20, 2007, 09:49 UTC
Message-ID
<Pine.LNX.4.63.0701201048560.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Embarassing thinko.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 reflog-walk.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/reflog-walk.c b/reflog-walk.c
index d4b49c7..d58ff9b 100644
--- a/reflog-walk.c
+++ b/reflog-walk.c
@@ -70,7 +70,7 @@ static int get_reflog_recno_by_time(struct complete_reflogs *array,
 	unsigned long timestamp)
 {
 	int i;
-	for (i = array->nr - 1; i >= 0; i++)
+	for (i = array->nr - 1; i >= 0; i--)
 		if (timestamp >= array->items[i].timestamp)
 			return i;
 	return -1;
-- 
1.5.0.rc1.gd85c
Next: Johannes Schindelin
Message 1 of 8 in “--walk-reflogs: actually find the right commit by date.”
  1. --walk-reflogs: actually find the right commit by date.Johannes Schindelin, Jan 20, 2007
  2. Johannes SchindelinJan 20, 2007
  3. Junio C HamanoJan 20, 2007
  4. Johannes SchindelinJan 20, 2007
  5. Junio C HamanoJan 21, 2007
  6. Johannes SchindelinJan 21, 2007
  7. Junio C HamanoJan 21, 2007
  8. Johannes SchindelinJan 21, 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.