News for hackers. Stuff that matters.
Re:Twenty Years Is Nothing by jankovicsandras on Monday March 04, 2024 @06:12AM (#39589092)
This. Git is not an Edit history. Another surprising (at least to me) thing is that you can't add empty directories (without placeholder files) : https://stackoverflow.com/questions/115983/how-do-i-add-an-e...
Re:Twenty Years Is Nothing by nereye on Monday March 04, 2024 @06:32AM (#39589217)
This is not an uncommon behavior in source code control systems, e.g. both Perforce and Mercurial behave like Git too.

E.g. see https://portal.perforce.com/s/article/3447 for Perforce.

Re:Twenty Years Is Nothing by marcosdumay on Monday March 04, 2024 @11:18AM (#39592125)
Yet, it's wrong.

Just the fact that people keep using placeholder files should be enough to convince anybody. But if you want to use git for software development, well, almost all development conventions mandate directory intentionally kept empty or to exist before their contents exist. I've never seen anybody decide on something that doesn't.

Re:Twenty Years Is Nothing by thwarted on Monday March 04, 2024 @11:31AM (#39592290)
Object stores like S3 work similarly, the entire path is to an object, and unless there is data at a path, the path doesn't exist. And you don't need to create the prefix before storing something with that prefix. That the tooling abstracts that a way to make it look more like a filesystem is a layer on top.
Re:Twenty Years Is Nothing by pif on Monday March 04, 2024 @11:42AM (#39592448)
> almost all development conventions mandate directory intentionally kept empty or to exist before their contents exist

Never heard about this, nor can I imagine what purpose it could serve.

Re:Twenty Years Is Nothing by BlueTemplar on Tuesday March 05, 2024 @05:30PM (#39609983)
As an aside, aren't folders in *nix also files ? So how did this happen with git, written by Linus ??