From: Stephen Haberman Date: Thu, 10 Jul 2008 18:02:12 +0000 (-0500) Subject: Follow along with GitNotes. X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d60b8ee021b8533e5c4673aafe08a616c6395912;p=git-central.git Follow along with GitNotes. --- diff --git a/tests/t9000-notes.sh b/tests/t9000-notes.sh new file mode 100644 index 0000000..9034f21 --- /dev/null +++ b/tests/t9000-notes.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +test_description='sanity check of commands listed in GitNotes' + +. ./test-lib.sh + +test_expect_success 'setup' ' + echo setup >a && + git add a && + git commit -m "a" && + git clone ./. server && + git remote add origin ./server && + rm -fr server/.git/hooks + + git checkout -b stable && + git push origin stable && + git config --add branch.stable.remote origin && + git config --add branch.stable.merge refs/heads/stable +' + +test_expect_success 'make a new local/remote branch' ' + git fetch && + git checkout -b hotfix2 origin/stable && + git push origin hotfix2 && + + # Initially we are still setup to pull from stable + git config --list | grep branch.hotfix2.merge=refs/heads/stable && + git config --replace-all branch.hotfix2.merge refs/heads/hotfix2 && + + # But we want to pull from the new hotfix2 instead + git config --list | grep branch.hotfix2.merge=refs/heads/hotfix2 +' + +test_expect_success 'make a new local branch' ' + # Remove the old hotfix2 local branch + git checkout origin/hotfix2 && + git branch -d hotfix2 && + + # Now back to the real commands + git fetch && + git checkout -b hotfix2 origin/hotfix2 +' + +test_done +