@matheusbsbs / matheus-bagliano / commits / 1981820be2
Fork 0

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>

Mike Hommey committed Nov 3, 2007 at 13:22 UTC 1981820be20538d7a70f86c5ddbe379566fd5ff2
1 file changed +1
builtin-blame.c
+1
@@ -2342,6 +2342,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
2342 * do not default to HEAD, but use the working tree
2343 * or "--contents".
2344 */
2345 + setup_work_tree();
2346 sb.final = fake_working_tree_commit(path, contents_from);
2347 add_pending_object(&revs, &(sb.final->object), ":");
2348 }