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

Bug: Git diff doesn't work if file name contains spaces #1238

Open
1 task done
kris-swann opened this issue May 15, 2024 · 0 comments
Open
1 task done

Bug: Git diff doesn't work if file name contains spaces #1238

kris-swann opened this issue May 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kris-swann
Copy link

kris-swann commented May 15, 2024

Self Checks

  • I'm using the latest lualine.
  • [ x] I didn't find the issue in existing issues or PRs.

How to reproduce the problem

  • Create a new git directory
    • git init test && cd test
  • Create two new files one with spaces, one without
    • echo "test\ntest\ntest" | tee "test.txt" "test this.txt"
  • Commit the two files
    • git add -A && git commit -m "Test this"
  • Add two lines to both files
    • echo "test\ntest" | tee -a "test.txt" "test this.txt"
  • Copy in the isolated conf, create and view
    • ./nvim_isolated_conf.sh -c foo'
    • ./nvim_isolated_conf.sh -l foo .
    • :PlugInstall
    • :qa
    • ./nvim_isolated_conf.sh -l foo .

Expected behaviour

+2 diff shows in both test.txt and test this.txt

Actual behaviour

+2 diff shows in test.txt but not test this.txt

Minimal config to reproduce the issue

Default config, no changes made

Additional information

I assume it's just a matter of quoting the args here?

[[git -C %s --no-pager diff --no-color --no-ext-diff -U0 -- %s]],

@kris-swann kris-swann added the bug Something isn't working label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant