From 0eab8ca68ad7bfcbb7c0aff37985116cbbdacd44 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Tue, 29 Jan 2008 16:41:30 -0600 Subject: 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 Signed-off-by: Junio C Hamano --- git-relink.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-relink.perl') diff --git a/git-relink.perl b/git-relink.perl index f6b4f6a2f..15fb93202 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; -- cgit v1.2.1 From 1b1dd23f2d6a707b7077cdf6bc6d4055bd0bfb7d Mon Sep 17 00:00:00 2001 From: Stephan Beyer Date: Sun, 13 Jul 2008 15:36:15 +0200 Subject: Make usage strings dash-less When you misuse a git command, you are shown the usage string. But this is currently shown in the dashed form. So if you just copy what you see, it will not work, when the dashed form is no longer supported. This patch makes git commands show the dash-less version. For shell scripts that do not specify OPTIONS_SPEC, git-sh-setup.sh generates a dash-less usage string now. Signed-off-by: Stephan Beyer Signed-off-by: Junio C Hamano --- git-relink.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-relink.perl') diff --git a/git-relink.perl b/git-relink.perl index 15fb93202..937c69a74 100755 --- a/git-relink.perl +++ b/git-relink.perl @@ -163,7 +163,7 @@ sub link_two_files($$) { sub usage() { - print("Usage: $0 [--safe] [ ...] \n"); + print("Usage: git relink [--safe] [ ...] \n"); print("All directories should contain a .git/objects/ subdirectory.\n"); print("Options\n"); print("\t--safe\t" . -- cgit v1.2.1