Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(556)

Unified Diff: git_common.py

Issue 792933003: Add checks to GitSanityChecks (upstream branch or current branch can be None) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « git_cl.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_common.py
diff --git a/git_common.py b/git_common.py
index 946a39d5d2655968bbcad3e9df5397046643018f..a18f59f16474d19e5ed52085dedc70af42f2be8e 100644
--- a/git_common.py
+++ b/git_common.py
@@ -399,7 +399,7 @@ def get_or_create_merge_base(branch, parent=None):
base = branch_config(branch, 'base')
base_upstream = branch_config(branch, 'base-upstream')
parent = parent or upstream(branch)
- if not parent:
+ if parent is None or branch is None:
return None
actual_merge_base = run('merge-base', parent, branch)
« no previous file with comments | « git_cl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698