chiark
/
gitweb
/
~ian
/
topgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix merge failure handling in tg export
[topgit.git]
/
tg-export.sh
diff --git
a/tg-export.sh
b/tg-export.sh
index 748ca54f6c093480684d53982ba72e82daedb412..37cd9cdd11f1a230a7d4c2ac08e1bc920afae160 100644
(file)
--- a/
tg-export.sh
+++ b/
tg-export.sh
@@
-216,22
+216,24
@@
linearize()
# already included, just skip
:;
else
# 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
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
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
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)
fi
result_tree=$(git write-tree)