status: don't suggest "git rm" or "git add" if not appropriate
commit96b0ec1a4c3cafd17bc397c9ac836950c316dab6
authorLucien Kong <Lucien.Kong@ensimag.imag.fr>
Tue, 5 Jun 2012 20:21:26 +0000 (5 22:21 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Jun 2012 17:15:19 +0000 (14 10:15 -0700)
tree3aa766c75682669370119da624300399d34e0e4e
parent708192637e7d48bfff49c08cdd7cd6e4b052ac32
status: don't suggest "git rm" or "git add" if not appropriate

The display of the advice '(use git add/rm [...])' (when there are
unmerged files) after running 'git status' is now depending of the
mark, whether it's 'both deleted', 'deleted by us/them' or others. For
instance, when there is just one file that's marked as 'both deleted',
'git status' shows '(use git rm [...])' and if there are two files,
one as 'both deleted' and the other as 'added by them', the advice is
'(use git add/rm [...])'.

The previous tests in t7512-status-help.sh are updated.

Test about the case of only 'both deleted' is added in
t7060-wtstatus.sh

Signed-off-by: Lucien Kong <Lucien.Kong@ensimag.imag.fr>
Signed-off-by: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>
Signed-off-by: Franck Jonas <Franck.Jonas@ensimag.imag.fr>
Signed-off-by: Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>
Signed-off-by: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7060-wtstatus.sh
t/t7512-status-help.sh
wt-status.c