git-relink: avoid hard linking in objects/info directory
git-relink is intended to search for packs and loose objects in common between two repositories and to replace the one set with hard links to the other. Files other than packs and loose objects should not be touched, so add the "info" sub-directory to the pattern of directory excludes. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Casey committed
Jan 29, 2008 at 16:41 UTC
0eab8ca68ad7bfcbb7c0aff37985116cbbdacd44
1 file changed
+1
-1
git-relink.perl
+1
-1
@@ -40,7 +40,7 @@ my $master_dir = pop @dirs;
40
opendir(D,$master_dir . "objects/")
41
or die "Failed to open $master_dir/objects/ : $!";
42
43
-my @hashdirs = grep !/^\.{1,2}$/, readdir(D);
43
+my @hashdirs = grep { ($_ eq 'pack') || /^[0-9a-f]{2}$/ } readdir(D);
44
45
foreach my $repo (@dirs) {
46
$linked = 0;