mirror of
https://github.com/git/git
synced 2024-08-25 10:45:59 +00:00
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 <junkio@cox.net>
This commit is contained in:
parent
55e1805dff
commit
c1d1128bef
|
@ -376,6 +376,13 @@ do
|
||||||
echo "No changes - did you forget update-index?"
|
echo "No changes - did you forget update-index?"
|
||||||
stop_here $this
|
stop_here $this
|
||||||
fi
|
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
|
apply_status=0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue