Re: [PATCH] New option for breaking hard links when saving files
- On Sat, Nov 30, 2002 at 08:11:22PM +0100, Guillermo Ontañón wrote:
> The patch below adds a new option to Vim called 'breakhlinks', with thisLooks very useful.
> option activated, Vim will check if the file to be saved is a hard link,
> if so, it will break the link.
Have you considered a more general 'breaklinks'? e.g. If the original
source is in /usr/local/src, and the working "copy" is in ~, then hard
links will fail, with "Invalid cross-device link"
GNU cp will make either a hard or symlinked "copy", given -l or -s.
Also, from the manpage for another related utility:
>>>lndir - create a shadow directory of symbolic links to another
You create a shadow directory containing links to the real source,
which you will have usually mounted from a remote machine.
If the file in the original source is deliberately deleted, is it
better to have a detectable:
xxxxx: broken symbolic link to /usr/local/src/super_app/xxxxx
or the orphan _real_ copy that results if a hardlink is used?
(Assuming link count was 2)
Hope these ruminations are interesting, bordering on helpful. :)