Skip to content

Commit

Permalink
t/t7509: remove unnecessary manipulation of reflog
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Turner authored and Junio C Hamano committed Jul 28, 2015
1 parent ca00f80 commit 86b601c
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions t/t7509-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,10 @@ sha1_file() {
remove_object() {
rm -f $(sha1_file "$*")
}
no_reflog() {
cp .git/config .git/config.saved &&
echo "[core] logallrefupdates = false" >>.git/config &&
test_when_finished "mv -f .git/config.saved .git/config" &&

if test -e .git/logs
then
mv .git/logs . &&
test_when_finished "mv logs .git/"
fi
}

test_expect_success '--amend option with empty author' '
git cat-file commit Initial >tmp &&
sed "s/author [^<]* </author </" tmp >empty-author &&
no_reflog &&
sha=$(git hash-object -t commit -w empty-author) &&
test_when_finished "remove_object $sha" &&
git checkout $sha &&
Expand All @@ -119,7 +107,6 @@ test_expect_success '--amend option with empty author' '
test_expect_success '--amend option with missing author' '
git cat-file commit Initial >tmp &&
sed "s/author [^<]* </author </" tmp >malformed &&
no_reflog &&
sha=$(git hash-object -t commit -w malformed) &&
test_when_finished "remove_object $sha" &&
git checkout $sha &&
Expand Down

0 comments on commit 86b601c

Please sign in to comment.