summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t2025-checkout-to.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t2025-checkout-to.sh b/t/t2025-checkout-to.sh
index a8d93366f6..0fd731b4bc 100755
--- a/t/t2025-checkout-to.sh
+++ b/t/t2025-checkout-to.sh
@@ -134,4 +134,14 @@ test_expect_success 'checkout with grafts' '
test_cmp expected actual
'
+test_expect_success 'checkout --to from relative HEAD' '
+ test_commit a &&
+ test_commit b &&
+ test_commit c &&
+ git rev-parse HEAD~1 >expected &&
+ git checkout --to relhead HEAD~1 &&
+ git -C relhead rev-parse HEAD >actual &&
+ test_cmp expected actual
+'
+
test_done