8000 Merge pull request #319 from jeblair/fixhead · battyone/GitPython@af44258 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit af44258

Browse files
committed
Merge pull request gitpython-developers#319 from jeblair/fixhead
Always add '--' to git reset
2 parents b21e2f1 + bdc38b8 commit af44258

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

git/refs/head.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def reset(self, commit='HEAD', index=True, working_tree=False,
5555
5656
:return: self"""
5757
mode = "--soft"
58-
add_arg = None
5958
if index:
6059
mode = "--mixed"
6160

@@ -73,12 +72,8 @@ def reset(self, commit='HEAD', index=True, working_tree=False,
7372

7473
# END working tree handling
7574

76-
if paths:
77-
add_arg = "--"
78-
# END nicely separate paths from rest
79-
8075
try:
81-
self.repo.git.reset(mode, commit, add_arg, paths, **kwargs)
76+
self.repo.git.reset(mode, commit, '--', paths, **kwargs)
8277
except GitCommandError as e:
8378
# git nowadays may use 1 as status to indicate there are still unstaged
8479
# modifications after the reset

0 commit comments

Comments
 (0)
0