https://kotlinlang.org logo
#ktfmt
Title
# ktfmt
c

Colton Idle

02/18/2023, 12:29 AM
I want to add ktfmt with spotless to an existing project... but my project lead is afraid of losing git commit history. thoughts?
j

Javier

02/18/2023, 8:05 AM
don’t understand why it is related losing commit history with spotless and ktfmt
c

Colton Idle

02/18/2023, 3:49 PM
If I reformat the entire project, then all git blame history will look like its from me, no?
n

Nivaldo H Bondança

08/24/2023, 2:29 PM
Don't you have an entity (bot?) that can run this for you and/or maybe tag the change with "codemod". That's what we do here and for blame, we know to skip past those things
You could even configure your version control thing to ignore those revisions. In git you do something like this:
git config blame.ignore <REVISION>
c

Colton Idle

08/24/2023, 5:27 PM
Yeah, we configured version control to ignore that hash of the "big reformat of 2023"
👍 1
8 Views