t6050-replace: add test to clean up all the replace refs
authorChristian Couder <chriscool@tuxfamily.org>
Fri, 6 Sep 2013 05:10:56 +0000 (07:10 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Sep 2013 20:29:44 +0000 (13:29 -0700)
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6050-replace.sh
index 09bad9877f4d8d7877dee6dc35dc7e948148439e..09a2b49bfbbcfda32b4cae18faadd2d63ccaa321 100755 (executable)
@@ -276,4 +276,10 @@ test_expect_success '-f option bypasses the type check' '
        git replace -f HEAD^ $BLOB
 '
 
+test_expect_success 'replace ref cleanup' '
+       test -n "$(git replace)" &&
+       git replace -d $(git replace) &&
+       test -z "$(git replace)"
+'
+
 test_done