summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2008-08-20 18:31:04 +0200
committerJonas Smedegaard <dr@jones.dk>2008-08-20 18:31:04 +0200
commit9c89fd65d8d48f2c967e58922143c5c19651c6c7 (patch)
tree955156635c558465c67973c675466ee73d03d9d9
parentdfc466fdf9f3f4d137e00f0200ca57752b951926 (diff)
parent5372326f884ddb654cf47edf9333eb9deed0b155 (diff)
Merge branch '_clean' into clean
-rw-r--r--make/git.mk11
1 files changed, 6 insertions, 5 deletions
diff --git a/make/git.mk b/make/git.mk
index 5595057..2c8c827 100644
--- a/make/git.mk
+++ b/make/git.mk
@@ -7,6 +7,7 @@ branches = $(master)
# local name of origin
origin = origin
+allbranches = $(sort $(master) $(branches))
currentbranch := $(shell git branch | grep ^\* | awk '{ print $2 }')
noncurrentbranches := $(filter-out $(currentbranch),$(branches))
@@ -15,15 +16,15 @@ localbranches := $(shell git branch | perl -ne 'm,^.\s+([a-z_]\S+)$$, && print "
update:
git fetch $(origin)
- for branch in $(filter-out $(localbranches),$(branches)); do \
- git branch $$branch $(origin)/$(branch); \
+ for branch in $(filter-out $(localbranches),$(allbranches)); do \
+ git branch $$branch $(origin)/$$branch; \
done
- git checkout $(master)
- git pull $(origin)
for branch in $(noncurrentbranches); do \
- git checkout $(branch); \
+ git checkout $$branch; \
git pull $(origin); \
done
+ git checkout $(master)
+ git pull $(origin)
init:
git init