const char *ref, *it;
strcpy(path, mkpath(*p, len, str));
- ref = resolve_ref(path, hash, 0, NULL);
+ ref = resolve_ref(path, hash, 1, NULL);
if (!ref)
continue;
if (!stat(git_path("logs/%s", path), &st) &&
}
if (0 <= nth)
at_time = 0;
- else
- at_time = approxidate(str + at + 2);
+ else {
+ char *tmp = xstrndup(str + at + 2, reflog_len);
+ at_time = approxidate(tmp);
+ free(tmp);
+ }
if (read_ref_at(real_ref, at_time, nth, sha1, NULL,
&co_time, &co_tz, &co_cnt)) {
if (at_time)