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

"--format" must be quoted #9679

Merged

Conversation

gerhardol
Copy link
Member

Contributes to #8172

Proposed changes

Arguments to --format= and --sort may contain shell specific characters like ( and *.
A command like branch --format="%(refname)" will fail if the commandline is involved if the quotes are not added.,
like it is when using WSL Git.

Other occurrences are not known to create any issues, but I have not run all combinations of sort options etc and this should be uniform.

Strings that was changed were modified to use interpolated verbatim $@ strings.

Test methodology

Tests are updated

Merge strategy

I agree that the maintainer squash merge this PR (if the commit message is clear).


✒️ I contribute this code under The Developer Certificate of Origin.

@ghost ghost assigned gerhardol Oct 24, 2021
Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks plausible. Have not run.

@"""" instead of "\"" is a matter of taste. Neither reads very well. I come from C++...

@RussKie RussKie merged commit 565b466 into gitextensions:master Oct 24, 2021
@ghost ghost added this to the vNext milestone Oct 24, 2021
@gerhardol gerhardol deleted the feature/i8172-wsl-format-quote branch October 24, 2021 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants