summaryrefslogtreecommitdiff
path: root/make/git.mk
blob: 2c8c8274a496e33b3ffd6ca6b3419c7f18795377 (plain)
  1. # main local branch (the one we want checked out)
  2. master = master
  3. # all local branches (including those needed by child clones)
  4. branches = $(master)
  5. # local name of origin
  6. origin = origin
  7. allbranches = $(sort $(master) $(branches))
  8. currentbranch := $(shell git branch | grep ^\* | awk '{ print $2 }')
  9. noncurrentbranches := $(filter-out $(currentbranch),$(branches))
  10. #originbranches := $(shell git branch -r | perl -ne 'm,^.\s+'"$$origin"'/([a-z_]\S+)$, && print "$$1\n"' )
  11. localbranches := $(shell git branch | perl -ne 'm,^.\s+([a-z_]\S+)$$, && print "$$1\n"' )
  12. update:
  13. git fetch $(origin)
  14. for branch in $(filter-out $(localbranches),$(allbranches)); do \
  15. git branch $$branch $(origin)/$$branch; \
  16. done
  17. for branch in $(noncurrentbranches); do \
  18. git checkout $$branch; \
  19. git pull $(origin); \
  20. done
  21. git checkout $(master)
  22. git pull $(origin)
  23. init:
  24. git init
  25. git remote add -f -m "$(master)" origin "$(origin)"
  26. git merge origin
  27. # git config remote.origin.push +"refs/heads/$(master)":"refs/heads/$(master)"
  28. .PHONY: update init
='graph'>
-rw-r--r--tags/6f/cb/20160911150001.692413D25@lxp5.free-owl.de/sys0
-rw-r--r--tags/6f/cb/20160911150001.692413D25@lxp5.free-owl.de/unread0
-rw-r--r--tags/6f/cb/20170703020242.B14C671A1@lxp5.free-owl.de/sys0
-rw-r--r--tags/6f/cb/20170703020242.B14C671A1@lxp5.free-owl.de/unread0
-rw-r--r--tags/6f/cb/20190515140001.C88E31CD27E@lxp5.free-owl.de/sys0
-rw-r--r--tags/6f/cb/20190515140001.C88E31CD27E@lxp5.free-owl.de/unread0
-rw-r--r--tags/6f/cb/20190811140002.178A61CD53E@lxp5.free-owl.de/sys0
-rw-r--r--tags/6f/cb/20190811140002.178A61CD53E@lxp5.free-owl.de/unread0
-rw-r--r--tags/6f/cb/20210128050439.0EC7E1BD@jawa.homebase.dk/hb0
-rw-r--r--tags/6f/cb/20210128050439.0EC7E1BD@jawa.homebase.dk/sys0
-rw-r--r--tags/6f/cb/20210128050439.0EC7E1BD@jawa.homebase.dk/unread0
-rw-r--r--tags/6f/cb/4230758E.3090404@jones.dk/debian0
-rw-r--r--tags/6f/cb/4230758E.3090404@jones.dk/sent0
-rw-r--r--tags/6f/cb/handler.s.B950405.16120553951099.transcript@bugs.debian.org/debian0
-rw-r--r--tags/6f/cb/handler.s.B950405.16120553951099.transcript@bugs.debian.org/inbox0
-rw-r--r--tags/6f/cb/handler.s.B950405.16120553951099.transcript@bugs.debian.org/killed0
-rw-r--r--tags/6f/cb/handler.s.B950405.16120553951099.transcript@bugs.debian.org/unread0
28 files changed, 0 insertions, 0 deletions