On Sun, May 2, 2010 at 7:31 PM, Nazri Ramliy <[email protected]> wrote:

> With hard link it's harder (impossible?) to determine what the 'target'
> is based on their file names because of ambiguity: one hardlink is no
> different than another - they are all first class 'file names'.
>

You're right, of course. I wasn't thinking.


> Using the SHA1 of the content of the target file as the unique id into
> its associated undo file might solve the problem.
>

I had tried out using hashes instead of file mtimes to determine undo file
validity in an earlier version of this patch, but gave it up after it was
suggested that the potentially large time requirement for hashing large
files wasn't worth it when you consider that, in the majority of cases, a
different file mtime means different file contents.

So I don't think hashing is an appropriate solution for dealing with hard
links. Perhaps it could be available as an option, but for now I think it is
OK if we can't handle matching undo files for many hard links to the same
file.


- Jordan

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui