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

Method update

gitless/core.py:1209–1217  ·  view source on GitHub ↗

Add/remove files to the index.

()

Source from the content-addressed store, hash-verified

1207 def get_tree_and_update_index():
1208
1209 def update():
1210 """Add/remove files to the index."""
1211 for f in files:
1212 assert not os.path.isabs(f)
1213 git_f = _get_git_path(f)
1214 if not os.path.exists(os.path.join(self.gl_repo.root, f)):
1215 index.remove(git_f)
1216 elif f not in partials:
1217 index.add(git_f)
1218
1219 # Update index to how it should look like after the commit
1220 partial_entries = {}

Callers

nothing calls this directly

Calls 1

_get_git_pathFunction · 0.85

Tested by

no test coverage detected