gentree: use git library to speed up --git-revision
authorJohannes Berg <johannes.berg@intel.com>
Wed, 8 May 2013 07:42:38 +0000 (09:42 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 8 May 2013 07:45:51 +0000 (09:45 +0200)
commit29078ef058f964ba61deceac755915871f4668c6
treeb5780ccc57caa45c38e5028ef008d7c9a6cc1dcd
parentb0b3200b9489c2629686c367c1344055a5316e77
gentree: use git library to speed up --git-revision

If the git library is available (on many distros, just
install python-git or similar) then use it to read the
git blobs from disk if --git-revision is used.

On my system (with an SSD) this speeds up the entire
backport generation process significantly (when using
--git-revision):

before:
real 0m39.280s
user 0m13.464s
sys 0m16.644s

after:
real 0m22.554s
user 0m16.404s
sys 0m5.724s

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
lib/bpgit.py