author | Clemens Buchacher <drizzd@aon.at> | |
Sat, 12 Sep 2009 09:03:48 +0000 (11:03 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 13 Sep 2009 08:32:26 +0000 (01:32 -0700) | ||
commit | f7835a251c2c98df152792b15793b03e22bf078e | |
tree | 0fd7e28732e775adfd11b511ab226dc76a8fdb33 | tree | snapshot |
parent | 41698375ada57d51cf6db5cf25970ccd1b918180 | commit | diff |
preserve mtime of local clone
A local clone without hardlinks copies all objects, including dangling
ones, to the new repository. Since the mtimes are renewed, those
dangling objects cannot be pruned by "git gc --prune", even if they
would have been old enough for pruning in the original repository.
Instead, preserve mtime during copy. "git gc --prune" will then work
in the clone just like it did in the original.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
A local clone without hardlinks copies all objects, including dangling
ones, to the new repository. Since the mtimes are renewed, those
dangling objects cannot be pruned by "git gc --prune", even if they
would have been old enough for pruning in the original repository.
Instead, preserve mtime during copy. "git gc --prune" will then work
in the clone just like it did in the original.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-clone.c | diff | blob | history | |
cache.h | diff | blob | history | |
copy.c | diff | blob | history |