Fossil SCM
Add the --command option to "fossil diff".
Commit
eb67f09c9ad28228cbf977d04ede2eaf4d6a3cc2
Parent
be88817fad02640…
1 file changed
+3
-1
+3
-1
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -797,10 +797,11 @@ | ||
| 797 | 797 | ** Options: |
| 798 | 798 | ** --binary PATTERN Treat files that match the glob PATTERN as binary |
| 799 | 799 | ** --branch BRANCH Show diff of all changes on BRANCH |
| 800 | 800 | ** --brief Show filenames only |
| 801 | 801 | ** --checkin VERSION Show diff of all changes in VERSION |
| 802 | +** --command PROG External diff program - overrides "diff-command" | |
| 802 | 803 | ** --context|-c N Use N lines of context |
| 803 | 804 | ** --diff-binary BOOL Include binary files when using external commands |
| 804 | 805 | ** --exec-abs-paths Force absolute path names with external commands. |
| 805 | 806 | ** --exec-rel-paths Force relative path names with external commands. |
| 806 | 807 | ** --from|-r VERSION Select VERSION as source for the diff |
| @@ -868,11 +869,12 @@ | ||
| 868 | 869 | fossil_fatal("must use --from if --to is present"); |
| 869 | 870 | }else{ |
| 870 | 871 | db_find_and_open_repository(0, 0); |
| 871 | 872 | } |
| 872 | 873 | if( !isInternDiff ){ |
| 873 | - zDiffCmd = diff_command_external(isGDiff); | |
| 874 | + zDiffCmd = find_option("command", 0, 1); | |
| 875 | + if( zDiffCmd==0 ) zDiffCmd = diff_command_external(isGDiff); | |
| 874 | 876 | } |
| 875 | 877 | zBinGlob = diff_get_binary_glob(); |
| 876 | 878 | fIncludeBinary = diff_include_binary_files(); |
| 877 | 879 | determine_exec_relative_option(1); |
| 878 | 880 | verify_all_options(); |
| 879 | 881 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -797,10 +797,11 @@ | |
| 797 | ** Options: |
| 798 | ** --binary PATTERN Treat files that match the glob PATTERN as binary |
| 799 | ** --branch BRANCH Show diff of all changes on BRANCH |
| 800 | ** --brief Show filenames only |
| 801 | ** --checkin VERSION Show diff of all changes in VERSION |
| 802 | ** --context|-c N Use N lines of context |
| 803 | ** --diff-binary BOOL Include binary files when using external commands |
| 804 | ** --exec-abs-paths Force absolute path names with external commands. |
| 805 | ** --exec-rel-paths Force relative path names with external commands. |
| 806 | ** --from|-r VERSION Select VERSION as source for the diff |
| @@ -868,11 +869,12 @@ | |
| 868 | fossil_fatal("must use --from if --to is present"); |
| 869 | }else{ |
| 870 | db_find_and_open_repository(0, 0); |
| 871 | } |
| 872 | if( !isInternDiff ){ |
| 873 | zDiffCmd = diff_command_external(isGDiff); |
| 874 | } |
| 875 | zBinGlob = diff_get_binary_glob(); |
| 876 | fIncludeBinary = diff_include_binary_files(); |
| 877 | determine_exec_relative_option(1); |
| 878 | verify_all_options(); |
| 879 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -797,10 +797,11 @@ | |
| 797 | ** Options: |
| 798 | ** --binary PATTERN Treat files that match the glob PATTERN as binary |
| 799 | ** --branch BRANCH Show diff of all changes on BRANCH |
| 800 | ** --brief Show filenames only |
| 801 | ** --checkin VERSION Show diff of all changes in VERSION |
| 802 | ** --command PROG External diff program - overrides "diff-command" |
| 803 | ** --context|-c N Use N lines of context |
| 804 | ** --diff-binary BOOL Include binary files when using external commands |
| 805 | ** --exec-abs-paths Force absolute path names with external commands. |
| 806 | ** --exec-rel-paths Force relative path names with external commands. |
| 807 | ** --from|-r VERSION Select VERSION as source for the diff |
| @@ -868,11 +869,12 @@ | |
| 869 | fossil_fatal("must use --from if --to is present"); |
| 870 | }else{ |
| 871 | db_find_and_open_repository(0, 0); |
| 872 | } |
| 873 | if( !isInternDiff ){ |
| 874 | zDiffCmd = find_option("command", 0, 1); |
| 875 | if( zDiffCmd==0 ) zDiffCmd = diff_command_external(isGDiff); |
| 876 | } |
| 877 | zBinGlob = diff_get_binary_glob(); |
| 878 | fIncludeBinary = diff_include_binary_files(); |
| 879 | determine_exec_relative_option(1); |
| 880 | verify_all_options(); |
| 881 |