Make git-blame fail when working tree is needed and we're not in one

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Mike Hommey 2007-11-03 13:22:55 +01:00 committed by Junio C Hamano
parent 271bb08735
commit 1981820be2

View File

@ -2342,6 +2342,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
* do not default to HEAD, but use the working tree
* or "--contents".
*/
setup_work_tree();
sb.final = fake_working_tree_commit(path, contents_from);
add_pending_object(&revs, &(sb.final->object), ":");
}