Skip to content

Conversation

@nils-a
Copy link
Contributor

@nils-a nils-a commented Nov 24, 2022

  • PR Description

If the remote name contains special regex-chars,
the compilation of the regex might fail.
Quoting the remoteName ensures that all special chars in the remoteName are properly escaped before compiling the regex.

  • Please check if the PR fulfills these requirements
  • Cheatsheets are up-to-date (run go run scripts/cheatsheet/main.go generate)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • Docs (specifically docs/Config.md) have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

If the remote name contains special regex-chars,
the compilation of the regex might fail.
Quoting the remoteName ensures that all special chars
in the remoteName are properly escaped before compiling
the regex.
@nils-a
Copy link
Contributor Author

nils-a commented Nov 24, 2022

While I feel escaping the remoteName does no harm, and it solves the issue at hand, I also feel it does not solve the root-cause.

I actually feel that no remote * should be listed here. However, I am unsure where to address this. Here or in go-git?

Any pointers would be greatly appreciated.

@jesseduffield
Copy link
Owner

Code looks good to me so I'm happy to merge as-is (great work on the integration test).

As for the root problem, good question. If the remote doesn't appear when doing a porcelain git command to list the remotes, then I think this is an issue on go-git's side

@jesseduffield jesseduffield merged commit ffc2a68 into jesseduffield:master Nov 24, 2022
@nils-a nils-a deleted the buxfix/quote-regex branch March 17, 2023 12:34
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.

2 participants