Don't clobber existing .git; reset after import
This commit is contained in:
parent
2fa13ce3cd
commit
1933c5e38d
7
wp2git.d
7
wp2git.d
|
@ -45,9 +45,12 @@ int main(string[] args)
|
|||
}
|
||||
write("fast-import-data", data);
|
||||
|
||||
if (!exists(".git"))
|
||||
system("git init");
|
||||
if (exists(".git"))
|
||||
throw new Exception("A git repository already exists here!");
|
||||
|
||||
system("git init");
|
||||
system("git fast-import --date-format=rfc2822 < fast-import-data");
|
||||
system("git reset --hard");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue