Git development
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Junio C Hamano <gitster@pobox.com>,
	Linus Torvalds <torvalds@osdl.org>,
	git@vger.kernel.org
Subject: Re: [PATCH v2] Make git_dir a path relative to work_tree in setup_work_tree()
Date: Thu, 19 Jun 2008 18:09:04 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.1.00.0806191807120.6439@racer> (raw)
In-Reply-To: <alpine.LNX.1.00.0806191146210.19665@iabervon.org>

Hi,

On Thu, 19 Jun 2008, Daniel Barkalow wrote:

> On Thu, 19 Jun 2008, Johannes Schindelin wrote:
> 
> > On Wed, 18 Jun 2008, Daniel Barkalow wrote:
> > 
> > > diff --git a/setup.c b/setup.c
> > > index d630e37..1643ee4 100644
> > > --- a/setup.c
> > > +++ b/setup.c
> > > @@ -292,7 +292,8 @@ void setup_work_tree(void)
> > >  	work_tree = get_git_work_tree();
> > >  	git_dir = get_git_dir();
> > >  	if (!is_absolute_path(git_dir))
> > 
> > I suspect it needs "work_tree &&" here.
> 
> I'm not clear on the semantics of !get_git_work_tree(); is a non-absolute 
> path for git_dir right then?

My reading was: if there is no work_tree, then a relative git_dir is just 
fine, since we are quite unlikely to jump around in the file system.

And your implementation of make_relative_path() is nice enough to a 
(work_tree ==) base == NULL, but would return the absolute path in that 
case.

Haven't had time to test anything, though.

Ciao,
Dscho

  reply	other threads:[~2008-06-19 17:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-19  3:28 [PATCH v2] Make git_dir a path relative to work_tree in setup_work_tree() Daniel Barkalow
2008-06-19 14:11 ` Johannes Schindelin
2008-06-19 16:12   ` Daniel Barkalow
2008-06-19 17:09     ` Johannes Schindelin [this message]
2008-06-19 18:24 ` Junio C Hamano
2008-06-19 18:44   ` Daniel Barkalow
2008-06-19 19:34   ` Linus Torvalds

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=alpine.DEB.1.00.0806191807120.6439@racer \
    --to=johannes.schindelin@gmx.de \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=torvalds@osdl.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