From: Stephen Haberman Date: Wed, 12 Nov 2008 06:41:34 +0000 (-0600) Subject: Dropping post-checkout-rebase in favor of pull that does -i-p right. X-Git-Url: http://git.droids-corp.org/?p=git-central.git;a=commitdiff_plain;h=076b1be21583d6f7d0561218f80aeb907e3ef3c6 Dropping post-checkout-rebase in favor of pull that does -i-p right. --- diff --git a/client/post-checkout-rebase b/client/post-checkout-rebase deleted file mode 100644 index 423fb66..0000000 --- a/client/post-checkout-rebase +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -# $1 = previous hash -# $2 = new hash (could be the same) -# $3 = flag (0=retreiving from index, 1=new checkout) - -branch=$(git symbolic-ref --quiet HEAD) -if [[ $? -ne 0 ]] ; then - exit 0 -fi - -branch=${branch/refs\/heads\//} - -rebase=$(git config "branch.${branch}.rebase") -if [ $? -ne 0 ] ; then - git config "branch.${branch}.rebase" "true" -fi - -merge=$(git config "branch.${branch}.merge") -remote=$(git config "branch.${branch}.remote") -if [ "$branch" != "stable" -a "$remote" == "origin" -a "$merge" == "refs/heads/stable" ] ; then - git config "branch.${branch}.merge" "refs/heads/${branch}" -fi - -exit 0 - diff --git a/tests/t1100-post-commit-rebase.sh b/tests/t1100-post-commit-rebase.sh deleted file mode 100644 index f47364c..0000000 --- a/tests/t1100-post-commit-rebase.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -test_description='client checkout auto-set branch rebase=true' - -. ./test-lib.sh - -test_expect_success 'setup' ' - echo "setup" >file && - git add file && - git commit -m "setup" && - git clone . ./server && - git remote add origin ./server && - git config branch.master.remote origin && - git config branch.master.merge refs/heads/master -' - -# setup the post-checkout hook -install_post_checkout_hook 'post-checkout-rebase' - -test_expect_success 'sets rebase on new topic branch' ' - ! git config --list | grep branch.master.rebase && - git checkout -b topic master && - git config --list | grep branch.topic.rebase=true -' - -test_expect_success 'checking out remote branch does nothing' ' - git push origin topic:topic2 && - git fetch && - git checkout origin/topic2 && - ! git config --list | grep "branch..rebase" -' - -test_expect_success 'cloning stable sets up the correct merge' ' - git push origin topic:stable && - git fetch && - git checkout -b topic3 origin/stable && - test "refs/heads/topic3" = "$(git config branch.topic3.merge)" -' - -test_done -