From: Michael Haggerty <mhagger@alum.mit.edu>
To: Junio C Hamano <gitster@pobox.com>
Cc: "SZEDER Gábor" <szeder@ira.uka.de>,
"git discussion list" <git@vger.kernel.org>
Subject: Re: Breakage in master since 6d4bb3833c
Date: Sat, 22 Oct 2011 07:11:20 +0200 [thread overview]
Message-ID: <4EA25078.8060501@alum.mit.edu> (raw)
In-Reply-To: <7vehy68ejp.fsf@alter.siamese.dyndns.org>
On 10/21/2011 07:01 PM, Junio C Hamano wrote:
> 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/
prev parent reply other threads:[~2011-10-22 5:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-21 12:10 Breakage in master since 6d4bb3833c Michael Haggerty
2011-10-21 12:28 ` SZEDER Gábor
2011-10-21 14:01 ` Michael Haggerty
2011-10-21 17:01 ` Junio C Hamano
2011-10-22 5:11 ` Michael Haggerty [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EA25078.8060501@alum.mit.edu \
--to=mhagger@alum.mit.edu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=szeder@ira.uka.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).