Code

--walk-reflogs: actually find the right commit by date.
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>
Sat, 20 Jan 2007 09:49:15 +0000 (10:49 +0100)
committerJunio C Hamano <junkio@cox.net>
Sun, 21 Jan 2007 05:32:31 +0000 (21:32 -0800)
Embarassing thinko.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
reflog-walk.c

index 8ccbe97760009745b9bbbb123691dcfb7072c87e..8e2cd2fcf603cdcf667b8d5d9c61a6ce902dd189 100644 (file)
@@ -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;