# Auto-refresh git-gui

4 messages from 2012-01-04 to 2012-01-10. Participants: Victor Engmark, Clemens Buchacher, Uri Okrent.
Thread: https://gitlist.dev/t/29289

## Victor Engmark, 2012-01-04 09:15

Subject: Auto-refresh git-gui
Message-ID: <20120104091547.GC3484@victor>
URL: https://gitlist.dev/e/20120104091547.GC3484%40victor

```
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, 2012-01-04 16:33

Subject: Re: Auto-refresh git-gui
Message-ID: <20120104163338.GA27567@ecki.lan>
URL: https://gitlist.dev/e/20120104163338.GA27567%40ecki.lan
In-Reply-To: <20120104091547.GC3484@victor>

```
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, 2012-01-05 08:03

Subject: Re: Auto-refresh git-gui
Message-ID: <20120105080322.GD3484@victor>
URL: https://gitlist.dev/e/20120105080322.GD3484%40victor
In-Reply-To: <20120104163338.GA27567@ecki.lan>

```
On Wed, Jan 04, 2012 at 05:33:40PM +0100, Clemens Buchacher wrote:
> 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, 2012-01-10 16:14

Subject: Re: Auto-refresh git-gui
Message-ID: <CALPkawZR6PU5wNrdG03L9iAk85K4ZEFakF5oQK2fqdqWUMjJzA@mail.gmail.com>
URL: https://gitlist.dev/e/CALPkawZR6PU5wNrdG03L9iAk85K4ZEFakF5oQK2fqdqWUMjJzA%40mail.gmail.com
In-Reply-To: <20120105080322.GD3484@victor>

```
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/

```
