Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-12-21 08:49:33 +0300
committerJunio C Hamano <gitster@pobox.com>2023-12-21 08:49:33 +0300
commit2e13ed4671d12ff996b1b44cf5a33de4d2c54b55 (patch)
treec13d4bfb569f7714c60f07280aa26c26b7b17b48 /t
parent564d0252ca632e0264ed670534a51d18a689ef5d (diff)
parent9385174627cbb7301b1007912514a66b75d78f31 (diff)
Merge branch 'jk/end-of-options' into jc/sparse-checkout-set-add-end-of-options
* jk/end-of-options: parse-options: decouple "--end-of-options" and "--"
Diffstat (limited to 't')
-rwxr-xr-xt/t7102-reset.sh8
-rwxr-xr-xt/t9350-fast-export.sh10
2 files changed, 18 insertions, 0 deletions
diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh
index 4287863ae6..62d9f846ce 100755
--- a/t/t7102-reset.sh
+++ b/t/t7102-reset.sh
@@ -616,4 +616,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
diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh
index 26c25c0eb2..e9a12c18bb 100755
--- a/t/t9350-fast-export.sh
+++ b/t/t9350-fast-export.sh
@@ -791,4 +791,14 @@ test_expect_success 'fast-export --first-parent outputs all revisions output by
)
'
+test_expect_success 'fast-export handles --end-of-options' '
+ git update-ref refs/heads/nodash HEAD &&
+ git update-ref refs/heads/--dashes HEAD &&
+ git fast-export --end-of-options nodash >expect &&
+ git fast-export --end-of-options --dashes >actual.raw &&
+ # fix up lines which mention the ref for comparison
+ sed s/--dashes/nodash/ <actual.raw >actual &&
+ test_cmp expect actual
+'
+
test_done