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 15:11:11 +0100 (BST) [thread overview]
Message-ID: <alpine.DEB.1.00.0806191510060.6439@racer> (raw)
In-Reply-To: <alpine.LNX.1.00.0806182327090.19665@iabervon.org>
Hi,
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.
> - set_git_dir(make_absolute_path(git_dir));
> + set_git_dir(make_relative_path(make_absolute_path(git_dir),
> + work_tree));
> if (!work_tree || chdir(work_tree))
> die("This operation must be run in a work tree");
> initialized = 1;
All in all I am pretty surprised how easy it was. I tried yesterday, for
half an hour, to come up with something sensible, and failed.
Thanks,
Dscho
next prev parent reply other threads:[~2008-06-19 14:13 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 [this message]
2008-06-19 16:12 ` Daniel Barkalow
2008-06-19 17:09 ` Johannes Schindelin
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.0806191510060.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