Skip to content

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy