From 6b37dff17f176d7e87efa93b4cf521dd725de247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sun, 6 Nov 2011 10:50:10 +0100 Subject: pull: introduce a pull.rebase option to enable --rebase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently we either need to set branch..rebase for existing branches if we'd like "git pull" to mean "git pull --rebase", or have the forethought of setting "branch.autosetuprebase" before we create the branch. Introduce a "pull.rebase" option to globally configure "git pull" to mean "git pull --rebase" for any branch. This option will be considered at a lower priority than branch..rebase, i.e. we could set pull.rebase=true and branch..rebase=false and the latter configuration option would win. Reviewed-by: Sverre Rabbelier Reviewed-by: Fernando Vezzosi Reviewed-by: Eric Herman Signed-off-by: Ævar Arnfjörð Bjarmason Liked-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- git-pull.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'git-pull.sh') diff --git a/git-pull.sh b/git-pull.sh index fb9e2df931..277ed40cdb 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -43,6 +43,10 @@ merge_args= curr_branch=$(git symbolic-ref -q HEAD) curr_branch_short="${curr_branch#refs/heads/}" rebase=$(git config --bool branch.$curr_branch_short.rebase) +if test -z "$rebase" +then + rebase=$(git config --bool pull.rebase) +fi dry_run= while : do -- cgit v1.2.3