Avoid unncessary write to the location log when a file is unlocked and then added back with unchanged content.
Implemented with no additional overhead of compares etc. This is safe to do for presence logs because of their locality of change; a given repo's presence logs are only ever changed in that repo, or in a repo that has just been actively changing the content of that repo. So, we don't need to worry about a split-brain situation where there'd be disagreement about the location of a key in a repo. And so, it's ok to not update the timestamp when that's the only change that would be made due to logging presence info.
This commit is contained in:
parent
82ba8c9a6a
commit
f9adb905fc
7 changed files with 65 additions and 14 deletions
|
@ -7,3 +7,5 @@ I keep a database file in git-annex so it stays synced across several machines.
|
|||
git annex sync --content
|
||||
|
||||
This works fine except it creates an entry in the log for the database file even if that stays unchanged. I would like an option that just returns to the state before `git annex unlock` if the file has not been changed. Maybe `git annex add --restore-unchanged`?
|
||||
|
||||
> [[done]] --[[Joey]]
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
[[!comment format=mdwn
|
||||
username="joey"
|
||||
subject="""comment 2"""
|
||||
date="2015-10-12T17:37:59Z"
|
||||
content="""
|
||||
Ok, I found a way to implement it with no added overhead in the common
|
||||
case!
|
||||
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue