Live data from Hacker News

git's –end-of-options Flag

nesbitt.io

1–10 of 133 posts

Re: git's –end-of-options Flag

#4
post #2

Does anyone know why git broke the long standing convention of "--" early on? Kind of a nightmare for humans to use. Remembering app-specific one-offs is kind of the worst!

git's data model is incredibly powerful and flexible, but its UX is famously... interesting:

https://stevelosh.com/blog/2013/04/git-koans/

Re: git's –end-of-options Flag

#5
> git log --end-of-options "$rev" -- "$path",

Argh, that's when I wished for object oriented shells. Powershell sure isn't perfect but objects encoding their own meaning really helps differentiate those cases (but it may not always help the user if types aren't clear to the reader)

Re: git's –end-of-options Flag

#6
post #2

Does anyone know why git broke the long standing convention of "--" early on? Kind of a nightmare for humans to use. Remembering app-specific one-offs is kind of the worst!

When something appears to be poorly designed, then the deeper explanation is often that it’s indeed poorly designed.

Re: git's –end-of-options Flag

#7
post #5

> git log --end-of-options "$rev" -- "$path", Argh, that's when I wished for object oriented shells. Powershell sure isn't perfect but objects encoding their own meaning really helps differentiate those cases (but it may not always help the user if types aren't clear to the reader)

I don't think you need object orientation for that. Haskell and Rust solve these problems also just fine, without any OOP in sight.

Re: git's –end-of-options Flag

#9
As with almost any successful system: more and more special features and edge cases get added. Git has become ridiculously complex.

I wonder: would it not be better to tell users with those edge cases to fix their problems some other way? To take an example from the article: why does someone have a filename beginning with a dash? Maybe don't do that.

Re: git's –end-of-options Flag

#10

https://m.xkcd.com/1597/ By the way, something munched the article title. An endash is incorrect command-line usage. It’s supposed to be a double hyphen.

From the title I've learned that git uses an em-dash instead of double dash as options delimiter. Thanks for pointing out that the title was wrong -- I've never had a need to use -- with git, so didn't know that it doesn't work.
Post reply on HN