summaryrefslogtreecommitdiff
path: root/t/t3200-branch.sh
diff options
context:
space:
mode:
authorDavid Turner <dturner@twopensource.com>2015-07-27 22:57:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-07-28 18:46:46 (GMT)
commitd0ab058498cf3f1862de76b419abc0b67fabbd83 (patch)
tree08f04f7451dd8104b1e085238932b90fc66cf31d /t/t3200-branch.sh
parent86b601c5d89f3002e205ec34625011d256e7733f (diff)
downloadgit-d0ab058498cf3f1862de76b419abc0b67fabbd83.zip
git-d0ab058498cf3f1862de76b419abc0b67fabbd83.tar.gz
git-d0ab058498cf3f1862de76b419abc0b67fabbd83.tar.bz2
tests: remove some direct access to .git/logs
Alternate refs backends might store reflogs somewhere other than .git/logs. Change most test code that directly accesses .git/logs to instead use git reflog commands. There are still a few tests which need direct access to reflogs: to check reflog permissions, to manually create reflogs from scratch, to save/restore reflogs, to check the format of raw reflog data, and to remove not just reflog contents, but the reflogs themselves. All cases which don't need direct access have been modified. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3200-branch.sh')
-rwxr-xr-xt/t3200-branch.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index ddea498..cdaf6f6 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -59,7 +59,7 @@ test_expect_success 'git branch -l d/e/f should create a branch and a log' '
test_expect_success 'git branch -d d/e/f should delete a branch and a log' '
git branch -d d/e/f &&
test_path_is_missing .git/refs/heads/d/e/f &&
- test_path_is_missing .git/logs/refs/heads/d/e/f
+ test_must_fail git reflog exists refs/heads/d/e/f
'
test_expect_success 'git branch j/k should work after branch j has been deleted' '
@@ -82,13 +82,13 @@ test_expect_success 'git branch -m dumps usage' '
test_expect_success 'git branch -m m m/m should work' '
git branch -l m &&
git branch -m m m/m &&
- test_path_is_file .git/logs/refs/heads/m/m
+ git reflog exists refs/heads/m/m
'
test_expect_success 'git branch -m n/n n should work' '
git branch -l n/n &&
git branch -m n/n n &&
- test_path_is_file .git/logs/refs/heads/n
+ git reflog exists refs/heads/n
'
test_expect_success 'git branch -m o/o o should fail when o/p exists' '
@@ -267,12 +267,12 @@ git config branch.s/s.dummy Hello
test_expect_success 'git branch -m s/s s should work when s/t is deleted' '
git branch -l s/s &&
- test_path_is_file .git/logs/refs/heads/s/s &&
+ git reflog exists refs/heads/s/s &&
git branch -l s/t &&
- test_path_is_file .git/logs/refs/heads/s/t &&
+ git reflog exists refs/heads/s/t &&
git branch -d s/t &&
git branch -m s/s s &&
- test_path_is_file .git/logs/refs/heads/s
+ git reflog exists refs/heads/s
'
test_expect_success 'config information was renamed, too' '