Re: [GIT PATCH] Makefile missing git-runstatus in PROGRAMS list

From: Junio C Hamano <junkio@cox.net>
Date: 2006-11-16 06:04:39
"Bhavesh Davda" <bhavesh@vmware.com> writes:

> Indeed! I had "export CDPATH=.:$HOME" in my $HOME/.bash_profile.
>
> "export -n CDPATH", and now "make install" works, setting up those hard links
> too.
>
> If this is a common gotcha in building and installing git, maybe you should
> add it near the top of the INSTALL instructions.
>
> I haven't run into this issue with other projects. Is there something that
> can be changed in git's Makefile so it works even if CDPATH is set and
> exported in people's environments?

I think we already had this discussed twice on this list.

The problem is not just Makefile, but any command implemented as
shell scripts, if it needs to "cd" inside, is bitten by exported
CDPATH not just because it gives unwanted output to stdout
(which is already stupid -- CDPATH is purely convenience for
interactive session) but also because it would take the process
to unexpected places.

You can solve it by three ways.  (1) unset CDPATH at the
beginning of every shell script; (2) write all internal "cd" in
such a way that CDPATH would not try to interfere with it; (3)
teach users to fix their broken environment.

We do (1) for our shell scripts with git-sh-setup which almost
all other script sources, along with a comment for (3) at that
place.  As you say we should probably add the same to INSTALL
instructions.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Nov 16 06:05:52 2006

This archive was generated by hypermail 2.1.8 : 2006-11-16 06:07:11 EST