mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-19 15:28:28 +01:00
experiments: ignore untracked files (#5029)
* git: add reset() * experiments: exclude untracked files * experiments: add test for untracked & staged files * git: support checkout/reset for specific paths to HEAD state * stage: track changed files when calling checkpoint callback * experiments: ignore untracked files when generating exp commits * add tests for dirty lock files * stage: track uncached outs when generating checkpoints * experiments: update checkpoints scm handling * update checkpoints tests
This commit is contained in:
@@ -394,3 +394,11 @@ class GitPythonBackend(BaseGitBackend): # pylint:disable=abstract-method
|
||||
|
||||
def diff(self, rev_a: str, rev_b: str, binary=False) -> str:
|
||||
raise NotImplementedError
|
||||
|
||||
def reset(self, hard: bool = False, paths: Iterable[str] = None):
|
||||
self.repo.head.reset(index=True, working_tree=hard, paths=paths)
|
||||
|
||||
def checkout_paths(self, paths: Iterable[str], force: bool = False):
|
||||
"""Checkout the specified paths from HEAD index."""
|
||||
if paths:
|
||||
self.repo.index.checkout(paths=paths, force=force)
|
||||
|
||||
Reference in New Issue
Block a user