git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Mike Hommey <mh@glandium.org>
To: Michael Rappazzo <rappazzo@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, pclouds@gmail.com,
	szeder@ira.uka.de, sunshine@sunshineco.com
Subject: Re: [PATCH v4 2/2] rev-parse: fix some options when executed from subpath of main tree
Date: Thu, 26 May 2016 22:26:11 +0900	[thread overview]
Message-ID: <20160526132611.GA2736@glandium.org> (raw)
In-Reply-To: <1464261556-89722-3-git-send-email-rappazzo@gmail.com>

On Thu, May 26, 2016 at 07:19:16AM -0400, Michael Rappazzo wrote:
> Executing `git-rev-parse` with `--git-common-dir`, `--git-path <path>`,
> or `--shared-index-path` from the root of the main worktree results in
> a relative path to the git dir.
> 
> When executed from a subdirectory of the main tree, it can incorrectly
> return a path which starts 'sub/path/.git'.  Change this to return the
> proper relative path to the git directory.
> 
> Related tests marked to expect failure are updated to expect success

As mentioned previously (but late in the thread), I don't get why this
one case of --git-common-dir should not return the same thing as
--git-dir, which is an absolute directory. Especially when there is
other flag telling you whether you are in the main or another worktree,
so comparing the output for --git-dir and --git-common-dir is the
easiest way to do so, but then you have to normalize them on their own
because git returns different values pointing to the same directory.

Mike

  reply	other threads:[~2016-05-26 13:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26 11:19 [PATCH v4 0/2] rev-parse: fix some options when executed from subpath of main tree Michael Rappazzo
2016-05-26 11:19 ` [PATCH v4 1/2] rev-parse tests: add tests executed from a subdirectory Michael Rappazzo
2016-05-26 11:19 ` [PATCH v4 2/2] rev-parse: fix some options when executed from subpath of main tree Michael Rappazzo
2016-05-26 13:26   ` Mike Hommey [this message]
2016-05-27 18:50     ` 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=20160526132611.GA2736@glandium.org \
    --to=mh@glandium.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=rappazzo@gmail.com \
    --cc=sunshine@sunshineco.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.
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).