path: root/t/
diff options
authorJonathan Nieder <>2011-05-06 21:00:21 (GMT)
committerJunio C Hamano <>2011-05-06 22:29:01 (GMT)
commit3fc0dbf00ba5191c6aa7090a19fb9324ca348077 (patch)
tree243f51357427e2def1726039bdf4cac73549c31d /t/
parent73151df0cf3b324fc5f8980774601794c4b88204 (diff)
tests: teach verify_parents to check for extra parents
Currently verify_parents only makes sure that the earlier parents of HEAD match the commits given, and does not care if there are more parents. This makes it harder than one would like to check that, for example, parent reduction works correctly when making an octopus. Fix it by checking that HEAD^(n+1) is not a valid commit name. Noticed while working on a new test that was supposed to create a fast-forward one commit ahead but actually created a merge. Reported-by: Junio C Hamano <> Signed-off-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't/')
1 files changed, 1 insertions, 0 deletions
diff --git a/t/ b/t/
index c665acd..17292b7 100755
--- a/t/
+++ b/t/
@@ -89,6 +89,7 @@ verify_parents () {
i=$(expr $i + 1) ||
return 1
done &&
+ test_must_fail git rev-parse --verify "HEAD^$i" &&
test_cmp parents.expected parents.actual