add: check return value of launch_editor
authorJeff King <peff@peff.net>
Wed, 13 May 2015 01:21:58 +0000 (21:21 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 May 2015 03:25:08 +0000 (20:25 -0700)
commitcb64800d83ace6fecb8701151cfdb6ed0712702c
tree230d77a33004a6cbf1417f99025cd04546c694e2
parent282616c72d1d08a77ca4fe1186cb708c38408d87
add: check return value of launch_editor

When running "add -e", if launching the editor fails, we do
not notice and continue as if the output is what the user
asked for. The likely case is that the editor did not touch
the contents at all, and we end up adding everything.

Reported-by: Russ Cox <rsc@golang.org>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/add.c
t/t3702-add-edit.sh