From: Uwe Kleine-König Date: Sun, 8 Mar 2009 20:52:14 +0000 (+0100) Subject: Fix merge failure handling in tg export X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=commitdiff_plain;h=6745b3c106485f5607d7e1e6251878d429591186 Fix merge failure handling in tg export 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" Signed-off-by: Uwe Kleine-König --- diff --git a/tg-export.sh b/tg-export.sh index 748ca54..37cd9cd 100644 --- a/tg-export.sh +++ b/tg-export.sh @@ -216,22 +216,24 @@ linearize() # 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