@@ -425,6 +425,10 @@ rebase()
425425 commit=" $( git rev-parse --verify " refs/heads/$_dep ^0" --) "
426426
427427 else
428+
429+ die_hint=" Try checking out your starting branch and rerun"
430+ subshell_hint=" starting subshell. exit 1 to abort"
431+
428432 # First time hitting this dep; the common case
429433
430434 test -d " $playground /${_dep%/* } " || mkdir -p " $playground /${_dep%/* } "
@@ -459,7 +463,7 @@ rebase()
459463 echo " adding dep $n "
460464 target_deps=(" ${target_deps[@]} " " $n " )
461465 else
462- die " $_dep has bad .topdep line $dep which has no target branch yet ! ? BUG"
466+ die " $_dep has bad .topdep line $dep which has no target branch yet ! ? BUG $die_hint "
463467 fi
464468 done <<-EOF
465469 $( git show $_dep :.topdeps)
@@ -468,16 +472,17 @@ EOF
468472
469473 git show " $_dep " :.topmsg > $playground /.topmsg
470474 echo " creating topgit branch $new_branch_name with deps ${target_deps[@]} "
471- git checkout " ${target_deps[0]} " || die 'checking out failed'
472- tg create --topmsg-file $playground /.topmsg -m " new tg branch $new_branch_name " " ${new_branch_name} " " ${target_deps[@]} " || {
473- echo 'tg create failed';
475+ git checkout " ${target_deps[0]} " || die " checking out failed $die_hint "
476+ set -x
477+ $tgbin create --topmsg-file $playground /.topmsg -m " new tg branch $new_branch_name " " ${new_branch_name} " " ${target_deps[@]} " || {
478+ echo " tg create failed $subshell_hint " ;
474479 " ${SHELL:-@ SHELL_PATH@ } " -i </dev/tty || { echo " user abort" ; return ; }
475480 }
476481 # git add .topmsg .topdeps
477482 # git commit -m " $new_branch_name dotfiles"
478483
479484 git cherry-pick $commit || {
480- echo " cherry-picking the commit failed, please fix and commit and exit shell. use status ! =0 to abort rebase "
485+ echo " cherry-picking the commit failed, please fix and commit and exit shell. $subshell_hint "
481486 " ${SHELL:-@ SHELL_PATH@ } " -i </dev/tty || { echo " user abort" ; return ; }
482487 }
483488
0 commit comments