260
rm -f .git/logs/refs/heads/master
261
test_expect_success \
262
"create $m (logged by touch)" \
263
- 'GIT_COMMITTER_DATE="2005-05-26 23:30" \
263
+ 'test_config core.logAllRefUpdates false &&
264
+ GIT_COMMITTER_DATE="2005-05-26 23:30" \
265
git update-ref --create-reflog HEAD '"$A"' -m "Initial Creation" &&
266
test '"$A"' = $(cat .git/'"$m"')'
267
test_expect_success \
268
"update $m (logged by touch)" \
268
- 'GIT_COMMITTER_DATE="2005-05-26 23:31" \
269
+ 'test_config core.logAllRefUpdates false &&
270
+ GIT_COMMITTER_DATE="2005-05-26 23:31" \
271
git update-ref HEAD'" $B $A "'-m "Switch" &&
272
test '"$B"' = $(cat .git/'"$m"')'
273
test_expect_success \
274
"set $m (logged by touch)" \
273
- 'GIT_COMMITTER_DATE="2005-05-26 23:41" \
275
+ 'test_config core.logAllRefUpdates false &&
276
+ GIT_COMMITTER_DATE="2005-05-26 23:41" \
277
git update-ref HEAD'" $A &&
278
test $A"' = $(cat .git/'"$m"')'
279
314
"test_cmp expect .git/logs/$m"
315
rm -rf .git/$m .git/logs expect
316
314
-test_expect_success \
315
- 'enable core.logAllRefUpdates' \
316
- 'git config core.logAllRefUpdates true &&
317
- test true = $(git config --bool --get core.logAllRefUpdates)'
318
-
317
test_expect_success \
318
"create $m (logged by config)" \
321
- 'GIT_COMMITTER_DATE="2005-05-26 23:32" \
319
+ 'test_config core.logAllRefUpdates true &&
320
+ GIT_COMMITTER_DATE="2005-05-26 23:32" \
321
git update-ref HEAD'" $A "'-m "Initial Creation" &&
322
test '"$A"' = $(cat .git/'"$m"')'
323
test_expect_success \
324
"update $m (logged by config)" \
326
- 'GIT_COMMITTER_DATE="2005-05-26 23:33" \
325
+ 'test_config core.logAllRefUpdates true &&
326
+ GIT_COMMITTER_DATE="2005-05-26 23:33" \
327
git update-ref HEAD'" $B $A "'-m "Switch" &&
328
test '"$B"' = $(cat .git/'"$m"')'
329
test_expect_success \
330
"set $m (logged by config)" \
331
- 'GIT_COMMITTER_DATE="2005-05-26 23:43" \
331
+ 'test_config core.logAllRefUpdates true &&
332
+ GIT_COMMITTER_DATE="2005-05-26 23:43" \
333
git update-ref HEAD '"$A &&
334
test $A"' = $(cat .git/'"$m"')'
335