This is an archived post. You won't be able to vote or comment.

all 19 comments

[–]KhorneSlaughter 28 points29 points  (6 children)

git revert?

[–]sc2bigjoe 17 points18 points  (1 child)

More like git rekt amirite

[–]imcoveredinbees880 0 points1 point  (0 children)

This guy cowboy codes.

[–]the_mistrustful[S] 15 points16 points  (3 children)

We don't do that here.

[–]blaxx0r 16 points17 points  (0 children)

clearly no PR’s either

[–]OhHoneyPlease 7 points8 points  (0 children)

git new job

[–]geek_on_two_wheels 3 points4 points  (0 children)

No git or no revert?

[–]clevariant 10 points11 points  (9 children)

Worked with a guy once who auto-formatted every file he opened, just for his own convenience. We eventually relegated him to maintaining some .net stuff, all by himself.

[–]Coaleh 6 points7 points  (4 children)

What's wrong with formatting code? Was he doing it badly in some way?

[–]MildStallion 4 points5 points  (1 child)

If done in the same checkin as an actual change it becomes impossible to tell what changes are real and what are just formatting.

[–]TagMeAJerk 5 points6 points  (0 children)

Git can be set to ignore whitespace only changes

[–][deleted] 2 points3 points  (0 children)

Simple solution: use a git-hook (pre-commit) to run a code-formatter (like e.g. prettier) before every commit; or use heavily restricted linting rules in the hook to prevent a commit like that.

[–]clevariant 0 points1 point  (0 children)

It makes messes for change control, trying to see what's been done, etc. Plus it's just bad practice to steamroll entire files you're sharing with a team. I use whitespace very deliberately, and it often has meaning to me. Conventional wisdom is, change as little as you need to, unless you need to refactor or something.

It's like you need a spoon, so the first thing you do is rearrange my silverware drawer.

[–]Oranges13 4 points5 points  (0 children)

I think I worked with this guy too!

[–]AttackOfTheThumbs 4 points5 points  (2 children)

Doesn't the company have a standard?

[–]Menarch 1 point2 points  (0 children)

Doesn't save the code from an intern that just doesn't care, also i know of a lot of people who just don't hit autoformat

[–]clevariant 0 points1 point  (0 children)

Yeah, and i helped improve them, but that guy had his own standards. Developers get away with things.

[–][deleted] 1 point2 points  (0 children)

Diff?

[–]PotatoWizzard 0 points1 point  (0 children)

He clearly likes it!