MCPcopy Index your code
hub / github.com/gitless-vcs/gitless / _ref_create

Method _ref_create

gitless/core.py:167–172  ·  view source on GitHub ↗
(self, ref, value)

Source from the content-addressed store, hash-verified

165 os.remove(ref_path)
166
167 def _ref_create(self, ref, value):
168 ref_path = os.path.join(self.path, ref)
169 with io.open(ref_path, 'w', encoding=ENCODING) as f:
170 if value.startswith('refs'):
171 value = 'ref: ' + value
172 f.write(value + '\n')
173
174 def _ref_target(self, ref):
175 return self.git_repo.lookup_reference(ref).target

Callers 1

restoreMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected