Debian Patches

Status for git-filter-repo/2.47.0-3

Patch Description Author Forwarded Bugs Origin Last update
multi-line-config get_config_settings: Avoid break with multiline configs
If a user has a multiline config like:
```
git config test.test = "Hello
world"
```

git-filter-repo breaks:
```
> return dict(line.split(b'=', maxsplit=1)
for line in output.strip().split(b"\n"))
E ValueError: dictionary update sequence element #12 has length 1; 2 is required
```

Multiline configs are required by b4 in branch-description
strategy:
https://b4.docs.kernel.org/en/latest/contributor/prep.html#prep-cover-strategies
Ricardo Ribalda <ribalda@chromium.org> no debian https://github.com/newren/git-filter-repo/pull/624 2024-12-25
python3.14 filter-repo: fix --replace-text for python3.14
Our handling of globs for --replace-text makes use of fnmatch.translate
from the python standard library. Unfortunately, fnmatch.translate
doesn't just give a regex that can match the given glob somewhere, it
gives a regex that will only match if the string it is comparing to is
exactly that glob. We need a substring search, though, so we have to
use an ugly hack to butcher the returned regex from fnmatch to get it
to be what we want. (It would be nice if python's fnmatch.translate()
took options for what was wanted, but it doesn't.) This is fine, except
that...

python3.14 added '\z' as a synonym for '\Z' in regexes. No special
reason, they just wanted there to be more than one way to do it.

Naturally, fnmatch.translate() uses '\z' instead of '\Z', so our regex
hackery in glob_to_regex() wasn't looking for the right stuff to hack
off, causing the globs to fail to match text as expected.

Add a python >= 3.14 hack to the existing python variation hacks in
glob_to_regex() so we can handle this case too.

While at it, the --replace-text test in t9394 did replacements on a
literal, a glob, and a regex, but it only verified that the glob and
regex replacements worked. Supplement it with a check that the
literal replacement worked too.
Elijah Newren <newren@gmail.com> no debian https://github.com/newren/git-filter-repo/commit/c1d8461ee34c6d3f987e0f19191f2105cb2a33c8 2025-07-25

All known versions for source package 'git-filter-repo'

Links