aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-10-02 13:55:26 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-10-02 13:55:26 -0400
commit6827ee5dff243fde8f7343937feb844d12d51dcf (patch)
tree56f13d5945115b9b2920c4ea3dff243e6ccdf933 /doc
parentb530f18fda5f1fb611b072440ee810ff6bacc3b0 (diff)
info: Improve cleanup of stale transfer info files.
In my git-annex repos, I found some stale transfer info files without lock files. Pass a mode to tryLockExclusive, so it will create the lock file if not present, and so not fail to clean up such transfer info files. Normally, transfer info files are accompanied by a lock file. But, when alwaysRunTransfer is used, the locking can fail and it will still write the transfer info file. Perhaps there are other cases too? Note that mkProgressUpdater's meter writes to the transfer info file too, and it might be possible for that meter to fire after runTransfer has cleaned up. This commit was sponsored by andrea rota.
Diffstat (limited to 'doc')
-rw-r--r--doc/forum/Can_I_purge_.git__47__annex__47__transfer_directory___63__/comment_3_cf2ae4db1fdb421b59d85edd9e58b868._comment19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/forum/Can_I_purge_.git__47__annex__47__transfer_directory___63__/comment_3_cf2ae4db1fdb421b59d85edd9e58b868._comment b/doc/forum/Can_I_purge_.git__47__annex__47__transfer_directory___63__/comment_3_cf2ae4db1fdb421b59d85edd9e58b868._comment
new file mode 100644
index 000000000..3c2f8016a
--- /dev/null
+++ b/doc/forum/Can_I_purge_.git__47__annex__47__transfer_directory___63__/comment_3_cf2ae4db1fdb421b59d85edd9e58b868._comment
@@ -0,0 +1,19 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 3"""
+ date="2017-10-02T16:55:59Z"
+ content="""
+It's fine to delete .git/annex/transfer/ at any time.
+
+Those files are used to make `git annex info` (and the webapp) be able to
+show what transfers are in progress. Normally they're cleaned up when a
+transfer finishes; if you interrupt git-annex they will be left behind.
+
+Running `git annex info` is also supposed to clean up the stale transfer
+info files, but it was broken -- now fixed.
+
+The only time you get files in .git/annex/bad/ is when fsck finds a file
+got corrupted somehow and moves its content there. It's fine to delete
+those unless you were planning to recover or examine the corrupted file in
+some way.
+"""]]