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

filter-repo: Accept multiline git config values #632

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

Conversation

scosu
Copy link

@scosu scosu commented Jan 21, 2025

Some git config options can contain multiline values, for example aliases. With the current simple split on = this fails with a stacktrace so that git-filter-repo is unusable.

This patch uses a multiline regular expression to split the git config --list string at any beginning line followed by an alphanumeric name with '-' and '.' followed by '='. In some cases this can falsely identify multiline values as a new variable name that does not exist. But it should work for most usual multiline config options correctly.

Corresponding bugreport #603

Some git config options can contain multiline values, for example
aliases. With the current simple split on = this fails with a stacktrace
so that git-filter-repo is unusable.

This patch uses a multiline regular expression to split the git config
--list string at any beginning line followed by an alphanumeric name
with '-' and '.' followed by '='. In some cases this can falsely
identify multiline values as a new variable name that does not exist.
But it should work for most usual multiline config options correctly.

Signed-off-by: Markus Schneider-Pargmann <[email protected]>
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