update-index -h: show usage even with corrupt index
commit9c7c27eeab73b4c90cf36c6aa06ba6b8b9777629
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Fri, 22 Oct 2010 06:51:00 +0000 (22 01:51 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Oct 2010 18:04:54 +0000 (22 11:04 -0700)
tree3a283a3e76f44e10b504597487ea213babba17ea
parentda53eec68873e76c68086e405f3f1329d47055b3
update-index -h: show usage even with corrupt index

When trying to fix up a corrupt repository, one might prefer that
"update-index -h" print an accurate usage message and exit rather
than reading the repository and complaining about the corruption.

[jn: with rewritten log message and tests]

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/update-index.c
t/t2107-update-index-basic.sh [new file with mode: 0755]