Loading ...
Sorry, an error occurred while loading the content.

Re: [PATCH] New option for breaking hard links when saving files

Expand Messages
  • Erik Christiansen
    ... Looks very useful. 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
    Message 1 of 1 , Dec 2, 2002
    • 0 Attachment
      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 this
      > option activated, Vim will check if the file to be saved is a hard link,
      > if so, it will break the link.

      Looks very useful.

      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
      directory tree.

      ...

      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. :)

      Regards,
      Erik
    Your message has been successfully submitted and would be delivered to recipients shortly.