Re: [PATCH] help git-upload-pack find git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Sixt venit, vidit, dixit 16.09.2008 15:43:
> Michael J Gruber schrieb:
>> Why is it that setup_path() cannot be done before commit_pager_choice()?
>> We need the pager in case list_common_cmds_help() is triggered, but why
>> can't setup_path() be before that? Not because of "--", really.
> 
> I think that setup_path() must be called *after* handle_options() because
> of this use-case:
> 
>   $ git --exec-path=/some/where foo
> 
> and git_set_argv0_path() must be called *before* handle_options() because
> of this use-case:
> 
>   $ git --exec-path
> 
> -- Hannes

Tricky, I see. But still I'm getting more and more confused:
handle_options() calls git_exec_path() in this case, which does (unless
there is argv_exec_path or the variable):
return system_path(GIT_EXEC_PATH)
Duh, that comes from the Makefile, -DGIT_EXEC_PATH... Back to somewhat
less confused state.

OK, now how about

A: path as submitted

or

B: leave git.c as is, except that setup_path(NULL) is used; have
setup_path(argv0path) call git_set_argv0_path() unless the arg is NULL;
tell upload-pack etc. to stuff (other setup_path() callers) their
argv[0] into setup_path(). Junio, is that what you meant?

Michael

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux