Re: [PATCH v5 2/3] diff: add --diff-line-prefix option for passing in a prefix
- From
Jacob Keller <jacob.keller@gmail.com>
- Date
- Aug 15, 2016, 23:09 UTC
- Message-ID
- <CA+P7+xq7cEjAeW720gtKXm==8rrfOdJu81efJdtEmsXfv7E4Vw@mail.gmail.com>
- In-Reply-To
- <xmqqwpjihwkz.fsf@gitster.mtv.corp.google.com>
On Mon, Aug 15, 2016 at 8:37 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> Jacob Keller <jacob.keller@gmail.com> writes: > >> I will look more into how to do the log version tomorrow, if I am >> still stuck I will re-work the patches as you suggest here. >> >> I am hoping I can find a good solution for how to handle it though. > > Thanks, I am hoping the same, too ;-)
Ok, so I found a way that (ab)uses the graph API to enable line-prefix support. I moved the way we handle diff prefix into the graph callback handler as well, and I also moved around some code so that the graph API will work correctly. I found several places that actually broke if you tried calling the graph API with a null graph, because they would still try to access the FILE* pointer inside and could lead to a segfault. This should fix those up as well.
Hopefully this is along the lines of what you were thinking, and it should allow more advanced calls to a submodule format that shows the full log if we wanted.
Thanks, Jake