Make git-blame fail when working tree is needed and we're not in one
authorMike Hommey <mh@glandium.org>
Sat, 3 Nov 2007 12:22:55 +0000 (13:22 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 Nov 2007 06:47:57 +0000 (22:47 -0800)
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-blame.c

index aedc294..55a3c0b 100644 (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), ":");
        }