From: Johannes Schindelin Date: Sat, 20 Jan 2007 09:49:15 +0000 (+0100) Subject: --walk-reflogs: actually find the right commit by date. X-Git-Tag: v1.5.0-rc2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=40ab7c33cd6dfdf887ed15baee1325ee445eced7;p=git.git --walk-reflogs: actually find the right commit by date. Embarassing thinko. Signed-off-by: Johannes Schindelin --- diff --git a/reflog-walk.c b/reflog-walk.c index 8ccbe9776..8e2cd2fcf 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;