git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: git@vger.kernel.org
Subject: Re: .gitattributes lookup doesn't respect GIT_WORK_TREE
Date: Mon, 16 Apr 2018 06:05:47 +0900	[thread overview]
Message-ID: <xmqqin8s18pg.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <877ep8p9yz.fsf@linux-m68k.org> (Andreas Schwab's message of "Sun, 15 Apr 2018 21:04:36 +0200")

Andreas Schwab <schwab@linux-m68k.org> writes:

> The functions in attr.c do not look at $GIT_WORK_TREE when trying to
> find the .gitattributes file.  Thus if you are not inside the work tree,
> but have GIT_WORK_TREE set attribute lookup will be wrong.

I may be mistaken (I do not have the code in front of me right now)
but IIRC after the setup.c code runs (which happens quite early in
the sequence that starts from git.c::cmd_main()), the Git process
moves to the top level of the working tree, and at that point there
is no reason to pay attention to $GIT_WORK_TREE or other mechanisms
that places the working tree at a non-standard location, because the
attributes (or any in-tree files like .gitignore or .gitmodules)
will be found relative to the current working directory no matter
what.  Did we break that recently?


  reply	other threads:[~2018-04-15 21:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-15 19:04 .gitattributes lookup doesn't respect GIT_WORK_TREE Andreas Schwab
2018-04-15 21:05 ` Junio C Hamano [this message]
2018-04-15 22:40   ` Andreas Schwab
2018-04-16 15:37     ` Duy Nguyen

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=xmqqin8s18pg.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=schwab@linux-m68k.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.
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).