Live data from Hacker News

git's –end-of-options Flag

nesbitt.io

21–30 of 133 posts

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

#21
post #18

The "Everything is text, do everything via text" philosophy has its advantages, and also its disadvantages.

Like the von Neumann architecture. Your data can be misused as code.

Don't see that we get rid of either command lines in text or von Neumann any time soon.

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

#22
post #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.

In this specific case, the oop nature of powershell doesn't actually matter, just the fact it uses structured input instead of raw string.

It's like passing a struct to a function instead of a badly serialized representation of a value

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

#23

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.

I'm sure I typed double-hyphen when submitting the post, but probably HN auto-formatted the title. IDK really.

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

#24

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.

It is an en dash, not an em dash, since it's about as wide as an n.

Some software substitutes a double hyphen -- with an en dash rather than em, and use the triple hyphen --- for the em dash. Perhaps Hacker News' title formatter is one of them.

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

#25
Copilot CLI (we get that at work) often uses slightly low-level and cryptic git commands. Never noticed that it would use --end-of-options though.

Should check what it does with branch names starting with a dash.

Of course that wouldn't be a security vulnerability, but a user error. It asks user approvals to execute those things and has disclaimers to check results. Which of course every user does all the time... /s

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

#26
post #24

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.

It is an en dash, not an em dash, since it's about as wide as an n. Some software substitutes a double hyphen -- with an en dash rather than em, and use the triple hyphen --- for the em dash. Perhaps Hacker News' title formatter is one of them.

Okay, edit submitted, but that is extra weird, because the double hyphen is a convention or placeholder for an emdash. When a transformation takes place, it becomes an emdash.

There is no reason to transform it to an endash. I don't know any software that would do that. Checked with an LLM, too. That makes no sense at all!

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

#27
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!

One of the undeniable benefits of LLMs is that the end of guessing and remembering commands is now optional.

Now we can all run important CLI programs like Zork without a 'command doesn't exist' to command ratio of 1:4

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

#29
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!

The Single UNIX Specification mentions the "--" convention in 1997 (at which point it was already in widespread use): https://pubs.opengroup.org/onlinepubs/7908799/xbd/utilconv.h...

The first release of git was in 2005, and Torvalds' Linux was clearly UNIX-inspired, so it's not like this was due to considerations for some other OS like DOS/Windows.

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

#30
post #27
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!

One of the undeniable benefits of LLMs is that the end of guessing and remembering commands is now optional. Now we can all run important CLI programs like Zork without a 'command doesn't exist' to command ratio of 1:4

Yeah, now the LLMs are guessing the commands...
Post reply on HN