[Bug?] log -p -W showing the whole file for a patch that adds to the end?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 10, 2016, 21:51 UTC
- Message-ID
- <xmqqh9e5mvjs.fsf@gitster.mtv.corp.google.com>
Just noticed a curiosity:
$ git show -W 3e3ceaa58 quote.c
shows the entire file. The commit in question adds a whole new function at the end of the file. If I move that addition to just before the last function the file already had before the change and amend the commit, "show -W" would work as expected, i.e. addition of the function, with three lines before and three lines after context.
The -W feature was added by 14937c2c (diff: add option to show whole functions as context, 2011-10-09).