]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
patman: Only apply patches when we know the original HEAD
authorSimon Glass <sjg@chromium.org>
Thu, 12 Jun 2014 05:27:09 +0000 (23:27 -0600)
committerSimon Glass <sjg@chromium.org>
Mon, 7 Jul 2014 23:22:03 +0000 (17:22 -0600)
commit4251978afccb4b58c477c74f2d9888a063e5a995
treec83121b9e2f7ff0db88f320e4507aec74db4e114
parent6ee3d00d1d9d9977e975bd72c3668ee4f210a99d
patman: Only apply patches when we know the original HEAD

When patman applies the patches it checks out a new branch, uses 'git am'
to apply the patches one by one, and then tries to go back to the old
branch. If you try this when the branch is 'undefined', this doesn't work
as patman cannot restore the correct branch after applying the patches.
It seems that 'undefined' is created by git and is persistent after it is
created, so that you can end up on quite an old branch.

Add a check for the 'undefined' branch to avoid this.

Reported-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
tools/patman/gitutil.py