]> git.ipfire.org Git - thirdparty/git.git/blobdiff - refs.c
get_oid_basic(): special-case ref@{n} for oldest reflog entry
[thirdparty/git.git] / refs.c
diff --git a/refs.c b/refs.c
index ba1a4db754c8dc7dd533840bc48b10a790010da4..6b826b002e3b15db0889cf06b54eeccf6ea532ba 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -1083,7 +1083,7 @@ static int read_ref_at_ent_oldest(struct object_id *ooid, struct object_id *noid
 
        set_read_ref_cutoffs(cb, timestamp, tz, message);
        oidcpy(cb->oid, ooid);
-       if (is_null_oid(cb->oid))
+       if (cb->at_time && is_null_oid(cb->oid))
                oidcpy(cb->oid, noid);
        /* We just want the first entry */
        return 1;