X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=blobdiff_plain;f=tg-update.sh;h=040800d6fb3805ef92519e436fe9cbb353cdbb77;hp=f36624fe71b73263471e5df8fbb0014d47ca2ee0;hb=a5dbc6a4a9e01c4e3b21b4c882acfd479c703a40;hpb=d5cc14199b3186453a1819a3ac3a31725cda66f9 diff --git a/tg-update.sh b/tg-update.sh index f36624f..040800d 100644 --- a/tg-update.sh +++ b/tg-update.sh @@ -75,7 +75,7 @@ if [ -s "$depcheck" ]; then info "Updating base with $dep changes..." if ! git merge "$dep"; then if [ -z "$TG_RECURSIVE" ]; then - resume="\`$tg update\` again" + resume="\`git checkout $name && $tg update\` again" else # subshell resume='exit' fi @@ -87,14 +87,16 @@ if [ -s "$depcheck" ]; then exit 2 fi done - - # Home, sweet home... - git checkout -q "$name" else info "The base is up-to-date." fi rm "$depcheck" +# Home, sweet home... +# (We want to always switch back, in case we were on the base from failed +# previous merge.) +git checkout -q "$name" + merge_with="refs/top-bases/$name"