Remix.run Logo
bradley13 6 hours ago

As with almost any successful system: more and more special features and edge cases get added. Git has become ridiculously complex.

I wonder: would it not be better to tell users with those edge cases to fix their problems some other way? To take an example from the article: why does someone have a filename beginning with a dash? Maybe don't do that.

zanecodes 6 hours ago | parent | next [-]

Sometimes you're using git in a context where you don't control the filenames, or where a potential attacker could influence or fully control them, at which point edge cases like this can easily turn into exploits.

I also chafe whenever I run into artificial restrictions on things like characters in names of things, because there's no good reason for them besides the laziness of developers or the limitations and inertia of existing systems that might be used under the hood, like DNS for instance.

vips7L 4 hours ago | parent [-]

An attacker has access to your git??? You’re fucked. Give up.

kangalioo 2 hours ago | parent [-]

Every git repository hosting platform - GitHub, GitLab, Bitbucket, Codeberg - necessarily gives end users control over filenames.

"User-controlled strings as parameters" is not "access to your git" but it is still an attack vector.

eviks 3 hours ago | parent | prev | next [-]

> why does someone have a filename beginning with a dash? Maybe don't do tha

Oh, the famous "you're holding it wrong". For one, that's a ridiculous limitation to place on the user, that's a pretty basic symbol, but also imagine someone else did that and you can't change it because it's outside of your control

inigyou 2 minutes ago | parent [-]

It's a problem with mixing code and data, therefore needing to escape. You can solve it by adding another symbol, let's call it Options Introducer, but that doesn't actually solve it because someone can name a file starting with Options Introducer. GUIs don't have this problem because you are clearly typing in the textbox or outside of it, or even better, you can select the file you mean.

windward 2 hours ago | parent | prev | next [-]

It's from 2019, so it's hardly a recent development.

It's also very discoverable if you see it in the wild. You may be surprised that `--` doesn't work, but you won't be surprised `--end-of-options` represents the end of options.

What problem does this actually cause you? What additional complexity has adding this feature added to your development cycle?

reaperducer 3 hours ago | parent | prev [-]

why does someone have a filename beginning with a dash?

Because it's my computer, not yours, and I'll do what I want with it?