Fossil SCM

Backout recent changes which was reporting error when external diff command exit with non 0 value. It's common for cli diff programs (e.g. gnu-diff and bsd-diff) to return 1 when files differ. Looking for a more "generic" solution.

mgagnon 2025-05-31 15:08 trunk
Commit 9b041508850d959c66b4762cdc34f77268d53bc1c3b3ffe44c71445ed10c6155
1 file changed +1 -6
+1 -6
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -667,16 +667,11 @@
667667
blob_append_escaped_arg(&cmd, blob_str(&nameFile1), 1);
668668
blob_append_escaped_arg(&cmd, zFile2, 1);
669669
}
670670
671671
/* 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
- }
672
+ fossil_system(blob_str(&cmd));
678673
679674
/* Delete the temporary file and clean up memory used */
680675
if( useTempfile ) file_delete(blob_str(&nameFile1));
681676
blob_reset(&nameFile1);
682677
blob_reset(&cmd);
683678
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -667,16 +667,11 @@
667 blob_append_escaped_arg(&cmd, blob_str(&nameFile1), 1);
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 blob_reset(&cmd);
683
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -667,16 +667,11 @@
667 blob_append_escaped_arg(&cmd, blob_str(&nameFile1), 1);
668 blob_append_escaped_arg(&cmd, zFile2, 1);
669 }
670
671 /* Run the external diff command */
672 fossil_system(blob_str(&cmd));
 
 
 
 
 
673
674 /* Delete the temporary file and clean up memory used */
675 if( useTempfile ) file_delete(blob_str(&nameFile1));
676 blob_reset(&nameFile1);
677 blob_reset(&cmd);
678

Keyboard Shortcuts

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