git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: "SZEDER Gábor" <szeder@ira.uka.de>
Cc: "Mike Rappazzo" <rappazzo@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Nguyễn Thái Ngọc" <pclouds@gmail.com>,
	"Git List" <git@vger.kernel.org>
Subject: Re: [PATCH v2 1/4] rev-parse: fix some options when executed from subpath of main tree
Date: Tue, 10 May 2016 03:49:28 -0400	[thread overview]
Message-ID: <CAPig+cSZ9PXr4Wogt2EJAJyapso8hZVucQ2yvJpCRK35a2j8jg@mail.gmail.com> (raw)
In-Reply-To: <20160506161312.Horde.7i8_sE5ISIqccneOIfinvCX@webmail.informatik.kit.edu>

On Fri, May 6, 2016 at 10:13 AM, SZEDER Gábor <szeder@ira.uka.de> wrote:
> Quoting Mike Rappazzo <rappazzo@gmail.com>:
>> I'll try to reword this to make it indicate that the value isn't
>> always incorrect.
>
> Not sure I understand your intention about rewording, in particular that
> "isn't always incorrect" part.  Just to make sure there is no
> misunderstanding let's have a look at the two broken cases:
>
>    $ git -C t/ rev-parse --git-common-dir
>    t/.git
>
> Obviously wrong.
> This is what you correctly described in the commit message as
> "incorrectly returns a path which starts 'sub/path/.git'.
>
>    $ git -C t/ rev-parse --git-path objects
>    .git/objects
>
> Wrong as well.  It would be correct if we were at the top of the working
> tree, but we are not.  It must be relative to the directory where '-C t/'
> brought us.
> Your description in the commit message implies that '--git-path <path>'
> is wrong in the same way as '--git-common-dir' is, i.e. in this case
> would also return the relative path starting with the subdirectory.
> That is apparently not the case.
>
> My point in the previous email was that both are wrong when executed in
> a subdir of the working tree, but they are wrong in different ways.  And
> they are always wrong when executed from a subdir of the working tree.

This explanation argues strongly in favor of placing each fix in a
separate patch[1] so that each commit message can be tailored to
precisely match the problem being fixed. Bundling the corresponding
tests with the fix would be a bonus; no need for a lead-in patch
introducing the tests en masse, and no need for test_expect_failure.

[1]: http://article.gmane.org/gmane.comp.version-control.git/293001/

  parent reply	other threads:[~2016-05-10  7:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-22 21:53 [PATCH v2 0/4] rev-parse: adjust results when they should be relative Michael Rappazzo
2016-04-22 21:53 ` [PATCH v2 1/4] rev-parse: fix some options when executed from subpath of main tree Michael Rappazzo
2016-04-29 14:21   ` SZEDER Gábor
     [not found]   ` <20160429135051.15492-1-szeder@ira.uka.de>
2016-05-06 13:02     ` Mike Rappazzo
2016-05-06 14:13       ` SZEDER Gábor
2016-05-06 17:08         ` Junio C Hamano
2016-05-10  7:49         ` Eric Sunshine [this message]
2016-04-22 21:53 ` [PATCH v2 2/4] t1500-rev-parse: add tests executed from sub path of the main worktree Michael Rappazzo
2016-04-29 14:22   ` SZEDER Gábor
2016-04-22 21:53 ` [PATCH v2 3/4] t2027-worktree-list: add and adjust tests related to git-rev-parse Michael Rappazzo
2016-04-29 14:22   ` SZEDER Gábor
2016-04-22 21:53 ` [PATCH v2 4/4] t1700-split-index: add test for rev-parse --shared-index-path Michael Rappazzo

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=CAPig+cSZ9PXr4Wogt2EJAJyapso8hZVucQ2yvJpCRK35a2j8jg@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --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.
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).