public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: kelson@shysecurity•com
Cc: Git Mailing List <git@vger•kernel.org>,
	Philip Oakley <philipoakley@iee•org>,
	Duy Nguyen <pclouds@gmail•com>,
	Jonathan Nieder <jrnieder@gmail•com>
Subject: Re: [PATCH 1/2] support for --no-relative and diff.relative
Date: Wed, 07 Jan 2015 12:26:41 -0800	[thread overview]
Message-ID: <xmqqy4peibge.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <54AD7F1A.3060500@shysecurity.com> (kelson@shysecurity.com's message of "Wed, 07 Jan 2015 13:46:50 -0500")

kelson@shysecurity•com writes:

>>> Content-Type: text/plain; charset=utf-8; format=flowed
>>Please.  No format=flawed.  Really.
> I'll figure out the line-wrapping.
>
>> Also this step is not about --no-relative and diff.relative but is
>> only about --no-relative option.
> Should I submit as two independent patches then? I took the approach
> of splitting them out into 1/2 vs 2/2 to distinguish, but it sounds
> like that isn't optimal.

They are indeed better to be 1/2 and 2/2; they do not have to share
the same subject, though.  1/2 now adds only --no-relative and makes
sure an earlier --relative is cancelled without even knowing that
diff.relative might appear in the future (well, you may know that,
but the system with only 1/2 applied without 2/2 would work perfectly
fine).  2/2 adds diff.relative and makes sure --no-relative cancels
its effect as well.

> On review, this may be a bad approach though. Non-locality makes it
> harder to follow/understand and introduces a subtle bug.
> current:  "git-diff --relative=path --no-relative --relative" ==
> "git-diff --relative=path"
> expected: "git-diff --relative=path --no-relative --relative" ==
> "git-diff --relative"

Exactly.

  reply	other threads:[~2015-01-07 20:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-11  7:28 [PATCH] added git-config support for diff.relative setting Kelson
2014-12-11 13:37 ` Duy Nguyen
2014-12-11 21:41   ` Kelson
2014-12-12 23:25 ` [PATCH v2] " Kelson
2014-12-21 20:23   ` [PATCH v3 1/2] " kelson
2014-12-30 17:56     ` kelson
2014-12-30 18:16       ` Junio C Hamano
2014-12-30 19:32       ` [PATCH 1/2] support for --no-relative and diff.relative kelson
2015-01-06 16:19         ` kelson
2015-01-07 18:09           ` Junio C Hamano
2015-01-07 18:46             ` kelson
2015-01-07 20:26               ` Junio C Hamano [this message]
2015-01-07 19:02             ` 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=xmqqy4peibge.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=jrnieder@gmail$(echo .)com \
    --cc=kelson@shysecurity$(echo .)com \
    --cc=pclouds@gmail$(echo .)com \
    --cc=philipoakley@iee$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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