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

Re: [PATCH v2 6/6] INSTALL: document a simpler way to run uninstalled builds

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 30, 2009, 06:48 UTC
Message-ID
<7vaay41p9n.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1259561971-25730-7-git-send-email-mmogilvi_git@miniinfo.net>
Matthew Ogilvie <mmogilvi_git@miniinfo.net> writes:
Show 20 quoted lines
> 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
Previous: Matthew OgilvieNext: Jakub Narebski
Message 8 of 14 in “Run test suite without dashed commands in PATH”
  1. 0/6 Run test suite without dashed commands in PATHMatthew Ogilvie, Nov 30, 2009
  2. 1/6 t2300: use documented technique to invoke git-sh-setupMatthew Ogilvie, Nov 30, 2009
  3. 2/6 t3409 t4107 t7406: use dashless commandsMatthew Ogilvie, Nov 30, 2009
  4. 3/6 t/README: Document GIT_TEST_INSTALLED and GIT_TEST_EXEC_PATHMatthew Ogilvie, Nov 30, 2009
  5. 4/6 build dashless "bin-wrappers" directory similar to installed bindirMatthew Ogilvie, Nov 30, 2009
  6. 5/6 run test suite without dashed git-commands in PATHMatthew Ogilvie, Nov 30, 2009
  7. 6/6 INSTALL: document a simpler way to run uninstalled buildsMatthew Ogilvie, Nov 30, 2009
  8. Junio C HamanoNov 30, 2009
  9. Jakub NarebskiDec 1, 2009
  10. Matthew OgilvieDec 2, 2009
  11. Junio C HamanoDec 2, 2009
  12. Junio C HamanoNov 30, 2009
  13. Matthew OgilvieDec 1, 2009
  14. Junio C HamanoNov 30, 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.