9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bakul Shah <bakul@bitblocks.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Acme and Git
Date: Thu, 16 Feb 2017 07:33:54 -0800	[thread overview]
Message-ID: <B8370914-B943-4390-80B4-B83A92111DC5@bitblocks.com> (raw)
In-Reply-To: <CA+POUVgGjBf3B7nESQfzV+sv2FB-AF2qNaX_+Jo7ZymvoTHF+Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1098 bytes --]

You can use a cross platform file system event notification package like fsnotify/fsnotify or rjeczalik/notify, 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 git add etc. though this probably doesn't matter.

> On Feb 16, 2017, at 5:05 AM, Paul Lalonde <paul.a.lalonde@gmail.com> wrote:
> 
> I'll give Watch and a bit of scripting a shot.  I couldn't find a git "HEAD changed" hook to tie to, so Watch is pretty much the right thing.
> 
> Thanks!
> 
>> On Wed, Feb 15, 2017 at 9:04 PM Erik Quanstrom <quanstro@quanstro.net> wrote:
>> try writing the file?  😀
>> 
>> 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 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 editing stale versions.  I notice when comes time to Put, but that's a bit late.
>> 
>> Any tips to share? 
>> 
>> Paul
>> 

[-- Attachment #2: Type: text/html, Size: 2298 bytes --]

      reply	other threads:[~2017-02-16 15:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15 13:05 Paul Lalonde
2017-02-15 14:34 ` Steve Simon
2017-02-15 14:41   ` Sigrid Haflinadóttir
2017-02-15 17:21 ` Bakul Shah
2017-02-15 19:32   ` Paul Lalonde
2017-02-15 21:29     ` Micah Stetson
2017-02-15 22:09     ` Bakul Shah
2017-02-16  2:01 ` Erik Quanstrom
2017-02-16 13:05   ` Paul Lalonde
2017-02-16 15:33     ` Bakul Shah [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B8370914-B943-4390-80B4-B83A92111DC5@bitblocks.com \
    --to=bakul@bitblocks.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).