summaryrefslogtreecommitdiff
path: root/sync-all
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-04-05 11:08:35 +0100
committerSimon Marlow <marlowsd@gmail.com>2011-04-05 12:20:06 +0100
commitc3740c90e450910f3921eab862f174dcd73b1363 (patch)
tree3f05fa42c3c16fd14189c61df4fc6d36266e0128 /sync-all
parentdb485571de4216b379fad54b377fa970d204bcae (diff)
downloadhaskell-c3740c90e450910f3921eab862f174dcd73b1363.tar.gz
'fetch' and 'new' can take branch names as arguments (defaulting to 'origin')
e.g. ./sync-all -r ~/git/ghc-working remote add working ./sync-all fetch working
Diffstat (limited to 'sync-all')
-rwxr-xr-xsync-all10
1 files changed, 8 insertions, 2 deletions
diff --git a/sync-all b/sync-all
index e4cb40e061..2f4797484a 100755
--- a/sync-all
+++ b/sync-all
@@ -238,6 +238,12 @@ sub scmall {
if ($subcommand ne 'add' && $subcommand ne 'rm') {
help();
}
+ } elsif ($command eq 'new' || $command eq 'fetch') {
+ if (@_ < 1) {
+ $branch_name = 'origin';
+ } else {
+ $branch_name = shift;
+ }
}
for $line (@packages) {
@@ -316,10 +322,10 @@ sub scmall {
@scm_args = ("remote", "set-url", "--push", "origin", $path);
}
elsif ($command =~ /^fetch$/) {
- @scm_args = ("fetch", "origin");
+ @scm_args = ("fetch", "$branch_name");
}
elsif ($command =~ /^new$/) {
- @scm_args = ("log", "origin..");
+ @scm_args = ("log", "$branch_name..");
}
elsif ($command =~ /^remote$/) {
if ($subcommand eq 'add') {