Re: [PATCH v5 2/3] diff: add --diff-line-prefix option for passing in a prefix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jacob Keller <jacob.keller@xxxxxxxxx> writes:

> On Fri, Aug 12, 2016 at 2:58 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>> On Fri, Aug 12, 2016 at 2:43 PM, Jacob Keller <jacob.keller@xxxxxxxxx> wrote:
>>> Ok so the big problem here is that unlike with diff which has support
>>> for line-prefixes already due to needing it for graph mode, I can't
>>> figure out where to get the prefix added for log output.
>>
>> Doesn't the --graph mode show the graph lines already? I think most
>> if not all of that processing happens inside log-tree.c::show_log().
>
> Yes but the problem is how to get this additional prefix to be displayed for
>
> (a) non graph mode
> (b) for graph mode but display the prefix before the graph prefix
>
> It doesn't seem straight forward, and I haven't figured out how the
> graph code already works.

Because you only need "diff --line-prefix" to work while leaving
"log --line-prefix" broken for the purpose of your immediate purpose
to update "diff/log [--graph and other options] --submodule=<type>"
to show "diff A B" in the submodule, I think it is OK to leave it
broken, as long as it is clearly documented that "--line-prefix"
should also apply to the log message part but the current code
doesn't.  Eventually, when somebody wants to add a new <type> that
runs "log -p A..B" instead of "diff A B" in submodules and wants to
make it interact well with "log --graph" at the superproject level,
they need to fix the breakage you leave behind.  That would be much
better than "because I cannot figure out how to prefix on the log
part, I'll name this --diff-line-prefix", which will force us to
support that half-baked option forever while having to add a proper
"--line-prefix" eventually anyway.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]