git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Geert Bosch <bosch@adacore.com>
Cc: Jakub Narebski <jnareb@gmail.com>, git@vger.kernel.org
Subject: Re: Mercurial's only true "plugin" extension: inotify... and can it be done in Git?
Date: Mon, 10 Mar 2008 18:43:18 -0400	[thread overview]
Message-ID: <20080310224318.GC8410@spearce.org> (raw)
In-Reply-To: <3838F28A-DB0C-4678-BA57-3344E2225889@adacore.com>

Geert Bosch <bosch@adacore.com> wrote:
> On Mar 9, 2008, at 09:59, Jakub Narebski wrote:
> 
> >This extension[3][4] optimises "hg status" command by asking file
> >notification daemon about changed files instead of doing stat. I'm not
> >sure how useful this extension is: inotify is Linux specific, and  
> >Linux
> >has fast stat... nevertheless this is one example where extension
> >(plug-in) framework shows that it can do more than good scriptability.
> 
> FWIW, OS X 10.5 has a similar functionality, called "fsevents",
> as well as a much slower stat.

Windows NT on NTFS has a file monitor system that works somewhat
like an inotify, but different enough that you gotta write totally
different code for it.  It also has a much slower stat.

I have wanted to put something like this into git-gui, so that a
running git-gui session can see changes made to your working dir
"live".  But I haven't gotten around to writing it.  I did do some
early experiments on Windows NT + NTFS with a small C daemon that
watches the working directory, but it ran into issues about also
need to know what is inside .gitignore to properly avoid sending
events that git-gui doesn't want to know about.  Like say build
object files.  :-)

I think the reason Git has never had such an "extension" is we are
just that freaking fast when it comes to comparing the working tree
to the index.  hg wasn't in the early days and that may have been
what gave rise to the plugin.

-- 
Shawn.

  reply	other threads:[~2008-03-10 22:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-09 13:59 Mercurial's only true "plugin" extension: inotify... and can it be done in Git? Jakub Narebski
2008-03-10 18:38 ` Jakub Narebski
2008-03-11  9:42   ` Andreas Ericsson
2008-03-11  9:48     ` Junio C Hamano
2008-03-11 10:20       ` Andreas Ericsson
2008-03-11 10:00     ` Jakub Narebski
     [not found]   ` <e03c8a420803130450y77fd4038h734d80b636fa30a6@mail.gmail.com>
2008-03-15 11:22     ` Jakub Narebski
2008-03-10 19:22 ` Geert Bosch
2008-03-10 22:43   ` Shawn O. Pearce [this message]
2008-03-10 22:58     ` J. Bruce Fields

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=20080310224318.GC8410@spearce.org \
    --to=spearce@spearce.org \
    --cc=bosch@adacore.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    /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).