From: Uwe Kleine-König Date: Sun, 1 Mar 2009 19:55:40 +0000 (+0100) Subject: Don't throw away already started base on resumed create. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=commitdiff_plain;h=23033d034d224b3ce36f1741ea221ad3937cd8f3 Don't throw away already started base on resumed create. 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 --- diff --git a/tg-create.sh b/tg-create.sh index 6e84907..2edd537 100644 --- a/tg-create.sh +++ b/tg-create.sh @@ -78,9 +78,9 @@ done 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#* }"