]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7102-reset.sh
parse-options: decouple "--end-of-options" and "--"
[thirdparty/git.git] / t / t7102-reset.sh
index 22477f3a312e4a44b0c3f99ee356d29487ed5399..2a3d22592f9b83810978a43650594c8e7442ccb3 100755 (executable)
@@ -606,4 +606,12 @@ test_expect_success 'reset --mixed sets up work tree' '
        test_must_be_empty actual
 '
 
+test_expect_success 'reset handles --end-of-options' '
+       git update-ref refs/heads/--foo HEAD^ &&
+       git log -1 --format=%s refs/heads/--foo >expect &&
+       git reset --hard --end-of-options --foo &&
+       git log -1 --format=%s HEAD >actual &&
+       test_cmp expect actual
+'
+
 test_done