Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix bug in list-dangling-repos

Still, I would advise caution if you use this as a basis for deleting
repos from the file system.  A bug in this program could cause you to
lose important data!
  • Loading branch information...
commit 3513f4a153a2ec9c5216ef11c84668107c4e409e 1 parent 4f46582
@sitaramc authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/commands/list-dangling-repos
View
6 src/commands/list-dangling-repos
@@ -12,6 +12,9 @@ List all existing repos that no one can access remotely any more. They could
be normal repos that were taken out of "repo" statements in the conf file, or
wildcard repos whose matching "wild" pattern was taken out or changed so it no
longer matches.
+
+I would advise caution if you use this as a basis for deleting repos from the
+file system. A bug in this program could cause you to lose important data!
=cut
usage() if @ARGV and $ARGV[0] eq '-h';
@@ -21,6 +24,9 @@ usage() if @ARGV and $ARGV[0] eq '-h';
# is to cull %phy_repos of all keys that have a matching key in %repos, where
# "matching" means "string equal" or "regex match".
my %repos = map { chomp; $_ => 1 } `gitolite list-repos`;
+for my $r ( grep /^@/, keys %repos ) {
+ map { chomp; $repos{$_} = 1; } `gitolite list-members $r`;
+}
my %phy_repos = map { chomp; $_ => 1 } `gitolite list-phy-repos`;
# Remove exact matches. But for repo names like "gtk+", you could have
Please sign in to comment.
Something went wrong with that request. Please try again.