git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Mike Hommey <mh@glandium.org>
Date
Nov 3, 2007, 12:22 UTC
Message-ID
<1194092575-7133-3-git-send-email-mh@glandium.org>
In-Reply-To
<1194092575-7133-2-git-send-email-mh@glandium.org>
Signed-off-by: Mike Hommey <mh@glandium.org>
---
 builtin-blame.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/builtin-blame.c b/builtin-blame.c
index 141287e..500ae77 100644
--- a/builtin-blame.c
+++ b/builtin-blame.c
@@ -2338,6 +2338,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), ":");
 	}
-- 
1.5.3.5
Previous: Mike HommeyNext: Mike Hommey
Message 3 of 7 in “Delay pager setup in git blame”
  1. Delay pager setup in git blameMike Hommey, Nov 3, 2007
  2. Allow 'git blame rev path' to work on bare repositoryMike Hommey, Nov 3, 2007
  3. Make git-blame fail when working tree is needed and we're not in oneMike Hommey, Nov 3, 2007
  4. Mike HommeyNov 3, 2007
  5. Andreas EricssonNov 3, 2007
  6. Junio C HamanoNov 4, 2007
  7. Mike HommeyNov 4, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.