Le sam. 2 avr. 2022 à 23:55, René Scharfe <l.s.r@xxxxxx> a écrit : > > Am 02.04.22 um 18:49 schrieb Laurent Lyaudet: > > Le mer. 16 mars 2022 à 19:08, Laurent Lyaudet > The option --break-rewrites controls rewrite detection. Check out its > description in the documentation of git diff to see how to use it. Hello everyone, Thanks René, I checked and now I understand how it works :) > > But the two other questions remains : > >> How comes git has two ways to count modified lines ? > > i.e. What is (was) the purpose of this rewrite counting (when coded) ? > > Rewrite detection is meant to improve the diff of a file whose content > was replaced with something very different. Instead of lots of hunks > containing lines that add and remove unrelated stuff, separated by empty > lines etc. that the diff algorithm matches between the sides even though > they are also unrelated, a rewrite diff removes all the old lines en > bloc and then adds all the new ones, which is easier to read in that > case. It makes sense to produce diffs simpler to understand.