Skip to contentSkip to conversation

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

PATCH In review Jean-Luc Herren 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fast-import: exit with proper message if not a git dir

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.

---
fast-import.c | 1 +

1 files changed, 1 insertions(+), 0 deletions(-)
fast-import.c +0 -0
index 0d3449f..7f197d5 100644
@@ -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;
Signature · 1 line
1.5.4.2
Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines · Jean-Luc Herren

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.

---
fast-import.c | 1 +

1 files changed, 1 insertions(+), 0 deletions(-)
fast-import.c +0 -0
index 0d3449f..7f197d5 100644

fast-import.c int main(int argc, const char **argv) · line 2383

Quoted 7 lines
fast-import.c +1 -0
@@ -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;
Signature · 1 line
Shawn.