Skip to content

Commit

Permalink
git-relink: avoid hard linking in objects/info directory
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Brandon Casey authored and Junio C Hamano committed Jan 30, 2008
1 parent c1dcf7e commit 0eab8ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-relink.perl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
opendir(D,$master_dir . "objects/")
or die "Failed to open $master_dir/objects/ : $!";

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

foreach my $repo (@dirs) {
$linked = 0;
Expand Down

0 comments on commit 0eab8ca

Please sign in to comment.