Python script for automatic synchronization based on inotify

Dieter Plaetinck dieter at plaetinck.be
Wed Mar 23 09:33:37 CET 2011


On Wed, 23 Mar 2011 08:00:27 +0100
martin f krafft <madduck at madduck.net> wrote:

> also sprach Dieter Plaetinck <dieter at plaetinck.be> [2011.03.20.1235
> +0100]:
> > oh, one more thing.
> > you can query the current branch in a pure-python way, by
> > reading .git/HEAD
> 
> No, please do not use this. Use
> 
>   git symbolic-ref -q HEAD || git name-rev --name-only HEAD
> 

well, the idea behind doing it in pure-python is removing the overhead
of spawning extra processes, do you have an argument why reading the
branchname of the current HEAD in a few lines of python is bad?

Dieter


More information about the vcs-home mailing list