summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-09-14 13:47:22 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-09-14 13:47:22 -0400
commit949b3f69d0f2b2a5c32a00d05d09a0b312fad35a (patch)
treecc81f8d61652741e365309b86a8020edbce6318e /doc
parent1ac6217c74b63b9b154d5ee14ed72df8b5aa9268 (diff)
optimize: A new subcommand that either gets or drops file content as needed to work toward meeting the configured numcopies setting.
This is currently rather simplistic, though still useful. In the future, it could become smarter about what content is stored where, etc.
Diffstat (limited to 'doc')
-rw-r--r--doc/git-annex.mdwn5
-rw-r--r--doc/walkthrough.mdwn1
-rw-r--r--doc/walkthrough/optimizing_repositories.mdwn13
3 files changed, 19 insertions, 0 deletions
diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn
index 0a484a384..8264c31b3 100644
--- a/doc/git-annex.mdwn
+++ b/doc/git-annex.mdwn
@@ -157,6 +157,11 @@ Many git-annex commands will stage changes for later `git commit` by you.
To avoid expensive checksum calculations, specify --fast
+* optimize [path ...]
+
+ Either gets or drops file content, as needed, to work toward meeting the
+ configured numcopies setting.
+
* unused
Checks the annex for data that does not correspond to any files present
diff --git a/doc/walkthrough.mdwn b/doc/walkthrough.mdwn
index eaae6b455..b0eb25815 100644
--- a/doc/walkthrough.mdwn
+++ b/doc/walkthrough.mdwn
@@ -18,5 +18,6 @@ A walkthrough of the basic features of git-annex.
fsck:_verifying_your_data
fsck:_when_things_go_wrong
backups
+ optimizing_repositories
more
"""]]
diff --git a/doc/walkthrough/optimizing_repositories.mdwn b/doc/walkthrough/optimizing_repositories.mdwn
new file mode 100644
index 000000000..0f17f1dea
--- /dev/null
+++ b/doc/walkthrough/optimizing_repositories.mdwn
@@ -0,0 +1,13 @@
+Once you have multiple repositories, and have perhaps configured numcopies,
+any given file can have many more copies than is needed, or perhaps fewer
+than you would like. Fsck can detect the latter problem, but there's another
+command that can help deal with both problems.
+
+The optimize subcommand either gets or drops file content, as needed,
+to work toward meeting the configured numcopies setting.
+
+ # git annex optimize
+ get my_cool_big_file (from laptop...) ok
+ drop other_file ok
+ # git annex optimize --numcopies=2
+ get other_file ok