summaryrefslogtreecommitdiffstats
path: root/git-relink.perl
diff options
context:
space:
mode:
authorBrandon Casey <casey@nrlssc.navy.mil>2008-01-29 23:41:30 +0100
committerJunio C Hamano <gitster@pobox.com>2008-01-30 09:01:27 +0100
commit0eab8ca68ad7bfcbb7c0aff37985116cbbdacd44 (patch)
tree2f7d820d5bc22aa240fd2f4936f123703124b65d /git-relink.perl
parentgitweb: Make use of the $git_dir variable at sub git_get_project_description (diff)
downloadgit-0eab8ca68ad7bfcbb7c0aff37985116cbbdacd44.tar.xz
git-0eab8ca68ad7bfcbb7c0aff37985116cbbdacd44.zip
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>
Diffstat (limited to 'git-relink.perl')
-rwxr-xr-xgit-relink.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-relink.perl b/git-relink.perl
index f6b4f6a2f8..15fb932021 100755
--- a/git-relink.perl
+++ b/git-relink.perl
@@ -40,7 +40,7 @@ my $master_dir = pop @dirs;
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;