@@ -69,7 +69,11 @@ test_expect_success '--orphan makes reflog by default' '
6969 git config --unset core.logAllRefUpdates &&
7070 git checkout --orphan delta &&
7171 ! test -f .git/logs/refs/heads/delta &&
72- test_must_fail PAGER= git reflog show delta &&
72+ (
73+ PAGER= &&
74+ export PAGER &&
75+ test_must_fail git reflog show delta
76+ ) &&
7377 git commit -m Delta &&
7478 test -f .git/logs/refs/heads/delta &&
7579 PAGER= git reflog show delta
@@ -80,17 +84,29 @@ test_expect_success '--orphan does not make reflog when core.logAllRefUpdates =
8084 git config core.logAllRefUpdates false &&
8185 git checkout --orphan epsilon &&
8286 ! test -f .git/logs/refs/heads/epsilon &&
83- test_must_fail PAGER= git reflog show epsilon &&
87+ (
88+ PAGER= &&
89+ export PAGER &&
90+ test_must_fail git reflog show epsilon
91+ ) &&
8492 git commit -m Epsilon &&
8593 ! test -f .git/logs/refs/heads/epsilon &&
86- test_must_fail PAGER= git reflog show epsilon
94+ (
95+ PAGER= &&
96+ export PAGER &&
97+ test_must_fail git reflog show epsilon
98+ )
8799'
88100
89101test_expect_success ' --orphan with -l makes reflog when core.logAllRefUpdates = false' '
90102 git checkout master &&
91103 git checkout -l --orphan zeta &&
92104 test -f .git/logs/refs/heads/zeta &&
93- test_must_fail PAGER= git reflog show zeta &&
105+ (
106+ PAGER= &&
107+ export PAGER &&
108+ test_must_fail git reflog show zeta
109+ ) &&
94110 git commit -m Zeta &&
95111 PAGER= git reflog show zeta
96112'
@@ -99,10 +115,18 @@ test_expect_success 'giving up --orphan not committed when -l and core.logAllRef
99115 git checkout master &&
100116 git checkout -l --orphan eta &&
101117 test -f .git/logs/refs/heads/eta &&
102- test_must_fail PAGER= git reflog show eta &&
118+ (
119+ PAGER= &&
120+ export PAGER &&
121+ test_must_fail git reflog show eta
122+ ) &&
103123 git checkout master &&
104124 ! test -f .git/logs/refs/heads/eta &&
105- test_must_fail PAGER= git reflog show eta
125+ (
126+ PAGER= &&
127+ export PAGER &&
128+ test_must_fail git reflog show eta
129+ )
106130'
107131
108132test_expect_success ' --orphan is rejected with an existing name' '
0 commit comments