#1120136 gbp-pq: Use of --diff-algorithm=default will lead to a lot of churn with Git 3.0

#1120136#5
Date:
2025-11-05 21:00:18 UTC
From:
To:
Dear git-buildpackage maintainers,

commit 34a63bf fixed https://bugs.debian.org/1030044 by forcing the diff
algorithm using `--diff-algorithm=default`. While this fixes the problem
right now, it will lead to a lot of churn as soon as Git 3.0 will be
released in 2026. There is consensus upstream to change the default
algorithm from `myers` to `histogram`. (And rightly so: except in
pathological cases, the histogram algorithm always produces more
"meaningful" deltas/patches than Myers' algorithm. Pretty much all
forges already moved to the histogram algorithm for online visualization.)

There will be a period in which some Debian developers will use Git 2.x
and others Git 3.x. In that period the issue described in #1030044 will
appear again, but it will not be fixable without changes to the code of
gbp-pg (so commit 34a63bf involuntarily made the situation worse in the
long run).

This issue can be fixed by changing `--diff-algorithm=default` in
`gbp/git/repository.py` to `--diff-algorithm=histogram`.

Regards,

#1120136#10
Date:
2025-11-06 23:57:41 UTC
From:
To:
A tiny MR to fix this problem can be found at

https://salsa.debian.org/agx/git-buildpackage/-/merge_requests/66

Regards,