* bug#14995: [PATCH] vc-do-command ignores symbolic links
@ 2013-07-31 10:53 Xue Fuqiao
2013-07-31 14:13 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Xue Fuqiao @ 2013-07-31 10:53 UTC (permalink / raw)
To: 14995
tags patch
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
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#14995: [PATCH] vc-do-command ignores symbolic links
2013-07-31 10:53 bug#14995: [PATCH] vc-do-command ignores symbolic links Xue Fuqiao
@ 2013-07-31 14:13 ` Stefan Monnier
2013-07-31 22:38 ` Xue Fuqiao
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2013-07-31 14:13 UTC (permalink / raw)
To: Xue Fuqiao; +Cc: 14995
> 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?
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#14995: [PATCH] vc-do-command ignores symbolic links
2013-07-31 14:13 ` Stefan Monnier
@ 2013-07-31 22:38 ` Xue Fuqiao
2014-02-06 1:00 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Xue Fuqiao @ 2013-07-31 22:38 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 14995
On Wed, Jul 31, 2013 at 10:13 PM, Stefan Monnier
<monnier@iro.umontreal.ca> 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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#14995: [PATCH] vc-do-command ignores symbolic links
2013-07-31 22:38 ` Xue Fuqiao
@ 2014-02-06 1:00 ` Lars Ingebrigtsen
0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-06 1:00 UTC (permalink / raw)
To: Xue Fuqiao; +Cc: 14995
Xue Fuqiao <xfq.free@gmail.com> writes:
>> 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.
Then I guess this can be closed. If there is a bug here, please reopen
this report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-06 1:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-31 10:53 bug#14995: [PATCH] vc-do-command ignores symbolic links Xue Fuqiao
2013-07-31 14:13 ` Stefan Monnier
2013-07-31 22:38 ` Xue Fuqiao
2014-02-06 1:00 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.