From: Andrey Borzenkov Date: Sat, 19 Mar 2011 16:53:11 +0000 (+0300) Subject: tg-update: correctly return error for missing deps X-Git-Tag: topgit-0.9~5^2~1 X-Git-Url: https://repo.or.cz/w/topgit.git/commitdiff_plain/2825020f7e181280cda0a245847ab56a0a1448e5 tg-update: correctly return error for missing deps Adding -a introduced following regression: no error was returned after missing deps to allow continuing with next branch. This means missing dependencies during recursion were ignored (althouth warning was output). Always abort with error unless called with "-a"; recursive never does it. Signed-off-by: Andrey Borzenkov --- diff --git a/tg-update.sh b/tg-update.sh index 8d5ffc1..ecbc0d5 100644 --- a/tg-update.sh +++ b/tg-update.sh @@ -45,7 +45,14 @@ update_branch() { depcheck="$(get_temp tg-depcheck)" missing_deps= needs_update "$name" >"$depcheck" || : - [ -z "$missing_deps" ] || { info "some dependencies are missing: $missing_deps; skpping"; return; } + if [ -n "$missing_deps" ]; then + if [ -z "$all" ]; then + die "some dependencies are missing: $missing_deps" + else + info "some dependencies are missing: $missing_deps; skipping" + return + fi + fi if [ -s "$depcheck" ]; then # We need to switch to the base branch # ...but only if we aren't there yet (from failed previous merge)