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

git/repo/base.py: is_dirty(): Fix pathspec handling #1062

Merged
merged 1 commit into from Sep 28, 2020

Conversation

@apatard
Copy link
Contributor

@apatard apatard commented Sep 28, 2020

It's possible to specify a pathspec (eg :!foo) to git diff/status/...
but it currently fails with:

git.exc.GitCommandError: Cmd('/usr/bin/git') failed due to: exit code(128)
cmdline: /usr/bin/git diff --abbrev=40 --full-index --raw :!foo
stderr: 'fatal: ambiguous argument ':!foo': unknown revision or path not in the working tree.

Add missing '--' to the arguments to fix this ambiguity

Fixes: #1061
Signed-off-by: Arnaud Patard [email protected]

It's possible to specify a pathspec (eg :!foo) to git diff/status/...
but it currently fails with:

git.exc.GitCommandError: Cmd('/usr/bin/git') failed due to: exit code(128)
  cmdline: /usr/bin/git diff --abbrev=40 --full-index --raw :!foo
  stderr: 'fatal: ambiguous argument ':!foo': unknown revision or path not in the working tree.

Add missing '--' to the arguments to fix this ambiguity

Signed-off-by: Arnaud Patard <[email protected]>
@Byron Byron added this to the v3.1.9 - Bugfixes milestone Sep 28, 2020
@Byron Byron merged commit 624eb28 into gitpython-developers:master Sep 28, 2020
4 checks passed
4 checks passed
build (3.5)
Details
build (3.6)
Details
build (3.7)
Details
build (3.8)
Details
@Byron
Copy link
Member

@Byron Byron commented Sep 28, 2020

Thanks a lot for your contribution, especially for the exhaustive test!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.