Skip to content

Commit

Permalink
Don't automatically merge from followed branch on git pull.
Browse files Browse the repository at this point in the history
Use branch.$(my-branch).follow instead of branch.$(my-branch).merge to
record branch to follow and explicitly merge on make merge.
  • Loading branch information
Andreas Schwab committed Jun 18, 2009
1 parent 9d1b9fc commit 6bdb5f2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fedora/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ branchname = $(patsubst refs/heads/%,%,$1)

my-branch := $(call branchname,$(call git,symbolic-ref,HEAD))
upstream-remote := $(call gitconf,branch.$(my-branch).remote)
upstream-branch := $(call branchname,$(call gitconf,branch.$(my-branch).merge))
upstream-branch := $(call branchname,$(call gitconf,branch.$(my-branch).follow))

dep-my-branch := $(firstword $(wildcard ../.git/refs/heads/$(my-branch) \
../.git/packed-refs))
Expand All @@ -30,7 +30,7 @@ ifeq (,$(branch))
@echo "Use '$(MAKE) follow branch=NAME'"; exit 2
else
$(GIT) rev-parse --verify $(upstream-remote)/$(branch)
$(GIT) config branch.$(my-branch).merge $(branch)
$(GIT) config branch.$(my-branch).follow $(branch)
@$(GIT) branch -v | grep "^. $(subst .,\\.,$(my-branch)) "
endif

Expand All @@ -39,6 +39,7 @@ endif
# Then you follow up with editting, 'git add FILE...', and git commit.
merge:
$(GIT) pull
$(GIT) merge $(upstream-remote)/$(upstream-branch)

describe-merge = describe --match 'glibc-*'

Expand Down

0 comments on commit 6bdb5f2

Please sign in to comment.