summaryrefslogtreecommitdiff
path: root/sync-all
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-12-02 17:44:04 +0000
committerIan Lynagh <ian@well-typed.com>2012-12-02 17:44:04 +0000
commitccce9fe6d3f5508412d3229151763355c440d27d (patch)
treef6c6263fe2a5da2e30a416b750a20d6f61268fde /sync-all
parent8fd3f3cebaccd270e10bc7b288a169ea9d0d5e29 (diff)
downloadhaskell-ccce9fe6d3f5508412d3229151763355c440d27d.tar.gz
When pulling, only 'fetch' in submodules
Diffstat (limited to 'sync-all')
-rwxr-xr-xsync-all11
1 files changed, 10 insertions, 1 deletions
diff --git a/sync-all b/sync-all
index 04bbd19155..4a8387d8cb 100755
--- a/sync-all
+++ b/sync-all
@@ -379,7 +379,16 @@ sub scmall {
scm ($localpath, $scm, "push", @args);
}
elsif ($command eq "pull") {
- scm ($localpath, $scm, "pull", @args);
+ my $realcmd;
+ if ($remotepath eq "-") {
+ # Only fetch for the submodules. "git submodule update"
+ # will take care of making us point to the right commit.
+ $realcmd = "fetch";
+ }
+ else {
+ $realcmd = "pull";
+ }
+ scm ($localpath, $scm, $realcmd, @args);
}
elsif ($command eq "new-workdir") {
gitNewWorkdir ($localpath, @args);