@@ -69,7 +69,11 @@ test_expect_success '--orphan makes reflog by default' '
69
69
git config --unset core.logAllRefUpdates &&
70
70
git checkout --orphan delta &&
71
71
! 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
+ ) &&
73
77
git commit -m Delta &&
74
78
test -f .git/logs/refs/heads/delta &&
75
79
PAGER= git reflog show delta
@@ -80,17 +84,29 @@ test_expect_success '--orphan does not make reflog when core.logAllRefUpdates =
80
84
git config core.logAllRefUpdates false &&
81
85
git checkout --orphan epsilon &&
82
86
! 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
+ ) &&
84
92
git commit -m Epsilon &&
85
93
! 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
+ )
87
99
'
88
100
89
101
test_expect_success ' --orphan with -l makes reflog when core.logAllRefUpdates = false' '
90
102
git checkout master &&
91
103
git checkout -l --orphan zeta &&
92
104
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
+ ) &&
94
110
git commit -m Zeta &&
95
111
PAGER= git reflog show zeta
96
112
'
@@ -99,10 +115,18 @@ test_expect_success 'giving up --orphan not committed when -l and core.logAllRef
99
115
git checkout master &&
100
116
git checkout -l --orphan eta &&
101
117
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
+ ) &&
103
123
git checkout master &&
104
124
! 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
+ )
106
130
'
107
131
108
132
test_expect_success ' --orphan is rejected with an existing name' '
0 commit comments