diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-03-17 19:08:38 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-17 18:03:12 -0700 |
commit | a34393f5f8152ad8bdbf15bccffc2be12a9a19ca (patch) | |
tree | de26ab22e6c79cb3fb8b39b9e7a402114f4a8635 /t | |
parent | git reflog [expire|delete]: make -h output consistent with SYNOPSIS (diff) | |
download | tgif-a34393f5f8152ad8bdbf15bccffc2be12a9a19ca.tar.xz |
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')
-rwxr-xr-x | t/t1418-reflog-exists.sh | 5 |
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 |