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

Re: [PATCH] Make git_dir a path relative to work_tree in setup_work_tree()

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 19, 2008, 03:03 UTC
Message-ID
<7vr6auw2ha.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LNX.1.00.0806181949160.19665@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
>  	if (initialized)
>  		return;
> -	work_tree = get_git_work_tree();
> +	work_tree = xstrdup(make_absolute_path(get_git_work_tree()));
Might be a nice try, but Oops, I suspect.

Doesn't the presense of "if (!work_tree..." below tell you that the function you are calling can legitimately return NULL?

Previous: Daniel Barkalow
Message 2 of 2 in “Make git_dir a path relative to work_tree in setup_work_tree()”
  1. Make git_dir a path relative to work_tree in setup_work_tree()Daniel Barkalow, Jun 19, 2008
  2. Junio C HamanoJun 19, 2008

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.