Patrick Brinich-Langlois <[email protected]> writes: > When I run magit-blame on a buffer, it prompts me to save other > buffers (apparently, any unsaved buffer in the same Git repository). I > can see why it would be necessary to save the buffer I'm blaming, but > why is it necessary to save the others? I find this behavior annoying, > since I often can't remember what changes were made elsewhere and > whether they are worth preserving.
This happens whenever you run Git from Magit using the function `magit-maybe-save-repository-buffers' which is a member of the hooks `magit-pre-refesh-hook', `magit-pre-call-git-hook', `magit-pre-start-git-hook' (which is the one called in this case), and `magit-mode-setup-hook'. You could set `magit-save-repository-buffers' to always disable this, but that would disable saving the current buffer too, so you shouldn't. You could also remove the hook function from some of these hooks but that also would have the same undesirable effect. Finally you could redefine `magit-save-repository-buffers' to only save the current buffer, but again that would affect of code, which assumes every buffer that visits a file in the current repository. So you probably shouldn't do that either. And you probably don't have to anyway. This saving happens a lot (e.g. every time you refresh the status buffer using either "C-g" or from that buffer just "g" and you only just noticed this now, which probably means that the saving is not something that leads to undesirable results in your case (except that it "happens to early"). -- You received this message because you are subscribed to the Google Groups "magit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
