unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Wolfgang Scherer <Wolfgang.Scherer@gmx.de>
Cc: 37215@debbugs.gnu.org, larsi@gnus.org
Subject: bug#37215: [PATCH] vc-cvs-ignore writes absolute filenames and duplicate strings
Date: Thu, 13 Feb 2020 21:36:29 +0200	[thread overview]
Message-ID: <831rqyqnya.fsf@gnu.org> (raw)
In-Reply-To: <543853fe-6cc2-9d1e-093e-e90e0886eed2@gmx.de> (message from Wolfgang Scherer on Thu, 30 Jan 2020 20:44:00 +0100)

> From: Wolfgang Scherer <Wolfgang.Scherer@gmx.de>
> Date: Thu, 30 Jan 2020 20:44:00 +0100
> Cc: 37215@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?





  reply	other threads:[~2020-02-13 19:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28 22:32 bug#37215: [PATCH] vc-cvs-ignore writes absolute filenames and duplicate strings Wolfgang Scherer
2019-09-15 13:12 ` Lars Ingebrigtsen
2020-01-05  3:59   ` Wolfgang Scherer
2020-01-22 12:43     ` Lars Ingebrigtsen
2020-01-30 19:44       ` Wolfgang Scherer
2020-02-13 19:36         ` Eli Zaretskii [this message]
2020-02-14  1:24           ` Wolfgang Scherer
2020-02-14  8:33             ` Eli Zaretskii
2020-02-15  1:42               ` Wolfgang Scherer
2020-02-15  7:44                 ` Eli Zaretskii
2020-02-15 12:55                   ` Dmitry Gutov
2020-02-19 23:02                     ` Wolfgang Scherer
2020-02-16  0:20                   ` Wolfgang Scherer
2020-02-19 23:06                   ` Wolfgang Scherer
2020-02-21  9:31                     ` Eli Zaretskii
2020-02-21 10:16                       ` Dmitry Gutov
2020-02-21 20:44                         ` Wolfgang Scherer
2020-02-21 21:30                           ` Dmitry Gutov
2020-02-21 22:23                             ` Wolfgang Scherer
2020-02-21 20:32                       ` Wolfgang Scherer
2020-02-22  8:59                         ` Eli Zaretskii
2020-02-14  2:50           ` Wolfgang Scherer
2020-02-14  8:39             ` Eli Zaretskii
2020-02-14  9:24               ` Eli Zaretskii
2020-02-28 16:07 ` Mattias Engdegård
2020-02-28 16:24   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=831rqyqnya.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=37215@debbugs.gnu.org \
    --cc=Wolfgang.Scherer@gmx.de \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).