dirstate validator includes ctime so is broken by hardlinking
Bug #741515 reported by
Martin Pool
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
From Aaron's post in the current bzr-colo thread <http://
The current bzr dirstate validator includes the file ctime (on posix).
This which means the saved hash will be invalidated when a file is hardlinked, which somewhat defeats the benefit of hardlinking. (We could possibly update the tree at the same time we copy it.)
If we didn't include the ctime, it'd be possible for the user to 'fool' bzr by for example 'cp -p' of a file into the tree that has the exact same mtime and size into the tree. I don't know if that really matters.
We could even put in an option to change this.
summary: |
- dirstate validator includes ctime + dirstate validator includes ctime so is broken by hardlinking |
description: | updated |
tags: | added: check-for-breezy |
To post a comment you must log in.
We use ctime to warn us that we need to check the mode, I think. But I can see your point that we already have mode when we do the stat, so we don't need to use it as a second check.