Make error messages from cherry-pick/revert more sensible
authorJunio C Hamano <gitster@pobox.com>
Fri, 11 Jan 2008 06:49:35 +0000 (22:49 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 5 Feb 2008 08:39:19 +0000 (00:39 -0800)
commit45525bd022dda75ec935c9c579e452577dcfd31f
tree9928dc5906a9af8a7adbc54e6340cd4286ba3a1b
parent7a2078b4b00fb1c5d7b0bf8155778f79377b8f2f
Make error messages from cherry-pick/revert more sensible

The original "rewrite in C" did somewhat a sloppy job while
stealing code from git-write-tree.

The caller pretends as if the write_tree() function would return
an error code and being able to issue a sensible error message
itself, but write_tree() function just calls die() and never
returns an error.  Worse yet, the function claims that it was
running git-write-tree (which is no longer true after
cherry-pick stole it).

Tested-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-revert.c
builtin-write-tree.c
builtin.h
cache-tree.c
cache-tree.h