unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1408: 23.0.60; git/*vc-dir*: does not register a symbolic link which befor was a directory with one singel file
@ 2008-11-22  0:04 Gregor Zattler
  2008-12-28 18:28 ` Dan Nicolaescu
  0 siblings, 1 reply; 3+ messages in thread
From: Gregor Zattler @ 2008-11-22  0:04 UTC (permalink / raw)
  To: emacs-pretest-bug; +Cc: rfrancoise

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]






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#1408: 23.0.60; git/*vc-dir*: does not register a symbolic link which befor was a directory with one singel file
  2008-11-22  0:04 bug#1408: 23.0.60; git/*vc-dir*: does not register a symbolic link which befor was a directory with one singel file Gregor Zattler
@ 2008-12-28 18:28 ` Dan Nicolaescu
  2008-12-28 18:40   ` Processed: " Emacs bug Tracking System
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Nicolaescu @ 2008-12-28 18:28 UTC (permalink / raw)
  To: Gregor Zattler; +Cc: 1408, rfrancoise

severity 1408 wishlist
quit


Gregor Zattler <telegraph@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...








^ permalink raw reply	[flat|nested] 3+ messages in thread

* Processed: Re: bug#1408: 23.0.60; git/*vc-dir*: does not register a symbolic link which befor was a directory with one singel file
  2008-12-28 18:28 ` Dan Nicolaescu
@ 2008-12-28 18:40   ` Emacs bug Tracking System
  0 siblings, 0 replies; 3+ messages in thread
From: Emacs bug Tracking System @ 2008-12-28 18:40 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: Emacs Bugs, vcdir for {1408}

Processing commands for control@emacsbugs.donarmstrong.com:

> severity 1408 wishlist
bug#1408: 23.0.60; git/*vc-dir*: does not register a symbolic link which befor was a directory with one singel file
Warning: Unknown package 'vc-dir'
Severity set to `wishlist' from `normal'

> quit
Stopping processing here.

Please contact me if you need assistance.

Don Armstrong
(administrator, Emacs bugs database)




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-28 18:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-22  0:04 bug#1408: 23.0.60; git/*vc-dir*: does not register a symbolic link which befor was a directory with one singel file Gregor Zattler
2008-12-28 18:28 ` Dan Nicolaescu
2008-12-28 18:40   ` Processed: " Emacs bug Tracking System

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).