From 879f0e7da58337a4ebfb4a1bb059a69b3ddc96aa Mon Sep 17 00:00:00 2001 From: "http://joeyh.name/" Date: Thu, 6 Feb 2014 17:05:46 +0000 Subject: Added a comment --- .../comment_3_fd39e6ceffd9bf0709658c34945d8699._comment | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/forum/Locking_and_then_unlocking_a_file_results_in_file_changed_warning/comment_3_fd39e6ceffd9bf0709658c34945d8699._comment (limited to 'doc') diff --git a/doc/forum/Locking_and_then_unlocking_a_file_results_in_file_changed_warning/comment_3_fd39e6ceffd9bf0709658c34945d8699._comment b/doc/forum/Locking_and_then_unlocking_a_file_results_in_file_changed_warning/comment_3_fd39e6ceffd9bf0709658c34945d8699._comment new file mode 100644 index 000000000..5b23df870 --- /dev/null +++ b/doc/forum/Locking_and_then_unlocking_a_file_results_in_file_changed_warning/comment_3_fd39e6ceffd9bf0709658c34945d8699._comment @@ -0,0 +1,16 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="206.74.132.139" + subject="comment 3" + date="2014-02-06T17:05:45Z" + content=""" +Recent versions of git-annex have tried to extend the --force option to be needed in any operation that can possibly cause data loss. This includes locking a file, since that throws away any changes. + +Note that `git annex lock` does not check if the file is unmodified. For a few reasons including + +* some backends don't include a checksum +* it would be expensive to check a checksum +* the file could get modified after or during a checksum check, and those modifications would be missed + +If you are sure you want to throw away any changes, use --force as suggested. If not, use `git annex add $file`, and assuming you're using a checksumming backend, it will notice the file has not changed and do what you want `git annex lock $file` to have done in this case. +"""]] -- cgit v1.2.3