From: Junio C Hamano Date: Fri, 28 Apr 2006 09:32:44 +0000 (-0700) Subject: git-am --resolved: more usable error message. X-Git-Tag: v1.3.2~13 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c1d1128bef97ae16a6740538abe5fb81c67ed239;p=git.git git-am --resolved: more usable error message. After doing the hard work of hand resolving the conflicts in the working tree, if the user forgets to run update-index to mark the paths that have been resolved, the command gave an unfriendly "fatal: git-write-tree: not able to write tree" error message. Catch the situation early and give more meaningful message and suggestion. Noticed and suggested by Len Brown. Signed-off-by: Junio C Hamano --- diff --git a/git-am.sh b/git-am.sh index eab4aa89..872145b9 100755 --- a/git-am.sh +++ b/git-am.sh @@ -376,6 +376,13 @@ do echo "No changes - did you forget update-index?" stop_here $this fi + unmerged=$(git-ls-files -u) + if test -n "$unmerged" + then + echo "You still have unmerged paths in your index" + echo "did you forget update-index?" + stop_here $this + fi apply_status=0 ;; esac