threads / discuss / 29289

Auto-refresh git-gui

Subject: Auto-refresh git-gui

## tl;dr

4 messages between Jan 4, 2012 and Jan 10, 2012.

replies: 3people: 3as markdown or json

Victor Engmark· Jan 4, 2012, 09:15 UTC · lore

Is there some way to make `git-gui` rescan automatically when anything in the repository changes? That would enable a more fluid workflow when combined with other Git tools.

Use cases:
* "Dashboard" functionality to keep track of changes without having to
run `git status` all the time.
* `git` / `git-gui` introduction: See what happens live while working
with the other tool.
-- 
Victor Engmark
terreActive AG
Kasinostrasse 30
CH-5001 Aarau
Tel: +41 62 834 00 55
Fax: +41 62 823 93 56
www.terreactive.ch

Wir sichern Ihren Erfolg - seit 15 Jahren
Clemens Buchacher· Jan 4, 2012, 16:33 UTC · re: Victor Engmark · lore

Re: Auto-refresh git-gui

Hi Victor,
On Wed, Jan 04, 2012 at 10:15:47AM +0100, Victor Engmark wrote:
>
> Is there some way to make `git-gui` rescan automatically when anything
> in the repository changes?

How about doing it each time git gui gets focus? Or if that's to much do it only if it gets focus _and_ the index has changed?

Clemens
Victor Engmark· Jan 5, 2012, 08:03 UTC · re: Clemens Buchacher · lore

Re: Auto-refresh git-gui

On Wed, Jan 04, 2012 at 05:33:40PM +0100, Clemens Buchacher wrote:
Show 9 quoted lines
> Hi Victor,
> 
> On Wed, Jan 04, 2012 at 10:15:47AM +0100, Victor Engmark wrote:
> >
> > Is there some way to make `git-gui` rescan automatically when anything
> > in the repository changes?
> 
> How about doing it each time git gui gets focus? Or if that's to
> much do it only if it gets focus _and_ the index has changed?

Ideally (like in jEdit) this should be configurable. In Options -> General of jEdit, there are the following settings:

"If open files are changed on disk", with options:
* do nothing
* prompt
* automatically reload and notify user
* autoreload without notification
"Check for file change upon", with options:
* application focus
* application focus, visiting the buffer or saving any buffer
* visiting the buffer or saving any buffer
* visiting or saving the buffer
* saving the buffer
Based on this, I guess we could use the following settings:
"When repository changes", with options:
* do nothing [This could optionally disable the next setting]
* prompt
* rescan and notify user
* rescan without notification
"Check for repository changes", with options:
* always [Could be implemented with something like `inotifywait -rm`]
* upon application focus
* upon staging, unstaging, committing or pushing

I think I can see use cases for all these options, although it might be a bit much to chew for a first iteration.

-- 
Victor Engmark
terreActive AG
Kasinostrasse 30
CH-5001 Aarau
Tel: +41 62 834 00 55
Fax: +41 62 823 93 56
www.terreactive.ch

Wir sichern Ihren Erfolg - seit 15 Jahren
Uri Okrent· Jan 10, 2012, 16:14 UTC · re: Victor Engmark · lore

Re: Auto-refresh git-gui

Not to muddy the waters, but if you're open to alternatives, if you have inotify installed, git cola will automatically update it's status whenever files in your repository change.

-- 
   Uri

Please consider the environment before printing this message.
http://wwf.panda.org/savepaper/

← back to recent threads