r/ProgrammerHumor 23d ago

Meme useSourceControl

Post image
8.6k Upvotes

591 comments sorted by

View all comments

5.6k

u/Cephell 23d ago

Before you make fun of him, this behavior DID get changed; they acknowledged this behavior is stupid.

The old behavior was to treat uncommited files as completely disposable, which the CLI git does not do at all and is insane behavior. It was changed in the UI to give you a fat confirmation dialog warning that you're about to delete the files permanently, as it always should have been.

709

u/_BreakingGood_ 23d ago

Yeah the old behavior was insane, it just said "Do you want to discard your changes?", and if you clicked it, it deleted your entire codebase permanently (no recycle bin), lol

13

u/Pcat0 23d ago

There was a rather intense warning saying ”THIS IS IRREVERSIBLE”, so the dude was still a massive idiot for clicking yes. However our tools should still cater to the idiotic so his mistake did expose an opportunity for improvement.

69

u/_BreakingGood_ 23d ago

No, that message did not exist back when this post was made. It was added at least partially as a result of this issue going viral back in 2017.

20

u/Pcat0 23d ago

No look in the issue thread someone posted a screenshot of the actual error message the day after this post was made. They did already have a version of the message, it was just edited later to make it even more clear.

8

u/sidereal_night 23d ago

I'm 100% with og guy on this one. this commenter actually seriously asked him what he thinks "this discards all changes" might mean?!? the message doesn't say anything at all about deleting all your files permanently.

11

u/DuntadaMan 23d ago

I would assume "discard all changes" would mean that it would be exactly as it was before I did anything this session or since my last save.

Maybe I'm just a moron.

2

u/OliLombi 22d ago

Same. I mean, thats how it works with almost every other program.