Skip to content

Commit af44258

Browse files
committed
Merge pull request #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

+1-6
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)