summaryrefslogtreecommitdiff
path: root/t/t3200-branch.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-07-21 19:47:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-07-21 19:54:48 (GMT)
commit6e6842e36f8c6c12ae0ddd7db98cd900b25bb8dc (patch)
tree1051969ab2b08d04431f2c44fd89b8f8479c5415 /t/t3200-branch.sh
parentb1edaf669d483e983f1849ce804baa178387e9a9 (diff)
downloadgit-6e6842e36f8c6c12ae0ddd7db98cd900b25bb8dc.zip
git-6e6842e36f8c6c12ae0ddd7db98cd900b25bb8dc.tar.gz
git-6e6842e36f8c6c12ae0ddd7db98cd900b25bb8dc.tar.bz2
tests: correct "does reflog exist?" tests
These two tests weren't about how "git reflog show <branch>" exits when there is no reflog, but were about "checkout" and "branch" create or not create reflog when creating a new <branch>. Update the tests to check what we are interested in, using "git rev-parse --verify". Also lose tests based on "test -f .git/logs/refs/heads/<branch>" from nearby, to avoid exposing this particular implementation detail unnecessarily. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3200-branch.sh')
-rwxr-xr-xt/t3200-branch.sh13
1 files changed, 3 insertions, 10 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index bf7747d..f54a533 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -228,28 +228,21 @@ test_expect_success 'checkout -b makes reflog by default' '
git checkout master &&
git config --unset core.logAllRefUpdates &&
git checkout -b alpha &&
- test -f .git/logs/refs/heads/alpha &&
- PAGER= git reflog show alpha
+ git rev-parse --verify alpha@{0}
'
test_expect_success 'checkout -b does not make reflog when core.logAllRefUpdates = false' '
git checkout master &&
git config core.logAllRefUpdates false &&
git checkout -b beta &&
- ! test -f .git/logs/refs/heads/beta &&
- (
- PAGER= &&
- export PAGER &&
- test_must_fail git reflog show beta
- )
+ test_must_fail git rev-parse --verify beta@{0}
'
test_expect_success 'checkout -b with -l makes reflog when core.logAllRefUpdates = false' '
git checkout master &&
git checkout -lb gamma &&
git config --unset core.logAllRefUpdates &&
- test -f .git/logs/refs/heads/gamma &&
- PAGER= git reflog show gamma
+ git rev-parse --verify gamma@{0}
'
test_expect_success 'avoid ambiguous track' '