summaryrefslogtreecommitdiff
path: root/t/t3508-cherry-pick-many-commits.sh
diff options
context:
space:
mode:
authorMartin von Zweigbergk <martinvonz@gmail.com>2012-12-21 19:10:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-12-23 03:06:35 (GMT)
commit5d77298d084f01a854c8aecc1709acf53d956ef8 (patch)
tree4ead32901d2e113cd03fbf58a9685bc5beac7ec6 /t/t3508-cherry-pick-many-commits.sh
parentb3cf6f3b8d21b32d88313fc709442b78300975db (diff)
downloadgit-5d77298d084f01a854c8aecc1709acf53d956ef8.zip
git-5d77298d084f01a854c8aecc1709acf53d956ef8.tar.gz
git-5d77298d084f01a854c8aecc1709acf53d956ef8.tar.bz2
tests: move test_cmp_rev to test-lib-functions
A function for checking that two given parameters refer to the same revision was defined in several places, so move the definition to test-lib-functions.sh instead. Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3508-cherry-pick-many-commits.sh')
-rwxr-xr-xt/t3508-cherry-pick-many-commits.sh8
1 files changed, 2 insertions, 6 deletions
diff --git a/t/t3508-cherry-pick-many-commits.sh b/t/t3508-cherry-pick-many-commits.sh
index 340afc7..4e7136b 100755
--- a/t/t3508-cherry-pick-many-commits.sh
+++ b/t/t3508-cherry-pick-many-commits.sh
@@ -5,15 +5,11 @@ test_description='test cherry-picking many commits'
. ./test-lib.sh
check_head_differs_from() {
- head=$(git rev-parse --verify HEAD) &&
- arg=$(git rev-parse --verify "$1") &&
- test "$head" != "$arg"
+ ! test_cmp_rev HEAD "$1"
}
check_head_equals() {
- head=$(git rev-parse --verify HEAD) &&
- arg=$(git rev-parse --verify "$1") &&
- test "$head" = "$arg"
+ test_cmp_rev HEAD "$1"
}
test_expect_success setup '