Fossil SCM

Get the "fossil git export" command working on windows.

drh 2020-02-06 15:06 trunk
Commit 0dd697622a390dcba74deec1c96e97380cc35cba1146829cd958ef2393c0d4f5
1 file changed +4
--- src/export.c
+++ src/export.c
@@ -1385,11 +1385,15 @@
13851385
}else{
13861386
zCmd = mprintf("git fast-import"
13871387
" --export-marks=.mirror_state/marks.txt"
13881388
" --quiet --done");
13891389
gitmirror_message(VERB_NORMAL, "%s\n", zCmd);
1390
+#ifdef _WIN32
1391
+ xCmd = popen(zCmd, "wb");
1392
+#else
13901393
xCmd = popen(zCmd, "w");
1394
+#endif
13911395
if( zCmd==0 ){
13921396
fossil_fatal("cannot start the \"git fast-import\" command");
13931397
}
13941398
fossil_free(zCmd);
13951399
}
13961400
--- src/export.c
+++ src/export.c
@@ -1385,11 +1385,15 @@
1385 }else{
1386 zCmd = mprintf("git fast-import"
1387 " --export-marks=.mirror_state/marks.txt"
1388 " --quiet --done");
1389 gitmirror_message(VERB_NORMAL, "%s\n", zCmd);
 
 
 
1390 xCmd = popen(zCmd, "w");
 
1391 if( zCmd==0 ){
1392 fossil_fatal("cannot start the \"git fast-import\" command");
1393 }
1394 fossil_free(zCmd);
1395 }
1396
--- src/export.c
+++ src/export.c
@@ -1385,11 +1385,15 @@
1385 }else{
1386 zCmd = mprintf("git fast-import"
1387 " --export-marks=.mirror_state/marks.txt"
1388 " --quiet --done");
1389 gitmirror_message(VERB_NORMAL, "%s\n", zCmd);
1390 #ifdef _WIN32
1391 xCmd = popen(zCmd, "wb");
1392 #else
1393 xCmd = popen(zCmd, "w");
1394 #endif
1395 if( zCmd==0 ){
1396 fossil_fatal("cannot start the \"git fast-import\" command");
1397 }
1398 fossil_free(zCmd);
1399 }
1400

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button