Code

reset: disallow "reset --keep" outside a work tree
authorChristian Couder <chriscool@tuxfamily.org>
Tue, 19 Jan 2010 04:26:00 +0000 (05:26 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 7 Mar 2010 04:06:50 +0000 (20:06 -0800)
commitab892a19e83edd1cf9a767bc09d3239f72469d05
treec642dab6edcaafe10e5d1f14c04fd21efbf662ed
parent7349df1142a8dba579c015b51805cc290fcb4e6e
reset: disallow "reset --keep" outside a work tree

It is safer and consistent with "--merge" and "--hard" resets to disallow
"git reset --keep" outside a work tree.

So let's just do that and add some tests while at it.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-reset.c
t/t7103-reset-bare.sh