From b81aa35c2437ab3e5b4e0a6603d2ee2d71fddfb2 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 30 Jan 2013 11:09:38 -0500 Subject: [PATCH] review: Fix exception running review on some detached HEADs. (imported from commit 8f6e4a82ade10945cfac0104e4f8ff5d48379348) --- tools/review | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/review b/tools/review index 58c86d7183..ddd94c2826 100755 --- a/tools/review +++ b/tools/review @@ -104,6 +104,9 @@ def get_default_remote(repo): except git.exc.GitCommandError: try: branch = repo.active_branch + except TypeError: + return 'origin' + try: return repo.git.config('--get', 'branch.%s.remote' % branch) except git.exc.GitCommandError: return 'origin'