git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, Ilya Bobyr <ilya.bobyr@gmail.com>
Subject: Re: [RFC/PATCH v2 1/3] sh-setup: export GIT_DIR
Date: Wed, 23 Apr 2014 16:01:50 -0400	[thread overview]
Message-ID: <20140423200150.GA31356@sigill.intra.peff.net> (raw)
In-Reply-To: <1398282160-26151-2-git-send-email-felipe.contreras@gmail.com>

On Wed, Apr 23, 2014 at 02:42:38PM -0500, Felipe Contreras wrote:

> It is what the clients of this library expect.

Is it? Passing GIT_DIR to sub-invocations of git will change how they
determine the repo and working tree. Your patch seems to cause failures
all over the test suite.

Without looking too hard, I'd guess the problems are one of:

  1. Setting GIT_DIR fixes the repo directory for all sub-invocations. A
     script that does "cd some-other-repo.git && git ...". You'd need to
     teach calling scripts to unset GIT_DIR when trying to move to
     another repo.

  2. If GIT_DIR is set but GIT_WORK_TREE is not, then GIT_WORK_TREE will
     default to ".". It might be sufficient to set GIT_WORK_TREE when
     you are setting GIT_DIR here. But as I said, I didn't look too
     hard, so there might be other complications.

-Peff

  reply	other threads:[~2014-04-23 20:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-23 19:42 [RFC/PATCH v2 0/3] New 'update-branch' hook Felipe Contreras
2014-04-23 19:42 ` [RFC/PATCH v2 1/3] sh-setup: export GIT_DIR Felipe Contreras
2014-04-23 20:01   ` Jeff King [this message]
2014-04-23 20:18     ` Junio C Hamano
2014-04-23 19:42 ` [RFC/PATCH v2 2/3] run-command: make sure hooks have always GIT_DIR Felipe Contreras
2014-04-23 20:37   ` Junio C Hamano
2014-04-23 21:15     ` Felipe Contreras
2014-04-23 19:42 ` [RFC/PATCH v2 3/3] Add 'update-branch' hook Felipe Contreras
2014-04-23 20:28   ` Junio C Hamano
2014-04-23 21:08     ` Felipe Contreras
2014-04-23 21:22       ` Junio C Hamano
2014-04-23 21:35         ` Felipe Contreras

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=20140423200150.GA31356@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ilya.bobyr@gmail.com \
    /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).