git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Lichtenheld <frank@lichtenheld.de>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: gitster@pobox.com, Petr Baudis <pasky@suse.cz>, git@vger.kernel.org
Subject: Re: [PATCH] Git.pm: Always set Repository to absolute path if autodetecting
Date: Sat, 18 Apr 2009 23:02:25 +0200	[thread overview]
Message-ID: <20090418210225.GC17706@mail-vs.djpig.de> (raw)
In-Reply-To: <alpine.DEB.1.00.0904182012330.10279@pacific.mpi-cbg.de>

On Sat, Apr 18, 2009 at 08:13:05PM +0200, Johannes Schindelin wrote:
> On Sat, 18 Apr 2009, Frank Lichtenheld wrote:
> 
> > So far we only set it to absolute paths in some cases which lead to 
> > problems like wc_chdir not working.
> 
> We had something similar in setup.c until Linus pointed out that it 
> deteriorates performance.

You mean 044bbbcb63281dfdb78344ada2c44c96122dc822 ?

I don't think we're talking about the same issue here. The code in setup.c
prepares a variable for usage inside the running git command, while the Perl
code needs to prepare a variable for calling a git command, i.e. the content
of the GIT_DIR environment variable. As you can see from the code in setup.c
git will in fact make that content absolute before making it relative again,
so no harm should come from the fact that we're giving it an already absolute
value.

Also if we're giving it a relative path it will interpret it relative to the
current working directory and not GIT_WORK_TREE, so we should in fact not store
it relative because we would need to recalculate it after wc_chdir, which is
exactly what's causing problems.

Gruesse,
-- 
Frank Lichtenheld <frank@lichtenheld.de>
www: http://www.djpig.de/

      reply	other threads:[~2009-04-18 21:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-18 15:58 [PATCH] Git.pm: Set GIT_WORK_TREE if we set GIT_DIR Frank Lichtenheld
2009-04-18 15:58 ` [PATCH] Git.pm: Always set Repository to absolute path if autodetecting Frank Lichtenheld
2009-04-18 18:13   ` Johannes Schindelin
2009-04-18 21:02     ` Frank Lichtenheld [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=20090418210225.GC17706@mail-vs.djpig.de \
    --to=frank@lichtenheld.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pasky@suse.cz \
    /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).