All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Lederhofer <matled@gmx.net>
To: git@vger.kernel.org
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] git-init: set core.worktree if GIT_WORK_TREE is specified
Date: Wed, 4 Jul 2007 11:29:15 +0200	[thread overview]
Message-ID: <20070704092915.GA18597@moooo.ath.cx> (raw)
In-Reply-To: <20070703224919.GA22578@moooo.ath.cx>

> +	if (!getcwd(cwd, sizeof(cwd)) || cwd[0] != '/')
> +		die("Unable to read current working directory");

Dscho just pointed out that this causes problems on windows.  The same
is also in setup_git_directory_gently and was there before I touched
it, introduced by Linus in d288a700.  What was the original reason to
do this?  Are there implementations of getcwd which return a relative
path?

Additionally there are other places which need to check if some user
supplied path is absolute.  Should we have a macro/function for that
which depends on the os and checks for path[0] = '/' on unix and
perhaps path[1] = ':' on windows?

  reply	other threads:[~2007-07-04  9:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-03 22:49 [PATCH] git-init: set core.worktree if GIT_WORK_TREE is specified Matthias Lederhofer
2007-07-04  9:29 ` Matthias Lederhofer [this message]
2007-07-04 10:41   ` Johannes Sixt
2007-07-04 11:57     ` Johannes Schindelin
2007-07-04 16:23   ` Linus Torvalds
2007-07-04 17:07     ` Junio C Hamano
2007-07-04 17:31       ` 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=20070704092915.GA18597@moooo.ath.cx \
    --to=matled@gmx.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.