Makes sense. Attached is a quick patch that Marius might like to consider; it works nicely for me (in Emacs 23 at least). The patch tells save-some-buffers to consider only buffers where magit-get-top- dir returns the top magit-status dir.

One consequence is that if one has a dirty file inside a git submodule, then magit-status in the parent repository would not prompt to save that file; it might be better to instead consider unsaved buffers that have a git top dir *somewhere* under the magit-status dir.

-Steve

Attachment: 0001-Only-prompt-to-save-modified-buffers-that-have-the-s.patch
Description: Binary data






On 4 May 2009, at 21:32, Leo wrote:


Hi there,

When you call magit-satus on a project, magit will prompt all buffers
to be saved. I have found this rather annoying.

For example, if gnus is running, magit will ask me to save .newsrc but
even gnus never asks this file to be saved. If there is unsaved
abbrevs, magit will ask them to be saved too.

I think buffers (files) unrelated to a git project should not be
bothered by magit.

Thank you.

Leo


Reply via email to