Bugzilla – Bug 3017
bake should check branch state before git rebase
Last modified: 2018-11-19 22:39:00 EST
./bake.py configure -e dce-umip-dev && ./bake.py download && ./bake.py update
will fail because dce-umip-dev checks out an older revision of the tree, leaving the repository in detached head state. bake update will try to stash local changes and rebase, but the rebase operation will fail.
bake could be smarter and check the branch status before attempting a rebase.
$ git status --branch --porcelain
will return the string 'HEAD (no branch)' if in this state.
However, bake doesn't have an easy way to check this using existing ModuleEnvironment methods, so some other method that calls subprocess.Popen () to check this may be needed.