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 <[email protected]> wrote: > > > also sprach Dieter Plaetinck <[email protected]> [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?
I agree with Martin that parsing git internals does not seem the right way to do it - they might change at some point. Additionally, I'd like to keep dvcs-autosync as agnostic to the used DVCS as possible (otherwise it will quickly become a git-autosync). At the moment, the DVCS can be swapped out by changing only the config file options. If I can keep that without sacrificing too much performance, I'd like to do so. best regards, Rene
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ vcs-home mailing list [email protected] http://lists.madduck.net/listinfo/vcs-home
