Git development
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Mike Rappazzo <rappazzo@gmail.com>
Cc: "Duy Nguyen" <pclouds@gmail.com>,
	"Git Mailing List" <git@vger.kernel.org>,
	"Junio C Hamano" <gitster@pobox.com>,
	"SZEDER Gábor" <szeder@ira.uka.de>
Subject: Re: [PATCH] rev-parse --git-path: fix output when running in a subdirectory
Date: Thu, 9 Feb 2017 22:11:49 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1702092208220.3496@virtualbox> (raw)
In-Reply-To: <CANoM8SWv+KD92T263gS0Uxxi2ekNQdo0aNGx3AmweVasXk3GbA@mail.gmail.com>

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

Hi Mike,

On Thu, 9 Feb 2017, Mike Rappazzo wrote:

> On Thu, Feb 9, 2017 at 4:48 AM, Duy Nguyen <pclouds@gmail.com> wrote:
>
> > Relevant thread in the past [1] which fixes both --git-path and
> > --git-common-dir. I think the author dropped it somehow (or forgot
> > about it, I know I did). Sorry can't comment on that thread, or this
> > patch, yet.
> 
> I didn't exactly forget it (I have it sitting in a branch), I wasn't
> sure what else was needed (from a v5 I guess), so it has stagnated.
> 
> There was also another patch [1] at the time done by SZEDER Gábor trying
> to speed up the completion scripts by adding `git rev-parse
> --absolute-git-dir` option to deal with this case as well.
> 
> > [1] http://public-inbox.org/git/1464261556-89722-1-git-send-email-rappazzo@gmail.com/
> 
> [1] http://public-inbox.org/git/20170203024829.8071-16-szeder.dev@gmail.com/

Ah, so I was not the only person reporting this bug, but I am seemingly
having as much luck getting a fix in.

I had a quick look at your v4:
http://public-inbox.org/git/1464261556-89722-3-git-send-email-rappazzo@gmail.com/

It seems you replaced the git_path() by a combination of git_dir() and
relative_path(), but that would break the use case where git_path()
handles certain arguments specially, e.g. "objects" which knows that the
.git/objects/ path can be overridden via the environment.

I tried very hard to keep that working in my patch, essentially by
emulating what git_path() does already when being called in a worktree's
subdirectory: make the path absolute.

Ciao,
Johannes

  reply	other threads:[~2017-02-09 21:18 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-08 12:17 [PATCH] rev-parse --git-path: fix output when running in a subdirectory Johannes Schindelin
2017-02-08 18:47 ` Junio C Hamano
2017-02-09 21:05   ` Johannes Schindelin
2017-02-09 21:50     ` Junio C Hamano
2017-02-10  4:21       ` Jeff King
2017-02-09  9:48 ` Duy Nguyen
2017-02-09 13:46   ` Mike Rappazzo
2017-02-09 21:11     ` Johannes Schindelin [this message]
2017-02-09 21:33   ` Junio C Hamano
2017-02-09 22:11     ` Johannes Schindelin
2017-02-09 22:54       ` Junio C Hamano
2017-02-10  3:52         ` Mike Rappazzo
2017-02-10 15:44           ` Johannes Schindelin
2017-02-10 15:33 ` [PATCH v2 0/2] Fix bugs in rev-parse's output when run " Johannes Schindelin
2017-02-10 15:33   ` [PATCH v2 1/2] rev-parse tests: add tests executed from " Johannes Schindelin
2017-02-10 18:50     ` Junio C Hamano
2017-02-17 16:55       ` Johannes Schindelin
2017-02-10 20:25     ` Junio C Hamano
2017-02-17 16:57       ` Johannes Schindelin
2017-02-10 15:33   ` [PATCH v2 2/2] rev-parse: fix several options when running in " Johannes Schindelin
2017-02-10 18:57     ` Junio C Hamano
2017-02-17 16:53       ` Johannes Schindelin
2017-02-10 18:59   ` [PATCH v2 0/2] Fix bugs in rev-parse's output when run " Junio C Hamano
2017-02-17 16:58   ` [PATCH v3 " Johannes Schindelin
2017-02-17 16:59     ` [PATCH v3 1/2] rev-parse tests: add tests executed from " Johannes Schindelin
2017-02-17 16:59     ` [PATCH v3 2/2] rev-parse: fix several options when running in " Johannes Schindelin
2017-02-17 18:25     ` [PATCH v3 0/2] Fix bugs in rev-parse's output when run " 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

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

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1702092208220.3496@virtualbox \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=rappazzo@gmail.com \
    --cc=szeder@ira.uka.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox