Skip to content

Commit 6620d9f

Browse files
committed
Merge pull request #193 from maxyz/fix-issue-41_master
Fix issue #41: repo.is_dirty() on empty repository with stashed files
2 parents a82b0df + f9ec0af commit 6620d9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git/db/cmd/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,8 @@ def is_dirty(self, index=True, working_tree=True, untracked_files=False):
662662
default_args = ('--abbrev=40', '--full-index', '--raw')
663663
if index:
664664
# diff index against HEAD
665-
if isfile(self.index.path) and self.head.is_valid() and \
666-
len(self.git.diff('HEAD', '--cached', *default_args)):
665+
if isfile(self.index.path) and \
666+
len(self.git.diff('--cached', *default_args)):
667667
return True
668668
# END index handling
669669
if working_tree:

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