From 354e6534c1569d0d23937add8e7b55bf87bbaf20 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 9 Nov 2007 11:34:07 +0000 Subject: builtin-blame: set up the work_tree before the first file access We check in cmd_blame() if the specified path is there, but we failed to set up the working tree before that. While at it, make setup_work_tree() just return if it was run before. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- builtin-blame.c | 1 + 1 file changed, 1 insertion(+) (limited to 'builtin-blame.c') diff --git a/builtin-blame.c b/builtin-blame.c index 55a3c0bc5e..ba80bf8942 100644 --- a/builtin-blame.c +++ b/builtin-blame.c @@ -2295,6 +2295,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix) else if (i != argc - 1) usage(blame_usage); /* garbage at end */ + setup_work_tree(); if (!has_path_in_work_tree(path)) die("cannot stat path %s: %s", path, strerror(errno)); -- cgit v1.2.3