summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--reflog-walk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/reflog-walk.c b/reflog-walk.c
index 8ccbe97..8e2cd2f 100644
--- a/reflog-walk.c
+++ b/reflog-walk.c
@@ -71,7 +71,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;