1

The following command shows me all my changes between the two dates, however, because the software is written in VB6, there are many code changes I wish to ignore.

git log --after="2016-03-01" --before="2016-04-01" --author="Pingu" -p --all --unified=0 -w

Unfortunately, the VB6 IDE randomly changes both the case of variables, and the size of fonts.

How can I prevent random numeric code changes in Visual Basic?

Stop Visual Basic 6 from changing my casing

Is there anyway I can build some intelligence into the git log command so that differences in case are ignored, and differences in numbers (of a single digit) are ignored?


This answer is not applicable as...

  1. It doesn't also allow the author and date filter to take place
  2. It doesn't address the changing font number.
Community
  • 1
  • 1
pingu
  • 8,719
  • 12
  • 50
  • 84
  • Possible duplicate of [How to perform case insensitive diff in Git](http://stackoverflow.com/questions/17380029/how-to-perform-case-insensitive-diff-in-git) – Brian Malehorn Jun 30 '16 at 21:55
  • @Brian - thanks, but unfortunately this solution is not applicable for the reasons I set out in my edited question. – pingu Jul 01 '16 at 09:17
  • Possible duplicate of [Git - Discard case only changes](https://stackoverflow.com/questions/17868854/git-discard-case-only-changes) – StayOnTarget Jan 23 '19 at 22:05

2 Answers2

1

I'm afraid there's no direct way to do this with Git.

But you may try to exploit the Git's ability to use custom "diff drivers" which can be used either globally or per file types (based on the extension of their names).

Start with git help config and search for diff.<driver>.

Then continue with git help attributes and search for the explanation of the diff attribute there — it binds particular file types with particular diff drivers configured by the user.

Unfortunately, that's all I know on the subject so you'll need to do your own research on configuring diff drivers in Git.

kostix
  • 51,517
  • 14
  • 93
  • 176
1

Sadly there doesn't seem to be a way to ignore font size changes. But you can still get the commit messages along with a case-insensitive diff. Based on https://stackoverflow.com/a/17380104/2574937:

git config --global difftool.idiff.cmd 'diff -i $LOCAL $REMOTE'
git config --global difftool.prompt 0

( for commit in $(git log master..HEAD --format=%H); do
    git log --color=always -n 1 $commit
    git difftool --tool idiff $commit^ $commit
done ) | less -R
Community
  • 1
  • 1
Brian Malehorn
  • 2,627
  • 14
  • 15