t7700: consolidate code into test_has_duplicate_object()
commitcfe5eda02abddaaeb78c4e8bb31357112f0d5413
authorDenton Liu <liu.denton@gmail.com>
Wed, 4 Dec 2019 22:03:14 +0000 (4 14:03 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 4 Dec 2019 22:25:05 +0000 (4 14:25 -0800)
tree5781b36c2d74e39ebc57401d40fe43b2f6f66ddd
parentae475afc0f8685607e2de838db7fb4bee7934d4d
t7700: consolidate code into test_has_duplicate_object()

The code to test that objects were not duplicated from the packfile was
duplicated many times. Extract the duplicated code into
test_has_duplicate_object() and use that instead.

Refactor the resulting extraction so that if the git command fails,
the return code is not silently lost.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7700-repack.sh