git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Joey Hess <id@joeyh.name>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: GIT_INDEX_FILE relative path breaks in subdir
Date: Mon, 23 May 2016 14:52:58 -0400	[thread overview]
Message-ID: <20160523185258.GA10389@kitenet.net> (raw)
In-Reply-To: <xmqqiny4aaq9.fsf@gitster.mtv.corp.google.com>

[-- Attachment #1: Type: text/plain, Size: 1716 bytes --]

Junio C Hamano wrote:
> I personally think that it would be OK as long as we do not change
> behaviours for those who do not use core.worktree, $GIT_DIR and/or
> $GIT_WORK_TREE and change behaviour for others to match that
> behaviour, simply because the plain vanilla no-configuration would
> be used by the largest number of people.  But depending on the size
> of the "minority", you may get pushback from them.

The minority affected would I think be limited to:

1. People who have a configuration that *always* sets core.worktree etc,
   and used GIT_INDEX_FILE with a cwd-relative path and it just happened
   to work for them.

2. People who have gone through the learning curve I've suffered about
   how relative GIT_INDEX_FILE works, and put in a workaround that's
   not the obvious "use an absolute path" workaround, but is more
   complex. Like, checking the git configs and adjusting what the
   variable is set relative to. And apparently nobody in this set felt
   worth mentioning this to the list..

I am unsure about the size of 1, and am sure 2 is small to nonexistant.

> I am not sure if relative to PWD is useful.  If it were relative to
> either the GIT_DIR or the GIT_WORK_TREE, i.e. a fixed point, then
> you can set and export GIT_INDEX_FILE and chdir around without
> having to adjust it.  If it were relative to PWD, you would need to
> adjust it every time you chdir, no?

Good point, I had not considered this use case. Although if I set a
long-term environment variable and expect to chdir around, well, that's
what absolute paths are for. All my uses of GIT_INDEX_FILE
are in short-term contexts where the program does not chdir.

-- 
see shy jo

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

  reply	other threads:[~2016-05-23 18:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-17 17:18 GIT_INDEX_FILE relative path breaks in subdir Joey Hess
2016-05-17 17:34 ` Junio C Hamano
2016-05-17 18:26   ` Joey Hess
2016-05-22 19:04     ` Joey Hess
2016-05-23 16:44       ` Junio C Hamano
2016-05-23 17:29         ` Joey Hess
2016-05-23 18:30           ` Junio C Hamano
2016-05-23 18:52             ` Joey Hess [this message]
2016-05-23 19:44               ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160523185258.GA10389@kitenet.net \
    --to=id@joeyh.name \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).