diff --cached: give more sensible error message when HEAD is yet to be created.
commit6c09c451389ade6477d98b05d277aab0dd2f272e
authorJunio C Hamano <junkio@cox.net>
Sun, 25 Feb 2007 06:26:33 +0000 (24 22:26 -0800)
committerJunio C Hamano <junkio@cox.net>
Sun, 25 Feb 2007 19:09:56 +0000 (25 11:09 -0800)
tree1921a2e641de643a7bd791c379f242311c5d9e35
parent56cf9806a97f5fe9a91c38aa3eb8cec0c76480e6
diff --cached: give more sensible error message when HEAD is yet to be created.

It is not like the user said 'diff --cached HEAD', so complaining about
HEAD not being a valid commit, while technically might be correct, is
not very helpful.

Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-diff.c