[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Auto revert mode but only for git projects
From: |
Andrea Crotti |
Subject: |
Auto revert mode but only for git projects |
Date: |
Sun, 06 Jun 2010 17:52:14 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (darwin) |
When using branches with emacs reverting the buffers can be quite
tedious.
But also activating auto-revert-mode everywhere is not such a good idea.
So I thought that I could automatically activate auto-revert-mode BUT
only when
1. I'm in a git repo
2. I have at least 2 branches
What could be the cleaner way to do it?
Textmate.el has already something to look if it's a git repo, then I can
check for more branches with
--8<---------------cut here---------------start------------->8---
git branch | wc -l
--8<---------------cut here---------------end--------------->8---
for example and maybe add a hook in find-file-hooks?
Could that work?
- Auto revert mode but only for git projects,
Andrea Crotti <=