Permalink
Browse files

Dropping post-checkout-rebase in favor of pull that does -i-p right.

  • Loading branch information...
1 parent 24f8e9d commit 076b1be21583d6f7d0561218f80aeb907e3ef3c6 @stephenh committed Nov 12, 2008
Showing with 0 additions and 67 deletions.
  1. +0 −26 client/post-checkout-rebase
  2. +0 −41 tests/t1100-post-commit-rebase.sh
@@ -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
-
@@ -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
-

0 comments on commit 076b1be

Please sign in to comment.