4 ms·
git diff --patience might give you better results? I've seen this pattern too, but I can't find a reproduction of normal git diff giving it to me at the moment
by stormbrew 11y ago
git diff --patience
might give you better results? I've seen this pattern too, but I can't find a reproduction of normal git diff giving it to me at the moment.
- stock_toaster 11y agoI use this in my ~/.gitconfig [diff] algorithm = patience
- paulirish 11y agoI've experimented with patience diff, but not seen it deliver reliably superior results than myers (the current default).
- aidenn0 11y agoI saw it deliver superior results enough that I spent a while figuring out how to get vimdiff to use patience.
- fredmorcos 11y agoAnd? What do I need to do to get that? :)
- aidenn0 11y agoOh, just saw this, it involves invoking the proper git tools to get the diff, and then converting the diff format from unified to ed format. The later is actually easier than it might seem as unified diffs start all of their special information in column 0; IIRC I wrote an awk script to do this. It's on my work machine though, so I don't have it handy.
- FaceKicker 11y agoI tried GP's example, and in this particular case both --patience and the default (Myers) work the same, both doing the thing you want them to. Which perplexes me, because I know I've seen the bad case too, but can't seem to find a minimal example of it (I tried a couple variations on the example; they all did the 'right' thing).