Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commite15b57b

Browse files
committed
Merge branch 'Javex-submodule_fix'
2 parents539980d +a771e10 commite15b57b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

‎git/repo/base.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,8 @@ def _set_alternates(self, alts):
563563
alternates=property(_get_alternates,_set_alternates,
564564
doc="Retrieve a list of alternates paths or set a list paths to be used as alternates")
565565

566-
defis_dirty(self,index=True,working_tree=True,untracked_files=False):
566+
defis_dirty(self,index=True,working_tree=True,untracked_files=False,
567+
submodules=True):
567568
"""
568569
:return:
569570
``True``, the repository is considered dirty. By default it will react
@@ -575,7 +576,9 @@ def is_dirty(self, index=True, working_tree=True, untracked_files=False):
575576
returnFalse
576577

577578
# start from the one which is fastest to evaluate
578-
default_args= ('--abbrev=40','--full-index','--raw')
579+
default_args= ['--abbrev=40','--full-index','--raw']
580+
ifnotsubmodules:
581+
default_args.append('--ignore-submodules')
579582
ifindex:
580583
# diff index against HEAD
581584
ifisfile(self.index.path)and \
@@ -588,7 +591,7 @@ def is_dirty(self, index=True, working_tree=True, untracked_files=False):
588591
returnTrue
589592
# END working tree handling
590593
ifuntracked_files:
591-
iflen(self.untracked_files):
594+
iflen(self._get_untracked_files(ignore_submodules=notsubmodules)):
592595
returnTrue
593596
# END untracked files
594597
returnFalse
@@ -604,10 +607,14 @@ def untracked_files(self):
604607
605608
:note:
606609
ignored files will not appear here, i.e. files mentioned in .gitignore"""
610+
returnself._get_untracked_files()
611+
612+
def_get_untracked_files(self,**kwargs):
607613
# make sure we get all files, no only untracked directores
608614
proc=self.git.status(porcelain=True,
609615
untracked_files=True,
610-
as_process=True)
616+
as_process=True,
617+
**kwargs)
611618
# Untracked files preffix in porcelain mode
612619
prefix="?? "
613620
untracked_files=list()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp