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

Package: emacs;

Reported by: Gregor Zattler <telegraph <at> gmx.net>

Date: Sat, 22 Nov 2008 00:10:04 UTC

Severity: wishlist

To reply to this bug, email your comments to 1408 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1408; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Gregor Zattler <telegraph <at> gmx.net>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Gregor Zattler <telegraph <at> gmx.net>
To: emacs-pretest-bug <at> gnu.org
Cc: rfrancoise <at> debian.org
Subject: 23.0.60; git/*vc-dir*: does not register a symbolic link which befor was a directory with one singel file
Date: Fri, 21 Nov 2008 19:04:59 -0500
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. 

Thank you for emacs and version control in emacs,
Gregor

	

In GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11)
 of 2008-11-18 on del, modified by Debian
 (emacs-snapshot package, version 1:20081113-1)
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure  '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.60/site-lisp:/usr/share/emacs/site-lisp' '--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: 
  value of $LC_COLLATE: de_DE.utf8
  value of $LC_CTYPE: de_DE.utf8
  value of $LC_MESSAGES: POSIX
  value of $LC_MONETARY: de_DE.utf8
  value of $LC_NUMERIC: de_DE.utf8
  value of $LC_TIME: de_DE.utf8
  value of $LANG: 
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-x v d <return> <down> <down> <down> <down> <down> 
<right> <right> <right> <right> <right> i <down-mouse-1> 
<mouse-1> <down-mouse-1> <mouse-movement> <mouse-movement> 
<drag-mouse-1> C-x o C-SPC <escape> > <escape> w C-x 
b <return> C-x 1 m m m <up> <up> i <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> C-x o <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <home> C-SPC <escape> > <escape> w C-x 
o C-x b C-g C-g <up> <up> <up> C-x o <up> <up> <up> 
<down> m <help-echo> <help-echo> <help-echo> <down-mouse-3> 
<down-mouse-3> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <down-mouse-3> <help-echo> 
<help-echo> i i i C-x o i <up> C-x o <up> i <up> C-x 
o <up> u u <up> <up> i <down> C-x o <down> <down> i 
C-x o <up> <up> i M-x r e p <tab> o <tab> r <tab> 
<return>

Recent messages:
vc-do-command: Running git update-index --add -- dir...FAILED (status 128)
Mark set
Press C-c C-c when you are done editing.
Registering (/tmp/vc-emacs-test/dir/test)... 
vc-do-command: Running git update-index --add -- dir/test...FAILED (status 128)
Mark set
Press C-c C-c when you are done editing.
Registering (/tmp/vc-emacs-test/dir)... 
vc-do-command: Running git update-index --add -- dir...FAILED (status 128)
Making completion list... [2 times]




bug reassigned from package `emacs' to `emacs,vc-dir'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Wed, 17 Dec 2008 19:30:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#1408; Package emacs,vc-dir. (Sun, 28 Dec 2008 18:40:04 GMT) Full text and rfc822 format available.

Message #10 received at 1408 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: Gregor Zattler <telegraph <at> gmx.net>
Cc: 1408 <at> debbugs.gnu.org, rfrancoise <at> debian.org
Subject: Re: bug#1408: 23.0.60; git/*vc-dir*: does not register a symbolic link which befor was a directory with one singel file
Date: Sun, 28 Dec 2008 10:28:40 -0800 (PST)
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...






Severity set to `wishlist' from `normal' Request was from Dan Nicolaescu <dann <at> ics.uci.edu> to control <at> emacsbugs.donarmstrong.com. (Sun, 28 Dec 2008 18:40:05 GMT) Full text and rfc822 format available.

bug reassigned from package `emacs,vc-dir' to `emacs,vc'. Request was from Juanma Barranquero <lekktu <at> gmail.com> to control <at> emacsbugs.donarmstrong.com. (Tue, 17 Mar 2009 09:30:03 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 180 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.