Code

Merge branch 'master' of git://linux-nfs.org/~bfields/git
[git.git] / reflog-walk.c
index 8ccbe97760009745b9bbbb123691dcfb7072c87e..82621601d63fff25c46d96b0ade5058fe4e16a28 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;
@@ -233,7 +233,7 @@ void show_reflog_message(struct reflog_walk_info* info, int oneline)
                        else
                                printf("%d", commit_reflog->reflogs->nr
                                       - 2 - commit_reflog->recno);
-                       printf("}: ");
+                       printf("}: %s", info->message);
                }
                else {
                        printf("Reflog: %s@{", commit_reflog->reflogs->ref);