GNU bug report logs - #37215
[PATCH] vc-cvs-ignore writes absolute filenames and duplicate strings

Previous Next

Package: emacs;

Reported by: Wolfgang Scherer <Wolfgang.Scherer <at> gmx.de>

Date: Wed, 28 Aug 2019 22:33:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 37215 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Wolfgang Scherer <Wolfgang.Scherer <at> gmx.de>
Cc: 37215 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#37215: [PATCH] vc-cvs-ignore writes absolute filenames and
 duplicate strings
Date: Thu, 13 Feb 2020 21:36:29 +0200
> From: Wolfgang Scherer <Wolfgang.Scherer <at> gmx.de>
> Date: Thu, 30 Jan 2020 20:44:00 +0100
> Cc: 37215 <at> debbugs.gnu.org
> 
> >> -(defun vc-cvs-ignore (file &optional _directory _remove)
> >> -  "Ignore FILE under CVS."
> >> -  (vc-cvs-append-to-ignore (file-name-directory file) file))
> >> +(defun vc-cvs-ignore (file &optional directory _remove)
> >> +  "Ignore FILE under CVS.
> >> +FILE is either absolute or relative to DIRECTORY."
> >> +  (setq file (directory-file-name (expand-file-name file directory)))
> >> +  (vc-cvs-append-to-ignore (file-name-directory file) (file-name-nondirectory file)))
> > This is basically
> >
> > (file-name-nondirectory (directory-file-name (expand-file-name "foo" directory)))
> >
> > isn't it?
> It is for `file` equal to "foo" (a simple basename).
> >   In what circumstances does that evaluate to something other
> > than "foo"?
> If "foo" is something other than a simple basename (see below).
> >   That is, what DIRECTORY is doesn't seem to matter, if I'm
> > reading this right?
> 
> Your assumption, that `file` is always a simple basename is wrong.

Yes, but when does it make sense to have FILE not absolute and not
just a basename (i.e. with leading directories)?  Do we have such use
cases?  Because if that happens, the file's name will be added to
.cvsignore not in DIRECTORY but in one of its subdirectories.  Would
that be surprising?  And if so, perhaps we should warn about that or
even error out?




This bug report was last modified 5 years and 140 days ago.

Previous Next


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