From f9ec0afbc29932b52f449b7e0a5f79068ecb1f0f Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Wed, 21 Mar 2012 17:45:04 +0100 Subject: [PATCH] Fix issue #41: repo.is_dirty() on empty repository with stashed files --- git/db/cmd/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git/db/cmd/base.py b/git/db/cmd/base.py index b940fd035..dd9aa800e 100644 --- a/git/db/cmd/base.py +++ b/git/db/cmd/base.py @@ -662,8 +662,8 @@ def is_dirty(self, index=True, working_tree=True, untracked_files=False): default_args = ('--abbrev=40', '--full-index', '--raw') if index: # diff index against HEAD - if isfile(self.index.path) and self.head.is_valid() and \ - len(self.git.diff('HEAD', '--cached', *default_args)): + if isfile(self.index.path) and \ + len(self.git.diff('--cached', *default_args)): return True # END index handling if working_tree: 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