From 1a71d33190a0744f4416be176c944ad938fa17ee Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 9 Feb 2017 15:40:44 -0400 Subject: import --reinject-duplicates This is the same as running git annex reinject --known, followed by git-annex import. The advantage to having it in one command is that it only has to hash each file once; the two commands have to hash the imported files a second time. This commit was sponsored by Shane-o on Patreon. --- doc/git-annex-import.mdwn | 13 +++++++++---- .../comment_4_767dfbaf72de52bd5fbe4c37add5bd91._comment | 15 +++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 doc/todo/Alternative_mode_control_for_import/comment_4_767dfbaf72de52bd5fbe4c37add5bd91._comment (limited to 'doc') diff --git a/doc/git-annex-import.mdwn b/doc/git-annex-import.mdwn index 92519fce6..22b3c3941 100644 --- a/doc/git-annex-import.mdwn +++ b/doc/git-annex-import.mdwn @@ -33,10 +33,9 @@ Several options can be used to adjust handling of duplicate files. Do not delete files from the import location. - This could allow importing the same files repeatedly - to different locations in a repository. More likely, it could be used to - import the same files to a number of different branches or separate git - repositories. + Running with this option repeatedly can import the same files into + different git repositories, or branches, or different locations in a git + repository. * `--deduplicate` @@ -53,6 +52,12 @@ Several options can be used to adjust handling of duplicate files. Does not import any files, but any files found in the import location that are duplicates are deleted. +* `--reinject-duplicates` + + Imports files that are not duplicates. Files that are duplicates have + their content reinjected into the annex (similar to + [[git-annex-reinject]]). + * `--force` Allow existing files to be overwritten by newly imported files. diff --git a/doc/todo/Alternative_mode_control_for_import/comment_4_767dfbaf72de52bd5fbe4c37add5bd91._comment b/doc/todo/Alternative_mode_control_for_import/comment_4_767dfbaf72de52bd5fbe4c37add5bd91._comment new file mode 100644 index 000000000..70c49cf79 --- /dev/null +++ b/doc/todo/Alternative_mode_control_for_import/comment_4_767dfbaf72de52bd5fbe4c37add5bd91._comment @@ -0,0 +1,15 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 4""" + date="2017-02-09T19:33:46Z" + content=""" +Actually, import --deduplicate, --skip-duplicates, --clean-duplicates +are implemeted naively and do hash files twice. So it's +the same efficiency.. + +But, I just finished a more complicated implementation that avoids +the second hashing. + +That does make the combined action worth adding, I suppose. Done so as +--reinject-duplicates. +"""]] -- cgit v1.2.3