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

Re: [PATCH 3/7 v2] git_extract_argv0_path(): Move check for valid argv0 from caller to callee

From
Johannes Sixt <j6t@kdbg.org>
Date
Jan 18, 2009, 19:16 UTC
Message-ID
<200901182016.56395.j6t@kdbg.org>
In-Reply-To
<1232280015-8144-4-git-send-email-prohaska@zib.de>
On Sonntag, 18. Januar 2009, Steffen Prohaska wrote:
> This simplifies the calling code.
But it could really be squashed into the previous patch, after fixing...
Show 8 quoted lines
> @@ -23,6 +23,9 @@ const char *system_path(const char *path)
>
>  const char *git_extract_argv0_path(const char *argv0)
>  {
> +	if (!argv0 || !*argv0)
> +		return 0;
> +
>  	const char *slash = argv0 + strlen(argv0);
... this declaration after statement.
-- Hannes
Previous: Johannes SchindelinNext: Johannes Sixt
Message 10 of 12 in “RUNTIME_PREFIX”
  1. 0/7 RUNTIME_PREFIXSteffen Prohaska, Jan 18, 2009
  2. 1/7 Move computation of absolute paths from Makefile to runtime (in preparation for RUNTIME_PREFIX)Steffen Prohaska, Jan 18, 2009
  3. 2/7 Refactor git_set_argv0_path() to git_extract_argv0_path()Steffen Prohaska, Jan 18, 2009
  4. 3/7 git_extract_argv0_path(): Move check for valid argv0 from caller to calleeSteffen Prohaska, Jan 18, 2009
  5. 4/7 Add calls to git_extract_argv0_path() in programs that call git_config_*Steffen Prohaska, Jan 18, 2009
  6. 5/7 Modify setup_path() to only add git_exec_path() to PATHSteffen Prohaska, Jan 18, 2009
  7. 6/7 Compute prefix at runtime if RUNTIME_PREFIX is setSteffen Prohaska, Jan 18, 2009
  8. 7/7 Windows: Revert to default paths and convert them by RUNTIME_PREFIXSteffen Prohaska, Jan 18, 2009
  9. Johannes SchindelinJan 19, 2009
  10. Johannes SixtJan 18, 2009
  11. Johannes SixtJan 18, 2009
  12. Junio C HamanoJan 18, 2009

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.