Re: Simplify-by-decoration with decorate-refs-exclude

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

 



René Scharfe <l.s.r@xxxxxx> writes:

> Having cmd_log_init_finish() call load_ref_decorations() before
> setup_revisions() would indeed solve the issue as well.  But we need
> to call the latter to check if --pretty=raw was given and avoid loading
> decorations in that case, don't we?

I was thinking about giving an instance of the decoration_filter to
either rev_info or setup_revision_opt, and moving the call to
load_ref_decorations() and the decision to make that call from
cmd_log_init_finish() to setup_revisions().

>> Other two callers of load_ref_decorations() are deep inside pretty.c
>> but I wonder in the longer term if we would want to turn them into
>> an "a lot higher level should have already loaded decorations"
>> assert.
>
> This would require that higher level to parse the user format to check
> if %d or %D is present before formatting the first item.  Hmm.

Yes.  Don't we pre-scan what kind of formatting primitives are used
in the end-user supplied string already to optimize loading of notes
and source information?





[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