MCPcopy
hub / github.com/gitless-vcs/gitless / _save_fuse_commits

Method _save_fuse_commits

gitless/core.py:1006–1016  ·  view source on GitHub ↗
(self, commits)

Source from the content-addressed store, hash-verified

1004 return self.gl_repo._fuse_commits_fp(self)
1005
1006 def _save_fuse_commits(self, commits):
1007 path = self._fuse_commits_fp
1008 using_tmp = False
1009 if os.path.exists(path):
1010 path = path + '_tmp'
1011 using_tmp = True
1012 with io.open(path, mode='w', encoding=ENCODING) as f:
1013 for ci in commits:
1014 f.write(ci.id.hex + '\n')
1015 if using_tmp:
1016 shutil.move(path, self._fuse_commits_fp)
1017
1018 def _load_fuse_commits(self):
1019 git_repo = self.gl_repo.git_repo

Callers 1

_fuseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected