[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Better support for running magit over tramp
From: |
Leo |
Subject: |
Re: Better support for running magit over tramp |
Date: |
Fri, 06 Aug 2010 08:37:33 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (Mac OS X 10.6.4) |
On 2010-08-06 08:03 +0100, Michael Albinus wrote:
> Leo <address@hidden> writes:
>
>> According to the updated doc, I have changed the patch as follows. Would
>> you recommend this to be installed in magit? Thanks. Leo
>>
>> + (dired-uncache remote-directory)))
>
> Oops. `remote-directory' was meant as place holder only. I will precise
> in Tramp's doc, seems to be misunderstandable.
That's my fault. I read the doc yesterday and just copied it today
forgetting to replace it with default-directory. Sorry for the
sloppiness. Patch regenerated as follows (also corrected a typo):
diff --git a/magit.el b/magit.el
index cc61be8..042a289 100644
--- a/magit.el
+++ b/magit.el
@@ -1480,6 +1480,7 @@ FUNC should leave point at the end of the modified region"
(error "Git failed"))
successp)))
+(autoload 'dired-uncache "dired")
(defun magit-process-sentinel (process event)
(let ((msg (format "Git %s." (substring event 0 -1)))
(successp (string-match "^finished" event)))
@@ -1487,7 +1488,9 @@ FUNC should leave point at the end of the modified region"
(let ((inhibit-read-only t))
(goto-char (point-max))
(insert msg "\n")
- (message msg)))
+ (message msg))
+ (unless (memq (process-status process) '(run open))
+ (dired-uncache default-directory)))
(setq magit-process nil)
(magit-set-mode-line-process nil)
(magit-refresh-buffer magit-process-client-buffer)))
> Maybe `default-directory' is OK in your case. I do not know which is
> the default directory of magit's start-file-process buffer. If you
> know, that only files in that directory or in subdirectories are
> changed, `default-directory' would be OK.
I think default-directory is fine. It points to the root of the git
repo.
> Best regards, Michael.
Regards,
Leo