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


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Wolfgang Scherer <Wolfgang.Scherer <at> gmx.de>
Cc: 37215 <at> debbugs.gnu.org
Subject: bug#37215: [PATCH] vc-cvs-ignore writes absolute filenames and duplicate strings
Date: Wed, 22 Jan 2020 13:43:15 +0100
Wolfgang Scherer <Wolfgang.Scherer <at> gmx.de> writes:

> Am 15.09.19 um 15:12 schrieb Lars Ingebrigtsen:
>> Wolfgang Scherer <Wolfgang.Scherer <at> gmx.de> writes:
>>
>>> +        ;; FIXME this is a pcvs variable.
>>> +        (if (bound-and-true-p cvs-sort-ignore-file)
>>> +            (sort-lines nil (point-min) (point-max)))
>> Does it make sense to heed a pcvs variable here?  I think it would be
>> surprising that vc-cvs behaves differently depending on whether you've
>> loaded pcvs or not.
>
> Just to clarifiy: my patch does not introduce this FIXME. Only the
> indentation is changed. This question should be handled in a separate
> bug report.

Right; sorry.  Looking at the patch again, I don't quite get the logic here:

> -(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?  In what circumstances does that evaluate to something other
than "foo"?  That is, what DIRECTORY is doesn't seem to matter, if I'm
reading this right?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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.