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

Re: [PATCH 3/5] notes: extract logic into set_display_notes()

From
Philip Oakley <philipoakley@iee.email>
Date
Dec 10, 2019, 11:22 UTC
Message-ID
<95295e75-7d8d-bc6e-c41f-dd52c9826dfe@iee.email>
In-Reply-To
<20191209191924.GA24159@generichostname>
HI Denton
On 09/12/2019 19:19, Denton Liu wrote:
Show 15 quoted lines
> the "lockstep" thing was what I was going for. That's why I ended
> up using one monolithic function instead of several smaller ones. That
> way, the caller can just blindly pass in values and then use the values
> returned to set its own state (i.e. how 4/5 does it). Also, it would
> ensure that future developers using this function won't forget to set
> the corresponding show_notes variable to whatever value is appropriate.
>
> The reason why we can't accept `revs` is because this series attempts to
> stop depending on `revs` for the notes configuration entirely. That way,
> we can call git_config() before repo_init_revisions() since we won't
> need to have `revs` initialised.
>
> I considered accepting an `int *` instead of using the return value to
> make the intent more explicit but I didn't do that because the return
> value seemed easier to deal with.

Does your explanation: "this series attempts to stop depending on `revs` for the notes configuration entirely." need adding adding to the commit message? I.e. the "abstract away" phrase probably doesn't carry enough information/context.p

Maybe pick out some of the explanations for the commit message for future readers?

Philip
Previous: Denton LiuNext: Denton Liu
Message 7 of 11 in “format-patch: improve handling of `format.notes`”
  1. 0/5 format-patch: improve handling of `format.notes`Denton Liu, Dec 9, 2019
  2. 1/5 notes: rename to load_display_notes()Denton Liu, Dec 9, 2019
  3. 2/5 notes: create init_display_notes() helperDenton Liu, Dec 9, 2019
  4. 3/5 notes: extract logic into set_display_notes()Denton Liu, Dec 9, 2019
  5. Eric SunshineDec 9, 2019
  6. Denton LiuDec 9, 2019
  7. Philip OakleyDec 10, 2019
  8. 4/5 format-patch: use --notes behavior for format.notesDenton Liu, Dec 9, 2019
  9. 5/5 format-patch: move git_config() before repo_init_revisions()Denton Liu, Dec 9, 2019
  10. Junio C HamanoDec 9, 2019
  11. Elijah NewrenDec 9, 2019

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.