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

Re: [PATCH 0/4] tests: use "git xyzzy" form

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 3, 2008, 20:01 UTC
Message-ID
<7v8wu9athn.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<48BE6D1F.1060603@op5.se>
Andreas Ericsson <ae@op5.se> writes:
Show 11 quoted lines
> Nanako Shiraishi wrote:
>> These four patches update test scripts to use "git xyzzy" format so that
>> they can serve as sample usage for git commands better.
>>
>>  [PATCH 1/4] tests: use "git xyzzy" form (t0000 - t3599)
>>  [PATCH 2/4] tests: use "git xyzzy" form (t3600 - t6999)
>>  [PATCH 3/4] tests: use "git xyzzy" form (t7000 - t7199)
>>  [PATCH 4/4] tests: use "git xyzzy" form (t7200 - t9001)
>
> Are you absolutely 100% certain that what you're testing is still
> the files in the build directory after applying these patches?

Very good point, but that issue has been with us forever before these patches, because many command invocations do use "git foo" form already. t/test-lib.sh is supposed to make sure the tests do not refer to installed git.

My primary development box does not have any git installed on the system path, and I keep a bunch of installations with prefix=$HOME/git-$variant/ where $variant are master, next, maint, plus things like v1.3.0, v1.4.4.4, etc.

$PATH begins with "/home/junio/gitstuff/bin:/home/junio/git-active/bin:" before the usual /usr/bin:/bin and friends. "gitstuff" has things like stgit, guilt and tig but no git in it. $HOME/git-active is a symbolic link to point at a specific variant installed, usually 'next' but switched to 'master' during the -rc cycle.

I created a copy of installation from git-master in git-dontuse, replaced all git and git subcommands with this shell script, and pointed at it with $HOME/git-active:

    #!/bin/sh
    echo "DO NOT USE ME"
    echo "DO NOT USE ME" >&2
    exit 1
The test passes, with or without these four patches.
Previous: Andreas EricssonNext: Junio C Hamano
Message 3 of 7 in “tests: use "git xyzzy" form”
  1. 0/4 tests: use "git xyzzy" formNanako Shiraishi, Sep 3, 2008
  2. Andreas EricssonSep 3, 2008
  3. Junio C HamanoSep 3, 2008
  4. Junio C HamanoSep 3, 2008
  5. Jeff KingSep 3, 2008
  6. Jeff KingSep 3, 2008
  7. Junio C HamanoSep 3, 2008

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.