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

Re: Breakage in master since 6d4bb3833c

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Oct 22, 2011, 05:11 UTC
Message-ID
<4EA25078.8060501@alum.mit.edu>
In-Reply-To
<7vehy68ejp.fsf@alter.siamese.dyndns.org>
On 10/21/2011 07:01 PM, Junio C Hamano wrote:
Show 5 quoted lines
> Michael Haggerty <mhagger@alum.mit.edu> writes:
> 
>> Yes, you are right.  Setting GIT=$(pwd)/bin-wrappers/git fixes the problem.
> 
> So in short, this was a false alarm crying wolf, and there was no problem?

Correct, it was my fault for not running the locally-compiled version of git the correct way to get consistent invocation of subprocesses. So there was no problem.

...but there arguably *is* a metaproblem, namely that the obvious naive way to invoke a locally-compiled test version of git without installing it neither works correctly nor fails loudly. It sometimes works (if the main process doesn't need to call any subprocesses), sometimes works accidentally (if the subprocess that is used happens to have the behavior expected by the test version) and sometimes fails bizarrely (as in my case and other cases recently mentioned on the mailing list).

I can think of a few ugly hacks that could improve the situation:
1. Don't compile executables into the project root directory, but rather
into a subdirectory named something awful like
"do-not-run-commands-from-this-directory" with a big README.txt in the
directory explaining how the commands *should* be run.  Even knowing
that one has to RTFM would be a help.
2. Include a special file like "GIT-DEV-SETUP" in the directory to which
the executables are compiled, but don't copy this file to $BINDIR when
git is installed.  Teach git commands to check for the presence of
$(dirname $0)/GIT-DEV-SETUP, and if found, do the equivalent of "exec
GIT-DEV-SETUP "$@"" or maybe just read and use some values out of
GIT-DEV-SETUP to set up the correct environment.  There could be some
environment variable like GIT_SETUP_DONE to prevent recursion and/or
allow this step to be bypassed.
3. Have git commands tell git subcommands what version they are
expecting (either via an environment variable or via a hidden
command-line parameter), and have the subcommand barf if the version
does not match its own internal version.  This approach is more
intrusive but would also help defend against inconsistently-installed
versions (like having one version installed in /usr/bin and fragments of
another version installed in $HOME/bin).
Michael
-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
Previous: Junio C Hamano
Message 5 of 5 in “Breakage in master since 6d4bb3833c”
  1. Michael HaggertyOct 21, 2011
  2. SZEDER GáborOct 21, 2011
  3. Michael HaggertyOct 21, 2011
  4. Junio C HamanoOct 21, 2011
  5. Michael HaggertyOct 22, 2011

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.