Fix Gerrit git cl land and add test.
R=andybons@chromium.org
BUG=641127
Review-Url: https://codereview.chromium.org/2280563003
diff --git a/git_cl.py b/git_cl.py
index 1f62dc0..24a8c99 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2306,8 +2306,7 @@
'Press Enter to continue, Ctrl+C to abort.')
differs = True
- last_upload = RunGit(['config', self._GitBranchSetting('gerritsquashhash')],
- error_ok=True).strip()
+ last_upload = self._GitGetBranchConfigValue('gerritsquashhash')
# Note: git diff outputs nothing if there is no diff.
if not last_upload or RunGit(['diff', last_upload]).strip():
print('WARNING: some changes from local branch haven\'t been uploaded')