author | Junio C Hamano <gitster@pobox.com> | |
Tue, 31 Aug 2010 23:14:27 +0000 (16:14 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 31 Aug 2010 23:14:27 +0000 (16:14 -0700) |
* sg/rerere-gc-old-still-used:
rerere: fix overeager gc
mingw_utime(): handle NULL times parameter
rerere: fix overeager gc
mingw_utime(): handle NULL times parameter
1 | 2 | |||
---|---|---|---|---|
builtin/rerere.c | patch | | diff1 | | diff2 | | blob | history |
compat/mingw.c | patch | | diff1 | | diff2 | | blob | history |
rerere.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc builtin/rerere.c
index 9b1e3a7cf50674ffdd834d08edba184f5c7c285d,6d1b5802add040b7189630077c1bc10b82f76756..67793fa2c795777b02c340551a5c4cee152ff68b
--- 1/builtin/rerere.c
--- 2/builtin/rerere.c
+++ b/builtin/rerere.c
while ((e = readdir(dir))) {
if (is_dot_or_dotdot(e->d_name))
continue;
- then = rerere_created_at(e->d_name);
- if (!then)
- continue;
- cutoff = (has_rerere_resolution(e->d_name)
- ? cutoff_resolve : cutoff_noresolve);
+
+ then = rerere_last_used_at(e->d_name);
+ if (then) {
+ cutoff = cutoff_resolve;
+ } else {
+ then = rerere_created_at(e->d_name);
+ if (!then)
+ continue;
+ cutoff = cutoff_noresolve;
+ }
if (then < now - cutoff * 86400)
- string_list_append(e->d_name, &to_remove);
+ string_list_append(&to_remove, e->d_name);
}
for (i = 0; i < to_remove.nr; i++)
unlink_rr_item(to_remove.items[i].string);
diff --cc compat/mingw.c
Simple merge
diff --cc rerere.c
Simple merge