t/t7509: remove unnecessary manipulation of reflog
Remove unnecessary reflog manipulation. The test does not rely in any way on this reflog manipulation, and the case that the test exercises is unrelated to reflogs. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
David Turner committed
Jul 27, 2015 at 18:57 UTC
86b601c5d89f3002e205ec34625011d256e7733f
1 file changed
-13
t/t7509-commit.sh
-13
@@ -90,22 +90,10 @@ sha1_file() {
90
remove_object() {
91
rm -f $(sha1_file "$*")
92
}
93
-no_reflog() {
94
- cp .git/config .git/config.saved &&
95
- echo "[core] logallrefupdates = false" >>.git/config &&
96
- test_when_finished "mv -f .git/config.saved .git/config" &&
97
-
98
- if test -e .git/logs
99
- then
100
- mv .git/logs . &&
101
- test_when_finished "mv logs .git/"
102
- fi
103
-}
93
94
test_expect_success '--amend option with empty author' '
95
git cat-file commit Initial >tmp &&
96
sed "s/author [^<]* </author </" tmp >empty-author &&
108
- no_reflog &&
97
sha=$(git hash-object -t commit -w empty-author) &&
98
test_when_finished "remove_object $sha" &&
99
git checkout $sha &&
@@ -119,7 +107,6 @@ test_expect_success '--amend option with empty author' '
107
test_expect_success '--amend option with missing author' '
108
git cat-file commit Initial >tmp &&
109
sed "s/author [^<]* </author </" tmp >malformed &&
122
- no_reflog &&
110
sha=$(git hash-object -t commit -w malformed) &&
111
test_when_finished "remove_object $sha" &&
112
git checkout $sha &&