This commit is contained in:
Joey Hess 2017-09-26 14:32:31 -04:00
parent f3701e659e
commit e3a151cf67
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -0,0 +1,21 @@
[[!comment format=mdwn
username="joey"
subject="""comment 1"""
date="2017-09-26T18:17:58Z"
content="""
This is caused by an intentional feature. When `git annex add` is run
on a modified file, the old metadata for the file (as committed to HEAD)
is copied over. This prevents metadata being lost when modifying a file.
The same would happen if the file were deleted and then new content added
with the same filename. It seems like different things should be done in
these cases, but the same thing can end up staged in several different
cases, so the cases can't be distinguished.
Committing the rename or deletion before adding a file back with the same
name allows distinguishing from a modification of the file, and so that
avoids the problem.
I agree this led to confusing behavior here, but I'll bet it's also
prevented confusing loss of metadata for people when editing a file..
"""]]