public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox•net>
To: Michal Ostrowski <mostrows@watson•ibm.com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH 1/2] Remember and use GIT_EXEC_PATH on exec()'s
Date: Mon, 09 Jan 2006 18:53:19 -0800	[thread overview]
Message-ID: <7vfynwbxpc.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 1136849754.11717.517.camel@brick.watson.ibm.com

Michal Ostrowski <mostrows@watson•ibm.com> writes:

> If git-upload-pack is invoked by ssh, it may have been invoked because
> ssh was explicitly told which program to execute on the remote end
> (i.e. --exec had been used with git-clone-pack).  In this case, the
> git suite may not be in the PATH, and so subsequent exec's by
> git-upload-pack (i.e. git-rev-list, git-pack-objects) will fail.

True.

> +.environment.GIT_EXEC_PATH:
> +	@(test -e $@ && grep -h -e '^$(bindir)$$' $@) || echo $(bindir) > $@

Hmph.

  * I did not know "test -e" was portable (it is in POSIX.1),
    but since you are creating the file yourself anyway,
    wouldn't "test -f" look more familiar?

  * Perhaps grep -F (--fixed-strings), not as regexp?

  * I do not get the point of using "grep -h" here (it's not in
    POSIX.1).  Perhaps just >/dev/null?

But I like the timestamp trick here that uses ||.  Maybe I
should borrow it for GIT-VERSION-GEN.  Maybe not.

> --- a/environment.c
> +++ b/environment.c
> @@ -9,6 +9,10 @@
>   */
>  #include "cache.h"
>  
> +#ifndef GIT_EXEC_PATH
> +#define GIT_EXEC_PATH NULL
> +#endif

I wonder if not having GIT_EXEC_PATH defined should be an error here.

> +void git_setup_exec_path(void)
> +{
>...
> +}

Maybe move git.c::prepend_to_path() to a single library file and
use it here?

  reply	other threads:[~2006-01-10  2:53 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-09 23:34 [PATCH 0/2] Remember and use GIT_EXEC_PATH on exec()'s Michal Ostrowski
2006-01-09 23:35 ` [PATCH 1/2] " Michal Ostrowski
2006-01-10  2:53   ` Junio C Hamano [this message]
2006-01-09 23:36 ` [PATCH 2/2] " Michal Ostrowski
2006-01-10  2:52   ` Junio C Hamano
2006-01-10 13:36     ` Michal Ostrowski
2006-01-10 15:01       ` Andreas Ericsson
2006-01-10 16:26         ` Michal Ostrowski
2006-01-10 19:13           ` Andreas Ericsson
2006-01-10 20:15             ` Alex Riesen
2006-01-10 20:32               ` Michal Ostrowski
     [not found]             ` <7vu0cb6f1n.fsf@assigned-by-dhcp.cox.net>
2006-01-10 20:29               ` Michal Ostrowski
2006-01-11  0:06                 ` Andreas Ericsson
2006-01-11  0:42                 ` Junio C Hamano
2006-01-11  2:09                   ` Michal Ostrowski
2006-01-11  2:12                   ` [PATCH] Exec git programs without using PATH Michal Ostrowski
2006-01-11  6:13                     ` Junio C Hamano
2006-01-11 17:05                       ` [PATCH] (Updated) " Michal Ostrowski
2006-01-11 20:33                         ` Junio C Hamano
2006-01-11 20:42                           ` Linus Torvalds
2006-01-11 21:26                             ` Michal Ostrowski
2006-01-11 21:32                               ` Junio C Hamano
2006-01-12  0:11                                 ` Andreas Ericsson
2006-01-12  5:38                                   ` H. Peter Anvin
2006-01-10 19:47           ` [PATCH 2/2] Remember and use GIT_EXEC_PATH on exec()'s Junio C Hamano
2006-01-10 19:55             ` Johannes Schindelin
2006-01-10 20:31               ` Michal Ostrowski
2006-01-10 21:03                 ` Johannes Schindelin
2006-01-11  0:10                   ` Andreas Ericsson
2006-01-11  0:57                     ` Junio C Hamano
2006-01-11 11:57                       ` Andreas Ericsson
2006-01-11 17:11                         ` Jon Loeliger
2006-01-10 21:09               ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vfynwbxpc.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox$(echo .)net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=mostrows@watson$(echo .)ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox