From: Junio C Hamano Date: Wed, 07 Sep 2016 17:54:49 GMT Subject: Re: [PATCHv3] diff.c: emit moved lines with a different color Message-ID: In-Reply-To: Stefan Beller writes: > as we do not want to see dashes ('moved-old'), I think I'l go with > "movedfrom" and "movedto". OK. They would be color.diff.movedFrom and color.diff.movedTo in the doc, and "movedfrom" and "movedto" in the code (as the caller already downcased them for you to strcmp()). > When going through the second pass and actually emitting colored lines > we only find matches in the hash map if the current line AND the previous line > match as we lookup by hash code, i.e. if we have a moved line, but the > previous line > changed we do not find it in the hashmap and we don't color it, such > that the reviewer > can spot a permutation. Hmph. Does this have impact on a line that was at the beginning or the end of a file that got moved to the beginning or the end of a file (four permutations, of 9 if you throw in "middle"), because some cases it does not have a "previous" line?