mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-22 07:18:28 +01:00
cache: use checksums instead of commit_id
From now on, we identify our cache files by their md5sum, so that we can avoid cache collission in branching scenario and also dedup same data at the same time. Fixes #250, #251 Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
+6
-3
@@ -179,10 +179,13 @@ class GitWrapper(GitWrapperI):
|
||||
|
||||
Executor.exec_cmd_only_success(['git', 'add', '--all'])
|
||||
out_status = Executor.exec_cmd_only_success(['git', 'status', '--porcelain'])
|
||||
Executor.exec_cmd_only_success(['git', 'commit', '-m', message])
|
||||
Logger.debug('[dvc-git] Commit all changes. Success.')
|
||||
changes = GitWrapper.parse_porcelain_files(out_status)
|
||||
if len(changes) == 0:
|
||||
return []
|
||||
|
||||
return GitWrapper.parse_porcelain_files(out_status)
|
||||
Executor.exec_cmd_only_success(['git', 'commit', '-m', '\'{}\''.format(message)])
|
||||
Logger.debug('[dvc-git] Commit all changes. Success.')
|
||||
return changes
|
||||
|
||||
def commit_all_changes_and_log_status(self, message):
|
||||
statuses = self.commit_all_changes(message)
|
||||
|
||||
Reference in New Issue
Block a user