Skip to content

Commit

Permalink
git-am --resolved: more usable error message.
Browse files Browse the repository at this point in the history
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 <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Apr 28, 2006
1 parent 55e1805 commit c1d1128
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions git-am.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c1d1128

Please sign in to comment.