git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Martin Nicolay <m.nicolay@osm-ag.de>
Cc: git@vger.kernel.org
Subject: Re: bug: setting GIT_DIR to $(git rev-parse --git-dir) changes behavior
Date: Sat, 27 Feb 2021 13:06:36 -0800	[thread overview]
Message-ID: <xmqq35xhte3n.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <alpine.LSU.2.20.2102260846280.20742@cpza.bfz-tzou.qr> (Martin Nicolay's message of "Fri, 26 Feb 2021 08:54:59 +0100 (CET)")

Martin Nicolay <m.nicolay@osm-ag.de> writes:

> On Thursday 2021-02-25 19:29, Junio C Hamano wrote:
>> The root of the working tree is at /tmp/t/, the repository at
>> /tmp/t/.git/, and you are in the foo/ subdirectory.  When you ask
>> "where is the top level of the working tree in this state, because
>> you do not have GIT_DIR or GIT_WORK_TREE environment variables, you
>> are asking Git to "discover" both the .git/ directory and the top of
>> the working tree, by starting at the current directory,
>> i.e. /tmp/t/foo, which is where you are.
>
> *facepalm* The part about GIT_DIR setting the work-tree in addition to
>  the repository I hadn't read. How embarrasing.
>
> I apoligize for my bad reading skills and wasting you time.

We would love to hear observations on which part of the
documentation was misleading and suggestions on how to make it
harder to misinterpret it.

No need to apologize, and thanks for reporting.

  reply	other threads:[~2021-02-27 21:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-26  7:54 bug: setting GIT_DIR to $(git rev-parse --git-dir) changes behavior Martin Nicolay
2021-02-27 21:06 ` Junio C Hamano [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-03-01  8:08 Martin Nicolay
2021-02-25 14:54 Martin Nicolay
2021-02-25 18:29 ` 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=xmqq35xhte3n.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=m.nicolay@osm-ag.de \
    /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).