There exist two problems that show that up to now the error handling was
completely untested:
- tg.sh uses `set -e`, so `git merge $branch; retmerge=$?` obviously
doesn't do the right thing.
- in recurse_deps stdin is redirected from $_depsfile. Starting a
shell with that doesn't give the user any chance to do something.
Reported-by: "Bernhard R. Link" <brlink@debian.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
# already included, just skip
:;
else
- git merge -s recursive "$_dep";
- retmerge="$?";
+ retmerge=0;
+
+ git merge -s recursive "$_dep" || retmerge="$?";
if test "x$retmerge" != "x0"; then
echo fix up the merge, commit and then exit;
#todo error handling
- sh -i
+ sh -i </dev/tty;
fi;
fi;
else
- git merge-recursive "$(pretty_tree "refs/top-bases/$_dep")" -- HEAD "$(pretty_tree "refs/heads/$_dep")";
- retmerge="$?";
+ retmerge=0;
+
+ git merge-recursive "$(pretty_tree "refs/top-bases/$_dep")" -- HEAD "$(pretty_tree "refs/heads/$_dep")" || retmerge="$?";
if test "x$retmerge" != "x0"; then
echo "fix up the merge and update the index. Don't commit!"
#todo error handling
- sh -i
+ sh -i </dev/tty;
fi
result_tree=$(git write-tree)