From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xue Fuqiao Newsgroups: gmane.emacs.bugs Subject: bug#14995: [PATCH] vc-do-command ignores symbolic links Date: Thu, 1 Aug 2013 06:38:57 +0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1375310416 25048 80.91.229.3 (31 Jul 2013 22:40:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Jul 2013 22:40:16 +0000 (UTC) Cc: 14995@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 01 00:40:18 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V4f45-0007G9-7J for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Aug 2013 00:40:17 +0200 Original-Received: from localhost ([::1]:60426 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4f44-00070f-QI for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Jul 2013 18:40:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4f3w-00070V-Li for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2013 18:40:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4f3r-0000u2-ES for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2013 18:40:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38991) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4f3r-0000td-8z for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2013 18:40:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V4f3q-0007W0-88 for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2013 18:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Xue Fuqiao Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Jul 2013 22:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14995 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 14995-submit@debbugs.gnu.org id=B14995.137531034528725 (code B ref 14995); Wed, 31 Jul 2013 22:40:01 +0000 Original-Received: (at 14995) by debbugs.gnu.org; 31 Jul 2013 22:39:05 +0000 Original-Received: from localhost ([127.0.0.1]:33305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4f2v-0007TF-BQ for submit@debbugs.gnu.org; Wed, 31 Jul 2013 18:39:05 -0400 Original-Received: from mail-oa0-f46.google.com ([209.85.219.46]:63794) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4f2t-0007Sf-0W for 14995@debbugs.gnu.org; Wed, 31 Jul 2013 18:39:03 -0400 Original-Received: by mail-oa0-f46.google.com with SMTP id l10so2766044oag.5 for <14995@debbugs.gnu.org>; Wed, 31 Jul 2013 15:38:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=EavkYmV94kauN4OwT41Ui/dsi+1hhYq1CEoBC5nZXc8=; b=r+ZysCuZ6XYdOYbSkvW27mcKTSbvj7Ox9x4KWWGAaJp8An5VYS15X8+W3t5dT+b5em qdwYbgD3sdYPGrSwJzLkC6VHw3LSp2JaYBWGhEUw0PzHZR8ligUa+g7GQ6f3HO0r0958 CFDIsaAfZxeDPEwsgylCjFzWYBPWsCtXgadjj8L+hynV1q+Y3HTCUzTlYU3dd4aXawN7 kbAqKjb6/XWykTqXYxTsHqQerhSn90jPn7Ox6TDucpvtxb5vyyaygDGUdCYEPwLvR+h/ eK1+c9njtvtNoLC/mJ9JgNkh8Hr0bch+N1jiCAIlGQIDoly58QA8O9kKUTF+m7ypOHTf KRXw== X-Received: by 10.50.9.7 with SMTP id v7mr958034iga.51.1375310337338; Wed, 31 Jul 2013 15:38:57 -0700 (PDT) Original-Received: by 10.42.28.3 with HTTP; Wed, 31 Jul 2013 15:38:57 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:76865 Archived-At: On Wed, Jul 31, 2013 at 10:13 PM, Stefan Monnier wrote: >> This small patch fixes a bug in vc-do-command: > >> === modified file 'lisp/vc/vc-dispatcher.el' >> --- lisp/vc/vc-dispatcher.el 2013-06-15 02:50:47 +0000 >> +++ lisp/vc/vc-dispatcher.el 2013-07-31 10:49:27 +0000 >> @@ -275,11 +275,8 @@ >> that is inserted into the command line before the filename. >> Return the return value of the slave command in the synchronous >> case, and the process object in the asynchronous case." >> - ;; FIXME: file-relative-name can return a bogus result because >> - ;; it doesn't look at the actual file-system to see if symlinks >> - ;; come into play. >> (let* ((files >> - (mapcar (lambda (f) (file-relative-name (expand-file-name f))) >> + (mapcar (lambda (f) (file-relative-name (file-truename >> (expand-file-name f)))) >> (if (listp file-or-list) file-or-list (list file-or-list)))) >> (full-command >> ;; What we're doing here is preparing a version of the command > > I'm not completely sure this fix is needed (and I'd rather avoid > calling file-truename, if possible). Do you have a concrete case where > this causes problems? No. I made this patch in passing when I was reading vc-dispatcher. -- Best regards, Xue Fuqiao. http://www.gnu.org/software/emacs/