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]

 



On Fri, Aug 12, 2016 at 2:15 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Jacob Keller <jacob.e.keller@xxxxxxxxx> writes:
>
>> The prefix shall come first prior to any other prefix associated with
>> the --graph option or other source.
>>
>> Add tests for the same.
>>
>> Signed-off-by: Jacob Keller <jacob.keller@xxxxxxxxx>
>> ---
>> - v5
>> * Changed name to --diff-line-prefix since --line-prefix might indicate
>>   for other commands such as log, when it only modifies diff output
>
> As you are adding this to "diff.c", I think the option would be
> visible to "git log" anyway, and more importantly
>
>     git log --line-prefix='I I ' --graph --boundary -p HEAD^..HEAD
>
> should honor the line-prefix for the log message part.  I'd expect
> that its output would be like:
>
> I I * commit 3c90ffd2f01e2d0d080c8e42df2ee89709b324de
> I I | Author: Jacob Keller <jacob.keller@xxxxxxxxx>
> I I | Date:   Thu Aug 11 15:59:45 2016 -0700
> I I |
> I I |     diff: add --diff-line-prefix option for passing in a prefix
> I I |
> I I |     Add an option to pass additional prefix to be displayed before diff
> I I |     output. This feature will be used in a following patch to output correct
> I I |     ...
> I I |     Signed-off-by: Jacob Keller <jacob.keller@xxxxxxxxx>
> I I |     Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>
> I I |
> I I | diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
> I I | index 705a873..f924f57 100644
> I I | --- a/Documentation/diff-options.txt
> I I | +++ b/Documentation/diff-options.txt
> I I | ...
>
> Otherwise, a "git log --graph -p --submodule=log-with-diff", when
> showing a commit in the superproject that changes submodule from
> commit A to commit B, wouldn't be able to run "git log --graph -p A..B",
> i.e. as if the command recursed beyond the module boundary, would
> it?
>

Hmmmm, yes. I'll dig through and see if I can get the prefix to be
honored by the git log as well.

Thanks,
Jake

>
>
--
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]