GNU bug report logs -
#1408
23.0.60; git/*vc-dir*: does not register a symbolic link which befor was a directory with one singel file
Previous Next
Full log
Message #10 received at 1408 <at> emacsbugs.donarmstrong.com (full text, mbox):
severity 1408 wishlist
quit
Gregor Zattler <telegraph <at> gmx.net> writes:
> Disclaimer: I'm new to version control, perhaps I do not understand
> the situation. These are the steps to reproduce the problem:
>
> $ mkdir vc-emacs-test
> $ cd vc-emacs-test
> $ git init
> Initialized empty Git repository in /tmp/vc-emacs-test/.git/
> $ mkdir dir directory
> $ echo test >dir/test
> $ git add .
> $ git commit -a -m "one"
> Created initial commit cdd09ae: one
> 1 files changed, 1 insertions(+), 0 deletions(-)
> create mode 100644 dir/test
> $ rm -rf dir
> $ ln -s directory dir
> $ emacs-snapshot -Q
>
> ^X v d
>
> now in buffer *vc-dir* looks like this:
>
>
> VC backend : Git
> Working dir: /tmp/vc-emacs-test/
> Branch : master
>
> ./
> unregistered dir
> dir/
> removed dir/test
>
>
> move cursor on this line type 'i' to register. Following error
> messages are displayed:
>
> on the last line, copied from *Messages*:
> vc-do-command: Running git update-index --add -- dir...FAILED (status 128)
>
>
> In buffer *vc*:
>
> error: 'dir' appears as both a file and as a directory
> error: dir: cannot add to the index - missing --add option?
> fatal: Unable to process path dir
>
>
>
>
> I think this is a bug because emacs should handle this case (at least
> with a sensible message what to do).
>
> Actually this happend in a "real" scenario, I decided to reproduce a
> minimalistic example.
VC is not really prepared to deal with arbitrary commands on symlinks,
so it's not surprising that this corner case fails.
Changing a directory into a symlink between to VC operations is not
something that happens very frequently...
This bug report was last modified 15 years and 181 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.