git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <git-users@io7m.com>
To: git@vger.kernel.org
Subject: Debugging a bizarre problem: What can influence 'git fetch'?
Date: Fri, 1 Mar 2013 14:39:40 +0000	[thread overview]
Message-ID: <20130301143940.7e31f0c2@copperhead.int.arc7.info> (raw)

Hello.

I'm working on a small project that talks to external git and fossil
repositories. I've run into a bizarre "this cannot happen" problem and
am completely mystified as to what's causing it.

Essentially, the problem is that a particular git command, run as part
of the unit tests for the project, fails reliably when executed from
the project's build system but works correctly when run directly from the
command line or when the same unit tests are executed from the IDE).

The unit test executes the following commands (where e5KbuUvD4Ps is a
random string to ensure that each invocation of the test starts from a
blank canvas):

/usr/bin/git clone --mirror --bare http://git.io7m.com/io7m-jaux.git /tmp/test-e5KbuUvD4Ps/io7m-jaux.git
/usr/bin/git --git-dir=/tmp/test-e5KbuUvD4Ps/io7m-jaux.git fetch -v

The 'git fetch' command raises the following error:

error: Unable to find f981a2bb02c38f20c1e3a5a0fc37c2b4ef5b92ea under http://git.io7m.com/io7m-jaux.git
Cannot obtain needed object f981a2bb02c38f20c1e3a5a0fc37c2b4ef5b92ea
error: Fetch failed.

The f981a2bb02c38f20c1e3a5a0fc37c2b4ef5b92ea is the HEAD commit of the master
branch in the above repos.

I can execute the fetch command from the command line (on the same clones created
by any past invocations of the unit test) and it works correctly. I can run the unit
test from the IDE and it works correctly.

In desperation, I've replaced the git binary with a shell script that logs
the current environment and command line arguments to a file before executing
the real git binary and in all cases, they're completely identical.

I'm out of ideas. What bizarre invisible environment pollution could possibly
be influencing 'git fetch' in this manner? Is there some way to get 'git fetch'
to be more verbose?

M

             reply	other threads:[~2013-03-01 16:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-01 14:39 git-users [this message]
2013-03-02 10:32 ` Debugging a bizarre problem: What can influence 'git fetch'? Tay Ray Chuan
2013-03-02 12:59   ` git-users

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=20130301143940.7e31f0c2@copperhead.int.arc7.info \
    --to=git-users@io7m.com \
    --cc=git@vger.kernel.org \
    /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).