git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* --end-of-options inconsistently available?!
@ 2023-11-27 11:22 Sven Strickroth
  2023-11-27 21:22 ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: Sven Strickroth @ 2023-11-27 11:22 UTC (permalink / raw)
  To: git

Hi,

gitcli(7) states:
> Because -- disambiguates revisions and paths in some commands, it cannot be used for those commands to separate options and revisions. You can use --end-of-options for this (it also works for commands that do not distinguish between revisions in paths, in which case it is simply an alias for --).

However, when I use this for certain commands it fails:

$ git reset --end-of-options HEAD --
fatal: option '--end-of-options' must come before non-option arguments

$ git rev-parse --symbolic-full-name --end-of-options master
--end-of-options
refs/heads/master

Here, the output also contains "--end-of-options" as if it is a 
reference (same for "--")

$ git checkout -f --end-of-options HEAD~1 -- afile.txt
fatal: only one reference expected, 2 given.

Best,
  Sven

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-12-06 22:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-27 11:22 --end-of-options inconsistently available?! Sven Strickroth
2023-11-27 21:22 ` Jeff King
2023-11-28  8:40   ` Sven Strickroth
2023-12-06 21:16     ` Jeff King
2023-12-06 22:21   ` [PATCH] parse-options: decouple "--end-of-options" and "--" Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).