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
changes/01/332501/1
iannucci@chromium.org 12 years ago
parent 9630aa2bd5
commit bf157b44ec

@ -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

Loading…
Cancel
Save