git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] log: add log.excludeDecoration config option

From
Taylor Blau <me@ttaylorr.com>
Date
Apr 14, 2020, 15:45 UTC
Message-ID
<20200414154513.GB93424@syl.local>
In-Reply-To
<0b9e3156-1101-0f19-91eb-36af541519aa@gmail.com>
On Tue, Apr 14, 2020 at 11:10:33AM -0400, Derrick Stolee wrote:
Show 25 quoted lines
> >>  log.follow::
> >>  	If `true`, `git log` will act as if the `--follow` option was used when
> >>  	a single <path> is given.  This has the same limitations as `--follow`,
> >> diff --git a/builtin/log.c b/builtin/log.c
> >> index 83a4a6188e2..d7d1d5b7143 100644
> >> --- a/builtin/log.c
> >> +++ b/builtin/log.c
> >> @@ -236,7 +236,21 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
> >>  	}
> >>
> >>  	if (decoration_style) {
> >> +		const struct string_list *config_exclude =
> >> +			repo_config_get_value_multi(the_repository,
> >> +						    "log.excludeDecoration");
> >> +
> >> +		if (config_exclude) {
> >> +			struct string_list_item *item;
> >> +			for (item = config_exclude->items;
> >> +			     item && item < config_exclude->items + config_exclude->nr;
> >> +			     item++)
> >
> > Any reason not to use the 'for_each_string_list_item' macro in
> > 'string-list.h' for this?
>
> The reason is I forgot about it.

Heh, in fairness I forgot about it, too :). I thought that this code looked familiar, but it was only luck that I had 'string-list.h' open at the time I was reading this.

I don't think that it really matters much each way, but if you're already re-rolling...

> Thanks,
> -Stolee

Thanks, Taylor

Previous: Derrick StoleeNext: Derrick Stolee
Message 4 of 22 in “log: add log.excludeDecoration config option”
  1. log: add log.excludeDecoration config optionDerrick Stolee via GitGitGadget, Apr 13, 2020
  2. Taylor BlauApr 13, 2020
  3. Derrick StoleeApr 14, 2020
  4. Taylor BlauApr 14, 2020
  5. Derrick StoleeApr 14, 2020
  6. Junio C HamanoApr 14, 2020
  7. Derrick StoleeApr 14, 2020
  8. Junio C HamanoApr 14, 2020
  9. Derrick StoleeApr 15, 2020
  10. log: add log.excludeDecoration config optionDerrick Stolee via GitGitGadget, Apr 15, 2020
  11. Taylor BlauApr 15, 2020
  12. Junio C HamanoApr 15, 2020
  13. Junio C HamanoApr 15, 2020
  14. Derrick StoleeApr 16, 2020
  15. Derrick StoleeApr 16, 2020
  16. 0/2 log: add log.excludeDecoration config optionDerrick Stolee via GitGitGadget, Apr 16, 2020
  17. 2/2 log: add log.excludeDecoration config optionDerrick Stolee via GitGitGadget, Apr 16, 2020
  18. Junio C HamanoApr 16, 2020
  19. Junio C HamanoApr 16, 2020
  20. Derrick StoleeApr 17, 2020
  21. Junio C HamanoApr 17, 2020
  22. 1/2 log-tree: make ref_filter_match() a helper methodDerrick Stolee via GitGitGadget, Apr 16, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.