update-ref: add test cases for bare repository
authorCornelius Weig <cornelius.weig@tngtech.com>
Fri, 27 Jan 2017 10:09:48 +0000 (11:09 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 31 Jan 2017 18:01:24 +0000 (10:01 -0800)
commitb1421a43d5e28d71dc89b99877c3fbcb845aae08
tree3f220ce664cb10383f52fb0a0e7ab75c6e7dc80d
parent341fb28621201c5e6c9d3fee5baf7c532fa8a618
update-ref: add test cases for bare repository

The default behavior of update-ref to create reflogs differs in
repositories with worktree and bare ones. The existing tests cover only
the behavior of repositories with worktree.

This commit adds tests that assert the correct behavior in bare
repositories for update-ref. Two cases are covered:

 - If core.logAllRefUpdates is not set, no reflogs should be created
 - If core.logAllRefUpdates is true, reflogs should be created

Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1400-update-ref.sh