git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, Paul Tan <pyokagan@gmail.com>
Subject: Re: [PATCH] pull: drop confusing prefix parameter of die_on_unclean_work_tree()
Date: Mon, 14 Mar 2016 10:11:13 -0700	[thread overview]
Message-ID: <xmqqbn6hassu.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <xmqqfuvtav5k.fsf@gitster.mtv.corp.google.com> (Junio C. Hamano's message of "Mon, 14 Mar 2016 09:20:23 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> For the purpose of letting "git pull --rebase" make sure that there
> is no difference between the index and the working tree, we'd want a
> tree-wide diff, so we do not want to limit the diff with pathspec.
> Not passing "prefix" to init_revisions() _is_ the right thing.

Oh, sorry, I think it is me who uses confusing phrasing, not your
reading skills.  What I meant by the above was:

 - We do want tree-wide diff.

 - We do not want to limit to a subtree.

 - Passing prefix to init_revisions() mean "if we have pathspec,
   they are relative to this prefix".

 - That may hint to the reader that the diff we are going to run may
   be limited to some subset to the tree, which is not what we are
   doing.

 - Hence, we should pass NULL to init_revisions() to make it
   explicit that we are not limiting.

 - And the part of your patch to pass NULL to init_revisions() is
   correct.

But the function itself should take prefix, even if it is not going
to use it to call init_revisions(), because it makes it possible to
do a better reporting later.

      reply	other threads:[~2016-03-14 17:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10 13:24 [PATCH] pull: drop confusing prefix parameter of die_on_unclean_work_tree() Johannes Schindelin
2016-03-10 17:54 ` Junio C Hamano
2016-03-10 18:09   ` Junio C Hamano
2016-03-14 13:42     ` Johannes Schindelin
2016-03-14 16:20       ` Junio C Hamano
2016-03-14 17:11         ` Junio C Hamano [this message]

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=xmqqbn6hassu.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=pyokagan@gmail.com \
    /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).