get specified commit info
authorGuan Junchun <junchunx.guan@intel.com>
Tue, 21 Aug 2012 09:18:51 +0000 (17:18 +0800)
committerGuan Junchun <junchunx.guan@intel.com>
Thu, 23 Aug 2012 02:45:34 +0000 (10:45 +0800)
1. gbs rb -c HEAD~1 should get 'HEAD~1' commit info
2. gbs rb [--include-all] get 'HEAD' commit info

gitbuildsys/cmd_remotebuild.py

index 65ff781..de7d673 100644 (file)
@@ -210,7 +210,7 @@ def do(opts, args):
             msger.error("Repository error: %s" % excobj)
 
     try:
-        commit_msg = repo.get_commit_info('HEAD')['subject']
+        commit_msg = repo.get_commit_info(opts.commit or 'HEAD')['subject']
     except GitRepositoryError, exc:
         msger.error('failed to get commit info: %s' % exc)