←back to thread

128 points nvader | 3 comments | | HN request time: 0.001s | source
Show context
akabalanza ◴[] No.46190489[source]
I consider git the best software ever written. I used to work with some other SVCs, and I cannot thinking on leaving git now. Somehow, I feel it like a limitation for my mind.

I'm following this Jujutsu project, I'm genuinely curious to see what it can bring to the SVC scene.

replies(9): >>46190520 #>>46190694 #>>46190754 #>>46191740 #>>46192251 #>>46194535 #>>46194924 #>>46195104 #>>46201905 #
skrebbel ◴[] No.46190694[source]
No software that has 3 names for the same thing (git stash —cached vs —keep-index wtf‽) deserves to be described as “the best ever written”
replies(1): >>46198006 #
1718627440 ◴[] No.46198006[source]
That is not the same thing, --cached means use only the version cached in the index, --index means also use the index. What is the third thing you have in mind?
replies(1): >>46202077 #
skrebbel ◴[] No.46202077[source]
That’s totally the same thing, they’re about what to do with the staging area but using 2 words for it (index and cache). The third term is “staging area” or the flag --staged for other commands.

Any sane tool uses one word for each concept, not three. The Git CLI is full of this sort of shit and it drives me mad.

replies(1): >>46202570 #
1718627440 ◴[] No.46202570[source]
The term "staging area" doesn't originate from Git itself, it was coined by third-parties. The single term you are looking for is index, it used to be cache, but was renamed long ago, and now cache only remains as a verb in some places.
replies(1): >>46202739 #
1. skrebbel ◴[] No.46202739[source]
It wasn’t renamed. If it was renamed they’d have deprecated --cached and introduced a new flag with a proper name.

Also why does “git restore --staged” exist if the term “staging area” isn’t from Git? And why does “git add -i” have the words “staged” and “unstaged” all over the output?

The answer to all these questions is that Git is made by people who care very deeply about data structures and very little about users. Git is needlessly difficult and this is just one of the many places where it shows.

Don’t get me wrong, I’d much rather use a VCS with good data structures than one with good naming. Git is popular for a reason. But the bad CLI design is just such a waste because it makes Git needlessly hard to learn to the benefit of absolutely nothing. It’s not a tradeoff. It’s just shitty.

replies(1): >>46203778 #
2. skrebbel ◴[] No.46203778[source]
lol turns out I misremember and it's "git stash --staged", the --cached parameter doesn't exist and my moist LLM hallucinated it. I've used Git for 15 years every day and I still don't know the basic commands.
replies(1): >>46224085 #
3. ◴[] No.46224085[source]