##// END OF EJS Templates
git: make dirstate actually support listclean parameter...
Augie Fackler -
r45991:601e3658 default
parent child Browse files
Show More
@@ -129,6 +129,7 b' class gitdirstate(object):'
129 return False
129 return False
130
130
131 def status(self, match, subrepos, ignored, clean, unknown):
131 def status(self, match, subrepos, ignored, clean, unknown):
132 listignored, listclean, listunknown = ignored, clean, unknown
132 # TODO handling of clean files - can we get that from git.status()?
133 # TODO handling of clean files - can we get that from git.status()?
133 modified, added, removed, deleted, unknown, ignored, clean = (
134 modified, added, removed, deleted, unknown, ignored, clean = (
134 [],
135 [],
@@ -168,6 +169,22 b' class gitdirstate(object):'
168 b'unhandled case: status for %r is %r' % (path, status)
169 b'unhandled case: status for %r is %r' % (path, status)
169 )
170 )
170
171
172 if listclean:
173 observed = set(
174 modified + added + removed + deleted + unknown + ignored
175 )
176 index = self.git.index
177 index.read()
178 for entry in index:
179 path = pycompat.fsencode(entry.path)
180 if not match(path):
181 continue
182 if path in observed:
183 continue # already in some other set
184 if path[-1] == b'/':
185 continue # directory
186 clean.append(path)
187
171 # TODO are we really always sure of status here?
188 # TODO are we really always sure of status here?
172 return (
189 return (
173 False,
190 False,
General Comments 0
You need to be logged in to leave comments. Login now