diff: add option to show context between close hunks
[gitweb.git] / git-relink.perl
index f6b4f6a2f81767fdcb2ccadbf7757eaa2b556c36..937c69a74858a8a3c63bb41a23705b579df1b3a3 100755 (executable)
@@ -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;
@@ -163,7 +163,7 @@ ($$)
 
 
 sub usage() {
-       print("Usage: $0 [--safe] <dir> [<dir> ...] <master_dir> \n");
+       print("Usage: git relink [--safe] <dir> [<dir> ...] <master_dir> \n");
        print("All directories should contain a .git/objects/ subdirectory.\n");
        print("Options\n");
        print("\t--safe\t" .