0

I would use GIT DIFF to compare change between 2 files.

To do that, I use following command

git.exe diff 
  --ignore-all-space 
  --ignore-blank-lines 
  --diff-algorithm=minimal 
  --no-index  
  ./GTST.TLGADBA 
  ./GWHP.TLGADBA 
  >DIFFERENCE.txt

That's work well except in the following situation

When file in first folder contains

CREATE FUNCTION FN_CALCULATE (p_value_to_align IN NUMBER

and file in second folder contains

CREATE FUNCTION FN_CALCULATE 
( p_value_to_align IN NUMBER

GIT DIFF program notifies that these lines are distinct !

The only difference is that line in first file is concatenation of 2 lines in second file. On Windows Operating System, the difference is only \r\n or new-line characters.

Is there a GIT DIFF parameter that I can use so that these lines are not more distinct ?

Examples:

--consider-new-line-as-spaces
--ignore-all-new-lines
--continue-compare-on-next-line

I have read the documentation at https://git-scm.com/docs/git-diff but I don't find an answer to my question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.