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

Re: [PATCH v5 13/15] compat: die when unable to set core.precomposeunicode

From
Patrick Steinhardt <ps@pks.im>
Date
Feb 17, 2016, 10:34 UTC
Message-ID
<20160217103419.GA743@pks-xps.fritz.box>
In-Reply-To
<435511DD-0B0F-437F-974C-65C7265188A8@gmail.com>
On Wed, Feb 17, 2016 at 10:14:57AM +0100, Lars Schneider wrote:
Show 30 quoted lines
> 
> On 16 Feb 2016, at 13:56, Patrick Steinhardt <ps@pks.im> wrote:
> 
> > When calling `git_config_set` to set 'core.precomposeunicode' we
> > ignore the return value of the function, which may indicate that
> > we were unable to write the value back to disk. As the function
> > is only called by init-db we can and should die when an error
> > occurs.
> > 
> > Signed-off-by: Patrick Steinhardt <ps@pks.im>
> > ---
> > compat/precompose_utf8.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/compat/precompose_utf8.c b/compat/precompose_utf8.c
> > index 079070f..9ff1ebe 100644
> > --- a/compat/precompose_utf8.c
> > +++ b/compat/precompose_utf8.c
> > @@ -50,7 +50,8 @@ void probe_utf8_pathname_composition(void)
> > 		close(output_fd);
> > 		git_path_buf(&path, "%s", auml_nfd);
> > 		precomposed_unicode = access(path.buf, R_OK) ? 0 : 1;
> > -		git_config_set("core.precomposeunicode", precomposed_unicode ? "true" : "false");
> > +		git_config_set_or_die("core.precomposeunicode",
> > +				      precomposed_unicode ? "true" : "false");
> 
> I haven't been actively following this topic, so I don't know much about
> it. However, I just noticed that the topic might brake the OS X build?
> 
> https://travis-ci.org/git/git/jobs/109752716 

Thanks for the notice. Seems I've forgotten to switch that back to `git_config_set`. Didn't notice the breakage as the file is not required on my system.

Patrick
Previous: Lars SchneiderNext: Patrick Steinhardt
Message 18 of 25 in “config: make git_config_set die on failure”
  1. 00/15 config: make git_config_set die on failurePatrick Steinhardt, Feb 16, 2016
  2. 01/15 config: introduce set_or_die wrappersPatrick Steinhardt, Feb 16, 2016
  3. 02/15 branch: report errors in tracking branch setupPatrick Steinhardt, Feb 16, 2016
  4. Junio C HamanoFeb 16, 2016
  5. Patrick SteinhardtFeb 17, 2016
  6. 03/15 branch: die on config error when unsetting upstreamPatrick Steinhardt, Feb 16, 2016
  7. 04/15 branch: die on config error when editing branch descriptionPatrick Steinhardt, Feb 16, 2016
  8. 05/15 submodule: die on config error when linking modulesPatrick Steinhardt, Feb 16, 2016
  9. 06/15 submodule--helper: die on config error when cloning modulePatrick Steinhardt, Feb 16, 2016
  10. 07/15 remote: die on config error when setting URLPatrick Steinhardt, Feb 16, 2016
  11. 08/15 remote: die on config error when setting/adding branchesPatrick Steinhardt, Feb 16, 2016
  12. 09/15 remote: die on config error when manipulating remotesPatrick Steinhardt, Feb 16, 2016
  13. 10/15 clone: die on config error in cmd_clonePatrick Steinhardt, Feb 16, 2016
  14. 11/15 init-db: die on config errors when initializing empty repoPatrick Steinhardt, Feb 16, 2016
  15. 12/15 sequencer: die on config error when saving replay optsPatrick Steinhardt, Feb 16, 2016
  16. 13/15 compat: die when unable to set core.precomposeunicodePatrick Steinhardt, Feb 16, 2016
  17. Lars SchneiderFeb 17, 2016
  18. Patrick SteinhardtFeb 17, 2016
  19. 14/15 config: rename git_config_set to git_config_set_gentlyPatrick Steinhardt, Feb 16, 2016
  20. 15/15 config: rename git_config_set_or_die to git_config_setPatrick Steinhardt, Feb 16, 2016
  21. Michael BlumeFeb 17, 2016
  22. Michael BlumeFeb 17, 2016
  23. Junio C HamanoFeb 17, 2016
  24. Eric SunshineFeb 16, 2016
  25. Patrick SteinhardtFeb 17, 2016

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.