> One thing we have not considered here is that after running black on Django a huge portion of our outstanding merge requests will have conflicts, some of which might be tricky to rebase. I’m not sure there is much we can do about that though.
With a little bit of git-foo, this is actually not that bad. In past projects, this is the approach I took: $ git checkout my-branch # Rebase on the parent of the commit introducing Black. $ git rebase <black-commit>^ # Fix normal merge conflicts. # ... # Rebase on the Black commit, instructing git to prefer the rebased changes # over the black changes. For rebase, the terminology is backwards, hence # "theirs". $ git rebase <black-commit> -X theirs # Reformat your changes with black. $ black . # Amend the commit with the Black formatting changes. $ git commit --ammend -a -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CADhq2b7JD6C-wqyKgPVDK0JOvX_W_vgzAe%2Be6TcSkC6ArPm5jA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.