git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* (unknown)
@ 2007-10-22 18:16 racin
  2007-10-23  4:31 ` git.el fails on non-git managed files Shawn O. Pearce
  0 siblings, 1 reply; 3+ messages in thread
From: racin @ 2007-10-22 18:16 UTC (permalink / raw)
  To: git


Hello,

I found the following on the development version of git.el: saving
non-git-managed files in Emacs threw an error.

It is due to a simple error in the call to condition-case in a
recently added function, git-update-save-file.

I attached the patch for your convenience.

Regards,
Matthieu Lemerre

PS: Please Cc me when you ackwowledge; I'm not subscribed to the list.
As a matter of fact, I found the bug only because I didn't find git.el
for my distribution (debian) so I got directly from the development
version on the website.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git.el fails on non-git managed files
  2007-10-22 18:16 (unknown) racin
@ 2007-10-23  4:31 ` Shawn O. Pearce
  2007-10-23 18:30   ` Matthieu Lemerre
  0 siblings, 1 reply; 3+ messages in thread
From: Shawn O. Pearce @ 2007-10-23  4:31 UTC (permalink / raw)
  To: racin; +Cc: git

racin@free.fr wrote:
> I found the following on the development version of git.el: saving
> non-git-managed files in Emacs threw an error.
> 
> It is due to a simple error in the call to condition-case in a
> recently added function, git-update-save-file.
> 
> I attached the patch for your convenience.

I'm not sure what happened, but I didn't receive a patch with
your email.  Would you mind resending it to the list?  You may
also want to file a bug with your distribution to get the Emacs
bindings included.
 
-- 
Shawn.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git.el fails on non-git managed files
  2007-10-23  4:31 ` git.el fails on non-git managed files Shawn O. Pearce
@ 2007-10-23 18:30   ` Matthieu Lemerre
  0 siblings, 0 replies; 3+ messages in thread
From: Matthieu Lemerre @ 2007-10-23 18:30 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

"Shawn O. Pearce" <spearce@spearce.org> writes:

> racin@free.fr wrote:
>> I found the following on the development version of git.el: saving
>> non-git-managed files in Emacs threw an error.
>> 
>> It is due to a simple error in the call to condition-case in a
>> recently added function, git-update-save-file.
>> 
>> I attached the patch for your convenience.
>
> I'm not sure what happened, but I didn't receive a patch with
> your email.  Would you mind resending it to the list?  You may
> also want to file a bug with your distribution to get the Emacs
> bindings included.

Sure; the SMTP server of my ISP behaved weirdly yesterday and I had to
use one of these webmail applications.  This time it should be OK.


[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 624 bytes --]

diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index 4286d16..ff55607 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -1353,7 +1353,7 @@ Commands:
   "Update the corresponding git-status buffer when a file is saved.
 Meant to be used in `after-save-hook'."
   (let* ((file (expand-file-name buffer-file-name))
-         (dir (condition-case nil (git-get-top-dir (file-name-directory file))))
+         (dir (condition-case nil (git-get-top-dir (file-name-directory file)) (error nil)))
          (buffer (and dir (git-find-status-buffer dir))))
     (when buffer
       (with-current-buffer buffer

[-- Attachment #3: Type: text/plain, Size: 71 bytes --]


I'll also file a bug to debian, that's a good idea.

Matthieu Lemerre

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-23 18:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-22 18:16 (unknown) racin
2007-10-23  4:31 ` git.el fails on non-git managed files Shawn O. Pearce
2007-10-23 18:30   ` Matthieu Lemerre

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 NNTP newsgroup(s).