RetroFed Forums
Your home away from modern life.
On Git Refs
Post Reply
AuthorMessage
codeinabox programming.dev codeinabox@programming.dev
Joined: 2025-09-29
Quote

2   Original
FizzyOrange programming.dev FizzyOrange@programming.dev
Joined: 2023-09-24
#2 · Quote Reply

Git has a mutable map whose keys are strings, and whose values are content-addressed objects. The keys are conventionally formatted as file system paths

I used to think this too, but I think it's more accurate to say the keys are filesystem paths. Try creating branches foo and foo/bar. That would be fine if the keys were strings. I vaguely recall there was some effort to make that actually work, but it doesn't today.

Do you understand why is it origin master in one command, and origin/master in the other? I didn’t, until a few weeks ago!

I mean I understood that it was because Git has a terrible CLI, and... that is ultimately still the reason. There's no fundamental reason it couldn't have been consistent. It just isn't.

2
Post Reply
Back to top