Fossil SCM

On Windows, do not emit warnings when external tools exit with non-zero codes, since those are unreliable at best.

danield 2025-03-18 15:49 trunk
Commit 43ee0921ec3f3a92a87603e24e2f1c795342c567c09ad44f4b2a327569f782b3
1 file changed +4 -2
+4 -2
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -668,12 +668,14 @@
668668
blob_append_escaped_arg(&cmd, zFile2, 1);
669669
}
670670
671671
/* Run the external diff command */
672672
if( fossil_system(blob_str(&cmd)) ){
673
- fossil_warning("External diff command failed: %b\n",
674
- &cmd);
673
+#if !defined(_WIN32)
674
+ /* On Windows, exit codes are unreliable. */
675
+ fossil_warning("External diff command failed: %b\n", &cmd);
676
+#endif
675677
}
676678
677679
/* Delete the temporary file and clean up memory used */
678680
if( useTempfile ) file_delete(blob_str(&nameFile1));
679681
blob_reset(&nameFile1);
680682
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -668,12 +668,14 @@
668 blob_append_escaped_arg(&cmd, zFile2, 1);
669 }
670
671 /* Run the external diff command */
672 if( fossil_system(blob_str(&cmd)) ){
673 fossil_warning("External diff command failed: %b\n",
674 &cmd);
 
 
675 }
676
677 /* Delete the temporary file and clean up memory used */
678 if( useTempfile ) file_delete(blob_str(&nameFile1));
679 blob_reset(&nameFile1);
680
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -668,12 +668,14 @@
668 blob_append_escaped_arg(&cmd, zFile2, 1);
669 }
670
671 /* Run the external diff command */
672 if( fossil_system(blob_str(&cmd)) ){
673 #if !defined(_WIN32)
674 /* On Windows, exit codes are unreliable. */
675 fossil_warning("External diff command failed: %b\n", &cmd);
676 #endif
677 }
678
679 /* Delete the temporary file and clean up memory used */
680 if( useTempfile ) file_delete(blob_str(&nameFile1));
681 blob_reset(&nameFile1);
682

Keyboard Shortcuts

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