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
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-03-17 21:08:38 +0300
committerJunio C Hamano <gitster@pobox.com>2022-03-18 04:03:12 +0300
commita34393f5f8152ad8bdbf15bccffc2be12a9a19ca (patch)
treede26ab22e6c79cb3fb8b39b9e7a402114f4a8635 /t/t1418-reflog-exists.sh
parentcbe485298bf06a4e6377f5a692c82a9e3ad38069 (diff)
reflog exists: use parse_options() API
Change the "reflog exists" command added in afcb2e7a3b8 (git-reflog: add exists command, 2015-07-21) to use parse_options() instead of its own custom command-line parser. This continues work started in 33d7bdd6459 (builtin/reflog.c: use parse-options api for expire, delete subcommands, 2022-01-06). As a result we'll understand the --end-of-options synonym for "--", so let's test for that. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1418-reflog-exists.sh')
-rwxr-xr-xt/t1418-reflog-exists.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t1418-reflog-exists.sh b/t/t1418-reflog-exists.sh
index 60c6411ce3..d51ecd5e92 100755
--- a/t/t1418-reflog-exists.sh
+++ b/t/t1418-reflog-exists.sh
@@ -29,4 +29,9 @@ test_expect_success 'reflog exists works with a "--" delimiter' '
test_must_fail git reflog exists -- refs/heads/nonexistent
'
+test_expect_success 'reflog exists works with a "--end-of-options" delimiter' '
+ git reflog exists --end-of-options refs/heads/main &&
+ test_must_fail git reflog exists --end-of-options refs/heads/nonexistent
+'
+
test_done