From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bakul Shah Content-Type: multipart/alternative; boundary=Apple-Mail-1CD37D83-A3EF-4BB7-80EE-6DB798C3EE68 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) Date: Thu, 16 Feb 2017 07:33:54 -0800 Message-Id: References: <33fbfcba-49eb-4797-92d1-c3c0c1fc1c11@email.android.com> In-Reply-To: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] Acme and Git Topicbox-Message-UUID: b41c18f8-ead9-11e9-9d60-3106f5b1d025 --Apple-Mail-1CD37D83-A3EF-4BB7-80EE-6DB798C3EE68 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable You can use a cross platform file system event notification package like fsn= otify/fsnotify or rjeczalik/notify, both on github. Instead of HEAD, may be j= ust watch .git/index and when it changes, do git ls-files and see what chang= ed. This will also catch local git add etc. though this probably doesn't mat= ter. > On Feb 16, 2017, at 5:05 AM, Paul Lalonde wrote= : >=20 > I'll give Watch and a bit of scripting a shot. I couldn't find a git "HEA= D changed" hook to tie to, so Watch is pretty much the right thing. >=20 > Thanks! >=20 >> On Wed, Feb 15, 2017 at 9:04 PM Erik Quanstrom wr= ote: >> try writing the file? =F0=9F=98=80 >>=20 >> On Feb 15, 2017 5:05 AM, Paul Lalonde wrote: >> I know I'm not the only acme user who uses Git extensively :-) >> Is there some way to tell if a file is changed on disk that is open in an= editor window? I frequently change branches and I often find myself editin= g stale versions. I notice when comes time to Put, but that's a bit late. >>=20 >> Any tips to share?=20 >>=20 >> Paul >>=20 --Apple-Mail-1CD37D83-A3EF-4BB7-80EE-6DB798C3EE68 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
You can use a cross platfor= m file system event notification package like fsnotify/fsnotify or rjeczalik/notif= y, both on github. Instead of HEAD, may be just watch .git/index and when it= changes, do git ls-files and see what changed. This will also catch local g= it add etc. though this probably doesn't matter.

On Feb 16, 20= 17, at 5:05 AM, Paul Lalonde <paul.a.lalonde@gmail.com> wrote:

I'll give Watch and a bit of scripting a shot.&nbs= p; I couldn't find a git "HEAD changed" hook to tie to, so Watch is pretty m= uch the right thing.

Thanks!

On Wed, Feb 15, 2017 at 9:04 PM Erik Quanstrom <quanstro@quanstro.net> wrote:
=
tr= y writing the file?  =F0=9F=98=80

On Feb 15,= 2017 5:05 AM, Paul Lalonde <paul.a.lalonde@gmail.com> wrote:=
I know I'm not= the only acme user who uses Git extensively :-)
Is t= here some way to tell if a file is changed on disk that is open in an editor= window?  I frequently change branches and I often find myself editing s= tale versions.  I notice when comes time to Put, but that's a bit late.=

Any tips to share? 

Paul

= --Apple-Mail-1CD37D83-A3EF-4BB7-80EE-6DB798C3EE68--