MCPcopy Create free account
hub / github.com/git/git / refresh

Method refresh

t/unit-tests/clar/generate.py:123–142  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

121 return self.callbacks != []
122
123 def refresh(self, path):
124 self.modified = False
125
126 try:
127 st = os.stat(path)
128
129 # Not modified
130 if st.st_mtime == self.mtime:
131 return True
132
133 self.modified = True
134 self.mtime = st.st_mtime
135
136 with codecs.open(path, encoding='utf-8') as fp:
137 raw_content = fp.read()
138
139 except IOError:
140 return False
141
142 return self.parse(raw_content)
143
144class TestSuite(object):
145

Callers 1

loadMethod · 0.80

Calls 1

parseMethod · 0.95

Tested by

no test coverage detected