Re: Python script for automatic synchronization based on inotify

2011-03-23 Thread martin f krafft
also sprach Felix Kaiser [2011.03.23.1250 +0100]: > > .git/* is not a public API. It's considered internal. > > > > Not its not. > > Its even documented[1]: "... a valid git repository must have the > HEAD file; some porcelains may use it to guess the designated > "default" branch of the reposit

Re: Python script for automatic synchronization based on inotify

2011-03-23 Thread Felix Kaiser
On Wed, Mar 23, 2011 at 11:50 AM, martin f krafft wrote: > > also sprach Dieter Plaetinck [2011.03.23.0933 +0100]: > > 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

Re: Python script for automatic synchronization based on inotify

2011-03-23 Thread martin f krafft
also sprach Dieter Plaetinck [2011.03.23.0933 +0100]: > 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? .git/* is not a public API. It'

Re: Python script for automatic synchronization based on inotify

2011-03-23 Thread René Mayrhofer
Am Mittwoch, 23. März 2011, um 09:33:37 schrieb Dieter Plaetinck: > On Wed, 23 Mar 2011 08:00:27 +0100 > martin f krafft wrote: > > > also sprach Dieter Plaetinck [2011.03.20.1235 > > +0100]: > > > oh, one more thing. > > > you can query the current branch in a pure-python way, by > > > reading

Re: Python script for automatic synchronization based on inotify

2011-03-23 Thread Dieter Plaetinck
On Wed, 23 Mar 2011 08:00:27 +0100 martin f krafft wrote: > also sprach Dieter Plaetinck [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 ||

Re: Python script for automatic synchronization based on inotify

2011-03-23 Thread martin f krafft
also sprach Dieter Plaetinck [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 -- martin | http://madduck.net/ | http://two.sen