The problem was that after a failure to create the patch base the
resuming tg create did reset HEAD to the next tree to merge in which is
the right thing for a pristine create.
This addresses Debian Bug #513018 and is based on a patch by the bug
reporter Gábor Braun. A recipe triggering the bug is part of the report
that can be found at http://bugs.debian.org/513018.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
rm -f "$git_dir/top-name" "$git_dir/top-deps" "$git_dir/top-merge"
-## Create base
+## Find starting commit to create the base
-if [ -n "$merge" ]; then
+if [ -n "$merge" -a -z "$restarted" ]; then
# Unshift the first item from the to-merge list
branch="${merge%% *}"
merge="${merge#* }"