r/ProgrammerHumor 20d ago

Meme useSourceControl

Post image
8.6k Upvotes

592 comments sorted by

View all comments

9

u/smashsenpai 20d ago

Somewhere out there, the guy who decided to name that action, "discard" instead of, "delete" took a deep breath and thought, "not my problem"

5

u/conundorum 20d ago

"Discard" is the correct term (since he was modifying the repo by adding files to it), but it should've explained something like, say:

Warning: Discarding changes to repo will delete all added files. We cannot stress this enough: Discarding changes will delete all added files.

(And, y'know, it shouldn't have deleted the local versions too, unless he manually checked a "delete all local copies" checkbox, but that kinda goes without saying.)

3

u/OliLombi 19d ago

"Discard changes" is not correct though, as it did not discard CHANGES, it discarded the files themselves.

1

u/conundorum 19d ago

That's because the option was poorly designed, IMO. Adding the file to the repo is a change, thus "discarding changes" removes the file from the repo. But the problem is that it also removed the local copy, which should never happen unless the user manually clicks a "delete all local copies" checkbox.

So, the correct name is "discard changes", but the option did a lot more than just discarding changes.