r/ProgrammerHumor • • Oct 13 '26

Meme aboutToBreakTheCode

Post image
23k Upvotes

544 comments sorted by

View all comments

28

u/Quicker_Fixer Oct 13 '26
  • My idea with CRLF
  • Colleague's idea without CRLF
  • Git: entire file changed

24

u/miamyaarii Oct 13 '26

Then its time to force line endings in .gitattributes

0

u/[deleted] Oct 13 '26

[deleted] — view deleted comment

2

u/LastStar007 Oct 13 '26

You don't even need a hook. autocrlf has you handled.

11

u/atomic_redneck Oct 13 '26

We had a couple of developers who went to an Agile(!!) conference.They both sat in on a session where the speaker advocated for relentless refactoring, or something like that. Our devs came back and decided this was gospel, and started refactoring. One developer started TheGreatRenaming, to improve clarity in the naming of our classes. The other started work on dependency injection to eliminate static dependencies between modules. Obviously, these two sets of changes hit the same set of source files.

Moral: Devs gotta talk to each other, preferrably before they start.

7

u/War_Raven Oct 13 '26

Both ideas aren't bad, though doing it at the same time is certainly a choice

1

u/atomic_redneck Oct 13 '26

That was the general consensus among the rest of the dev team.

4

u/Michami135 Oct 13 '26

To be fair, no version control software, or especially lack of, will make any of these stories easier.

2

u/atomic_redneck Oct 13 '26

Yeah. It was a personnel problem, not a version control problem. VC was just the tool that highlighted the problem.

3

u/LastStar007 Oct 13 '26

Real moral: Don't start something unless you can finish it quickly.

2

u/Auios Oct 14 '26

My dev lead would prioritize her PRs first and make us handle the conflicts. Being the lead had its privileges…

1

u/atomic_redneck Oct 13 '26

Since we were modelling real Physics in an engineering application, we usually had a couple of long running research projects going on at the same time. The big difference is that these long running projects tended to not affect the same set of modules.

1

u/coastphase Oct 13 '26

Last to check in has to resolve the conflict!

1

u/loudrogue Oct 13 '26

person who merges first wins

9

u/gsquaredxc Oct 13 '26

Stop breaking git history. Use LF.

1

u/zeth0s Oct 13 '26

Only real acceptable answer 

4

u/meneldal2 Oct 13 '26

Please enforce consistent line endings in your git config.

1

u/jsdodgers Oct 13 '26

Luckily you guys have a linter you have to run before merging anyway

1

u/zeth0s Oct 13 '26

That's because no one should use CRLF. Linus was right with that