Re: [PATCH RFC 2/2] diff: teach diff to expand tabs in output

2017-03-28 Thread Junio C Hamano
Jeff King writes: > That also means an option to something like "expand" is tough, because > "first character" really means "first non-ANSI-code character". That is true, but once you commit to the mindset that you are extending "expand", then that becomes a mere part of what must be done, i.e.

Re: [PATCH RFC 2/2] diff: teach diff to expand tabs in output

2017-03-28 Thread Jeff King
On Tue, Mar 28, 2017 at 01:05:40PM -0700, Jacob Keller wrote: > On Tue, Mar 28, 2017 at 12:03 PM, Junio C Hamano wrote: > > Jacob Keller writes: > > > >> I'm really not a fan of how the ws code ended up. It seems pretty ugly > >> and weird to hack in the expand_tabs stuff here. However, I'm real

Re: [PATCH RFC 2/2] diff: teach diff to expand tabs in output

2017-03-28 Thread Jacob Keller
On Tue, Mar 28, 2017 at 12:03 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> I'm really not a fan of how the ws code ended up. It seems pretty ugly >> and weird to hack in the expand_tabs stuff here. However, I'm really not >> sure how else I could handle this. Additionally, I'm not 100% s

Re: [PATCH RFC 2/2] diff: teach diff to expand tabs in output

2017-03-28 Thread Junio C Hamano
Jacob Keller writes: > I'm really not a fan of how the ws code ended up. It seems pretty ugly > and weird to hack in the expand_tabs stuff here. However, I'm really not > sure how else I could handle this. Additionally, I'm not 100% sure > whether this interacts with format-patch or other machine

[PATCH RFC 2/2] diff: teach diff to expand tabs in output

2017-03-28 Thread Jacob Keller
From: Jacob Keller When creating a diff for contents, we prepend a single character to represent the state of that line. This character can offset how the tabs in the real content are displayed, which may result in weird alignment issues when viewing the diffs. Teach the diff core a new option to