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

[PATCH] fast-import: exit with proper message if not a git dir

From
JHJean-Luc Herren <jlh@gmx.ch>
Date
Feb 28, 2008, 22:29 UTC
Message-ID
<47C735E2.2010500@gmx.ch>

git fast-import expects to be run from an existing (possibly empty) repository. It was dying with a suboptimal message if that wasn't the case.

Signed-off-by: Jean-Luc Herren <jlh@gmx.ch>
---
 fast-import.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fast-import.c b/fast-import.c
index 0d3449f..7f197d5 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -2377,6 +2377,7 @@ int main(int argc, const char **argv)
 {
 	unsigned int i, show_stats = 1;
 
+	setup_git_directory();
 	git_config(git_pack_config);
 	if (!pack_compression_seen && core_compression_seen)
 		pack_compression_level = core_compression_level;
-- 
1.5.4.2
Next: Shawn O. Pearce
Message 1 of 2 in “fast-import: exit with proper message if not a git dir”
  1. fast-import: exit with proper message if not a git dirJean-Luc Herren, Feb 28, 2008
  2. Shawn O. PearceMar 2, 2008

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.