Re: [PATCH v5 4/6] pretty: allow caller to disable indentation

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Toon Claes <toon@xxxxxxxxx> writes:
>
>> Most pretty formats indent the commit message with 4 spaces. Add field
>> `no_indent` to `struct pretty_print_context` to suppress this
>> indentation.
>>
>> Signed-off-by: Toon Claes <toon@xxxxxxxxx>
>>
>> # Conflicts:
>> #	pretty.h
>
> Careful.  There is no need to rush your patches to send a version
> that hasn't been proof-read.

Whoops, I missed that. No idea how that happened. I have
`core.commentchar` set to `;`, because I used to write markdown headings
in my commit messages (with leading `#`). But even then, this should not
happen. I'm curious if I'm able to figure out what went wrong...

>>
>> Signed-off-by: Toon Claes <toon@xxxxxxxxx>
>> ---
>
> I doubt that this is what you want in this series anyway, though.
> You use this for "-z --extended", which presumably is about giving
> the output that is as faithful as possible to the original, but if
> you look at pretty_print_commit(), it does a LOT MORE than just
> indent the log by 4 spaces.  I suspect you would rather want to
> avoid even calling pretty_print_commit() in such a code path.

That's a good point. Before I submitted this version I was thinking to
have it support `--format` and `--pretty`, but that was even more
complex than what we have here. Indeed, we probably don't need
pretty_print_commit(). 

-- 
Cheers,
Toon




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

  Powered by Linux