git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Matthieu Lemerre <racin@free.fr>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: Re: git.el fails on non-git managed files
Date: Tue, 23 Oct 2007 20:30:10 +0200	[thread overview]
Message-ID: <87lk9tadl9.fsf@free.fr> (raw)
In-Reply-To: <20071023043107.GZ14735@spearce.org> (Shawn O. Pearce's message of "Tue\, 23 Oct 2007 00\:31\:07 -0400")

[-- 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

      reply	other threads:[~2007-10-23 18:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=87lk9tadl9.fsf@free.fr \
    --to=racin@free.fr \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.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://80x24.org/mirrors/git.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).