Re: [PATCH v2 6/6] INSTALL: document a simpler way to run uninstalled builds
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:47
Matthew Ogilvie [off-list ref] writes:
quoted hunk
diff --git a/INSTALL b/INSTALL index be504c9..ee718c6 100644 --- a/INSTALL +++ b/INSTALL@@ -39,7 +39,19 @@ Issues of note: with --disable-transition option to avoid this. - You can use git after building but without installing if you - wanted to. Various git commands need to find other git + want to. + + The simplest option for running some manual tests of a build + before installing it is to use the wrapper scripts that are built + and saved into `pwd`/bin-wrappers. Either invoke the scripts in + bin-wrappers using their full paths, put bin-wrappers in your + PATH, or copy/symlink just the bin-wrappers scripts into somewhere + already in your PATH. But this option is slightly inefficient, + so for a more permanent solution we recommend either installing + git (you can set a prefix to install right next to your + build directory), or use the alternative below.
Drop "simplest" and "slightly".
I think you forgot to mention an important improvement you made since the
earlier iteration on the wrap-for-bin script in the cover letter. With
the new wrap-for-bin, we do not have to worry about the case a random
binary in the directory is run without first adding anything to user's
$PATH anymore, no?
With that change, this round's implementation deserves to be recommended
as the new preferred way to run "use after building without installing", I
think. So how about making the text like this?
You can use git after building but without installing if you want to
test drive it. Simply run git found in bin-wrappers directory in the
build directory, or prepend that directory to your $PATH. This
however is less efficient than running an installed git, as you always
need an extra fork+exec to run any git subcommand.
It is still possible to use git without installing by setting a few
environment variables, which was the way this was done traditionally.
But using git found in bin-wrappers directory in the build directory
is far simpler. Just for a historical reference, the old way went
like this:
GIT_EXEC_PATH=`pwd`
PATH=`pwd`:$PATH
GITPERLLIB=`pwd`/perl/blib/lib
export GIT_EXEC_PATH PATH GITPERLLIB