Fossil SCM

Add the --command option to "fossil diff".

drh 2016-10-25 20:25 trunk
Commit eb67f09c9ad28228cbf977d04ede2eaf4d6a3cc2
1 file changed +3 -1
+3 -1
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -797,10 +797,11 @@
797797
** Options:
798798
** --binary PATTERN Treat files that match the glob PATTERN as binary
799799
** --branch BRANCH Show diff of all changes on BRANCH
800800
** --brief Show filenames only
801801
** --checkin VERSION Show diff of all changes in VERSION
802
+** --command PROG External diff program - overrides "diff-command"
802803
** --context|-c N Use N lines of context
803804
** --diff-binary BOOL Include binary files when using external commands
804805
** --exec-abs-paths Force absolute path names with external commands.
805806
** --exec-rel-paths Force relative path names with external commands.
806807
** --from|-r VERSION Select VERSION as source for the diff
@@ -868,11 +869,12 @@
868869
fossil_fatal("must use --from if --to is present");
869870
}else{
870871
db_find_and_open_repository(0, 0);
871872
}
872873
if( !isInternDiff ){
873
- zDiffCmd = diff_command_external(isGDiff);
874
+ zDiffCmd = find_option("command", 0, 1);
875
+ if( zDiffCmd==0 ) zDiffCmd = diff_command_external(isGDiff);
874876
}
875877
zBinGlob = diff_get_binary_glob();
876878
fIncludeBinary = diff_include_binary_files();
877879
determine_exec_relative_option(1);
878880
verify_all_options();
879881
--- 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

Keyboard Shortcuts

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