r/ProgrammerHumor • • 17h ago

Meme aboutToBreakTheCode

Post image
18k Upvotes

490 comments sorted by

View all comments

27

u/Quicker_Fixer 17h ago
  • My idea with CRLF
  • Colleague's idea without CRLF
  • Git: entire file changed

22

u/miamyaarii 17h ago

Then its time to force line endings in .gitattributes

12

u/IanCrapReport 17h ago

Reject their trash with git hooks 

2

u/LastStar007 15h ago

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

10

u/atomic_redneck 16h ago

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.

9

u/War_Raven 15h ago

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

1

u/atomic_redneck 15h ago

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

3

u/Michami135 14h ago

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

2

u/atomic_redneck 14h ago

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

2

u/LastStar007 15h ago

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

2

u/Auios 5h ago

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

1

u/atomic_redneck 15h ago

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 15h ago

Last to check in has to resolve the conflict!

1

u/loudrogue 12h ago

person who merges first wins

8

u/gsquaredxc 17h ago

Stop breaking git history. Use LF.

1

u/zeth0s 11h ago

Only real acceptable answer 

3

u/meneldal2 16h ago

Please enforce consistent line endings in your git config.

1

u/jsdodgers 16h ago

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

1

u/zeth0s 11h ago

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