Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

500k lines changed, oof. Imagine the merge conflicts.

Could this not have been done incrementally?



This is as incremental as it really could be; the entire build had to change, all of the code needed to be unindented one level, etc.

I have tested the merge conflict problem, and thanks to the way the PR is constructed (in steps), git actually does a good job figuring things out.


I'm curious on how to make such a change in such a large and living code base.

Did you consider _not_ re-indenting the entire code base and rely on the auto formatters of contributing people? Did you consider re-formatting parts of the code step-by-step, beginning with code that's not frequently changed?

Didn't know about the feature that ignores commits in git-blame, thank you for that.


No formatter would support having code indented like that at the top level for no reason, so that's not an option. Though, I have been looking into getting us to use a formatter, period (right now we don't).

I didn't consider doing it step by step, no, but I'm not sure how I would really achieve that effectively. The reality is that the bulk of PRs are submitted by the team, and it's straightforward to get everyone to get their code in before this change, pause merges, rebase, and then continue as normal. I'd rather go for the "rip the band-aid off" method.


> pause merges

That's what I was worried about, but I guess you can't have merge conflicts if you freeze the code.

Suppose you couldn't freeze the code, then what would you have done?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: