From bf157b44ecc1c18d8a77509887b1104c74dec6f1 Mon Sep 17 00:00:00 2001 From: "iannucci@chromium.org" Date: Sat, 12 Apr 2014 00:14:41 +0000 Subject: [PATCH] Fix empty section appearing in git config for every rebase-update. Previously a `[depot-tools "rebase-update"]` section would show up in the .git/config on every `git rebase-update` cycle. R=agable@chromium.org BUG= Review URL: https://codereview.chromium.org/228353003 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@263423 0039d316-1c4b-4281-b951-d872f2087c98 --- git_rebase_update.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git_rebase_update.py b/git_rebase_update.py index b0c5bf4dc3..4e96c69898 100755 --- a/git_rebase_update.py +++ b/git_rebase_update.py @@ -28,7 +28,7 @@ def find_return_branch(): rebase-update runs into a conflict mid-way. """ return_branch = git.config(STARTING_BRANCH_KEY) - if return_branch is None: + if not return_branch: return_branch = git.current_branch() if return_branch != 'HEAD': git.set_config(STARTING_BRANCH_KEY, return_branch) @@ -244,7 +244,7 @@ def main(args=()): % (return_branch, root_branch) ) git.run('checkout', root_branch) - git.del_config(STARTING_BRANCH_KEY) + git.set_config(STARTING_BRANCH_KEY, '') return retcode