Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_config_settings: Avoid break with multiline configs #624

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ribalda
Copy link

@ribalda ribalda commented Dec 25, 2024

If a user has a multiline config like:
git config test.test = "Hellow
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

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 newren#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

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant