logoalt Hacker News

metadattoday at 4:26 AM7 repliesview on HN

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!


Replies

doctoboggantoday at 4:32 AM

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

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

show 8 replies
userbinatortoday at 6:08 AM

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.

show 1 reply
dmurraytoday at 7:17 AM

It sounds like they didn't need (at the time) to separate arguments from options, but they did need to separate revisions from pathspecs. So they repurposed "--" as the most familiar separator.

Probably they were trying to use familiar conventions, but when they later needed to separate arguments from options, that was a closer match for what other people were using "--" for, but it was too late.

show 1 reply
epistasistoday at 4:56 AM

Since it separates out the pathspec, doesn't that match the long standing convention?

show 1 reply
p-e-wtoday at 4:37 AM

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

vips7Ltoday at 6:45 AM

Flags for Unix tools have never been friendly.

show 1 reply
TZubiritoday at 6:05 AM

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

show 1 reply