Handle post-review from a detached HEAD using git

Review Request #2985 — Created March 19, 2012 and submitted

Information

RBTools
master

Reviewers

Handle post-review from a detached HEAD using git

When running from a detached HEAD (not on a branch), post-review fails after a call to git symbolic-ref.
[nmorey@sat:db ((f8dcfa9...) $)]$ post-review --guess-summary --guess-description --parent=HEAD~1
Failed to execute command: ['git', 'symbolic-ref', '-q', 'HEAD']

However we do not need to be on a branch to have the script working.
So this patch ignores errors from git symbolic-ref and add tests for self.head_ref being not set.

Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>

 
NM
  1. Any feedback?
    1. I'm sorry for the delay. We've all been super busy, and most of our Review Board time has been spent with a large crew of UCOSP students. I'll take a look tonight.
  2. 
      
david
  1. Ship It!
  2. 
      
NM
Review request changed
Status:
Completed
Change Summary:
Pushed to master (d2ee139). Thanks!