Skip to content

Commit 0eab8ca

Browse files
drafnelgitster
authored andcommitted
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>
1 parent c1dcf7e commit 0eab8ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-relink.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
opendir(D,$master_dir . "objects/")
4141
or die "Failed to open $master_dir/objects/ : $!";
4242

43-
my @hashdirs = grep !/^\.{1,2}$/, readdir(D);
43+
my @hashdirs = grep { ($_ eq 'pack') || /^[0-9a-f]{2}$/ } readdir(D);
4444

4545
foreach my $repo (@dirs) {
4646
$linked = 0;

0 commit comments

Comments
 (0)