diff options
author | Jonas Smedegaard <dr@jones.dk> | 2008-06-14 13:07:58 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2008-06-14 13:07:58 +0200 |
commit | 1da62670810ccb26988c676982ab29d3f407183f (patch) | |
tree | 4b3397e696c1c67584bbfd83ef0e918efcb79e40 /make | |
parent | 28564376b810bd3040256827dea6c8ec0ea03a70 (diff) |
In update: fetch once, then for each branch (crate and) merge.
Diffstat (limited to 'make')
-rw-r--r-- | make/git.mk | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/make/git.mk b/make/git.mk index f8436f8..068e7f3 100644 --- a/make/git.mk +++ b/make/git.mk @@ -11,8 +11,10 @@ currentbranch = $(shell git branch | grep ^\* | awk '{ print $2 }') noncurrentbranches = $(filter-out $(currentbranch),$(branches)) update: - $(if $(filter $(currentbranch),$(master)),,git checkout "$(master)") - git pull + git fetch $(origin) + $(if $(filter $(currentbranch),$(master)),,git branch -f "$(master)" "$(origin)/$(master)" && git checkout "$(master)") + git merge --no-commit "$(origin)" + $(if $(noncurrentbranches),$(foreach branch,$(noncurrentbranches),git branch -f "$(branch)" "$(origin)/$(branch)" && git checkout "$(branch)" && git merge --no-commit "$(origin)" &&) git checkout "$(master)") init: # Assume that initial cloning is done already when invoking this target |