ElectricRCAircraftGuy / eRCaGuy_dotfiles

.bashrc file, terminal prompt that shows current git branch, Arduino setup, Eclipse setup, git diff with line numbers, helpful scripts, improved Linux productivity, etc.
MIT License
209 stars 60 forks source link

Make work with `git diffn --word-diff` #11

Open ElectricRCAircraftGuy opened 3 years ago

ElectricRCAircraftGuy commented 3 years ago

Bug: --word-diff doesn't work. I'm seeing a lot of this in the output when I do git diffn --word-diff:

============== GIT DIFFN ERROR ==============
THIS CODE SHOULD NEVER BE REACHED! If you see this, open up an issue for `git diffn`
  here: https://github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/issues
  It may be because you have some custom `git config` color or text formatting settings
  or something, which perhaps I am failing to handle correctly.
ElectricRCAircraftGuy commented 3 years ago

Note: what I'd reeeeaaaally like to see this work with the most, however, is the character-by-character diff highlighting, like this:

git diff --word-diff-regex=.  # good
# And:
git diff --color-words=.      # best

See this answer, and the comment under it: https://stackoverflow.com/questions/3231759/how-can-i-visualize-per-character-differences-in-a-unified-diff-file/7870727#7870727.

ap6us commented 3 years ago

Am seeing this issue too.

Raw line: 
=============================================
   36,  36:    //For generator: Cq_ContentToWordsMap_applyAsWord;
   37,  37:    [-private-]{+public+} static final Path sourcePath = Cq_ContentToWordsMap_applyAsWord.OUTPUT_PATH;
   38,  38:    [-private-]{+public+} static final List<String> output = Cq_ContentToWordsMap_applyAsWord.generate();
   39,  39:    [-private-]{+public+} static final String OUTPUT_FORMAT = "    output.add(\"%s\");";
============== GIT DIFFN ERROR ==============
THIS CODE SHOULD NEVER BE REACHED! If you see this, open up an issue for `git diffn`
  here: https://github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/issues
  It may be because you have some custom `git config` color or text formatting settings
  or something, which perhaps I am failing to handle correctly.
Raw line: 
=============================================
============== GIT DIFFN ERROR ==============
THIS CODE SHOULD NEVER BE REACHED! If you see this, open up an issue for `git diffn`
  here: https://github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/issues
  It may be because you have some custom `git config` color or text formatting settings
  or something, which perhaps I am failing to handle correctly.
Raw line: 
=============================================
   40,  40:    // could add counter to show where it appeared in source