@@ -12,10 +12,6 @@ const pkg = require("../../package.json");
1212 * @param {string } [options.endRef] - Ending git reference to compare to
1313 * @param {string } [options.output=git-diffs] - Directory to output the diff files
1414 * @param {string[] } [options.exclude] - File patterns to exclude from the diff
15- * @param {string } [options.format=diff] - Diff format:
16- * - 'diff': Traditional git diff format
17- * - 'unified': Unified diff format
18- * - 'side-by-side': Two column comparison view
1915 * @param {boolean } [options.lightMode=false] - Use light mode theme instead of dark
2016 * @param {string } [options.mode] - Comparison mode (pr, commit, tag)
2117 *
@@ -32,13 +28,6 @@ const pkg = require("../../package.json");
3228 * - Navigation links between files
3329 */
3430
35- // Add this helper function
36- function isCommitHash ( ref ) {
37- // Git commit hashes are 40 chars or abbreviated to at least 7 chars
38- // and contain only hexadecimal characters
39- return ref && / ^ [ 0 - 9 a - f ] { 7 , 40 } $ / i. test ( ref ) ;
40- }
41-
4231// Add this branding function
4332function showBranding ( ) {
4433 console . log ( `
@@ -55,7 +44,6 @@ program
5544 . option ( "-e, --end-ref <ref>" , "Ending reference (commit hash, branch name, or tag)" )
5645 . option ( "-o, --output <dir>" , "Output directory" , "git-diffs" )
5746 . option ( "--exclude <patterns...>" , "Additional file patterns to exclude" )
58- . option ( "-f, --format <format>" , "Diff format (diff, unified, side-by-side)" , "diff" )
5947 . option ( "--light-mode" , "Use light mode theme instead of dark mode" )
6048 . option ( "-m, --mode <mode>" , "Comparison mode (pr, commit, tag)" , "pr" )
6149 . addHelpText ( 'after' , `
@@ -72,8 +60,8 @@ Examples:
7260 # Compare commits (use -m commit for commit comparison)
7361 $ gitloom-diff -s abc123 -e def456 -m commit
7462
75- # Side-by-side diff with custom output
76- $ gitloom-diff -s main -e develop -o pr-diffs -f side-by-side
63+ # Diff with custom output
64+ $ gitloom-diff -s main -e develop -o pr-diffs
7765
7866Note:
7967 Mode (-m) affects how git compares the references:
8674 const config = {
8775 outputDir : options . output ,
8876 exclusions : options . exclude || [ ] ,
89- diffFormat : options . format ,
9077 darkMode : ! options . lightMode ,
9178 mode : options . mode
9279 } ;
0 commit comments