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

Bugfix: Fix unquoting when line has multiple file names #1349

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

Conversation

eKoopmans
Copy link

  • On rename/copy events, the Git status line reports two files: file1 -> file2
  • If both filenames were quoted ("file1" -> "file2"), brackets-git was stripping the external quotes, leaving a malformed line (file1" -> "file2) and a corrupt filename "file2
  • This PR corrects the issue by parsing the -> separator first, while leaving all other behaviour intact

@eKoopmans
Copy link
Author

There is one other extreme case worth considering (which would require another slight rewrite to the logic):

  • If a filename contains "->" (only possible on Mac/*nix), the logic will fail and split the filename at that point.

This issue is present in both the original code and after my current commit.

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