Skip to content

Commit

Permalink
improve import_rep script to push all branches and all tags
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki-kimoto committed Jul 20, 2013
1 parent aa299d5 commit 8216a2b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
17 changes: 14 additions & 3 deletions script/import_rep
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,20 @@ for my $rep (glob "$rep_dir/*") {
chdir $rep
or warn "Can't change directory $rep: $!\n";
my $remote_rep = "$FindBin::Bin/../data/rep/$user/$project.git";
my @cmd = ('git', 'push', '-u', $remote_rep, 'master');
system(@cmd) == 0
or warn "Can't push repository: @cmd";

# push branches
{
my @cmd = ('git', 'push', $remote_rep, '--all');
system(@cmd) == 0
or warn "Can't push branches: @cmd";
}

# push tags
{
my @cmd = ('git', 'push', $remote_rep, '--tags');
system(@cmd) == 0
or warn "Can't push tags: @cmd";
}
}
}

Expand Down
1 change: 1 addition & 0 deletions t/import_rep_test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./import_rep -u kimoto3 ../../gitprep_t_rep_home/kimoto

0 comments on commit 8216a2b

Please sign in to comment.