git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 4/6] checkout-index: handle "--no-index" option
Date: Sun, 31 Jan 2016 22:22:07 -0500	[thread overview]
Message-ID: <20160201032207.GB12217@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqr3gxw4j1.fsf@gitster.mtv.corp.google.com>

On Sun, Jan 31, 2016 at 06:25:22PM -0800, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > I also reformatted the comment that violated our style
> > guidelines, but I am not sure if it is all that helpful. It
> > seems we also cancel "--index" with "--temp" or
> > "--stage=all", but I do not know why. I left the content
> > as-is, but if somebody knows enough to elaborate, it might
> > be worth doing.
> 
> Isn't the --index about updating the cached stat information, to
> allow us to then say "the working tree file hasn't been modified
> since we wrote it out"?  After writing a file out to somewhere that
> is not its natural location (i.e. using prefix, stage or temp would
> all write the contents of F to somewhere that is not F), the next
> "diff-files" would not compare the index entry with the contents
> held in that relocated location, but with its natural location.

Yeah, that makes sense to me. I should have said "...but I do not know
why, and I did not really look into it" in my original.

That probably makes it OK to silently ignore (as opposed to complaining
that "--prefix" is used with "--index"). It is not so much "these
options are incompatible" as the fact that there is no entry to update
in the case of a prefix or tempfile. So "--index" is still in effect, it
just has no work to do. :)

-Peff

  reply	other threads:[~2016-02-01  3:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-31 11:22 [PATCH 0/6] post-strbuf_getline cleanups Jeff King
2016-01-31 11:25 ` [PATCH 1/6] give "nbuf" strbuf a more meaningful name Jeff King
2016-01-31 11:54   ` Johannes Schindelin
2016-01-31 11:59     ` Jeff King
2016-01-31 12:01       ` Johannes Schindelin
2016-01-31 11:25 ` [PATCH 2/6] checkout-index: simplify "-z" option parsing Jeff King
2016-01-31 11:26 ` [PATCH 3/6] checkout-index: handle "--no-prefix" option Jeff King
2016-01-31 11:29 ` [PATCH 4/6] checkout-index: handle "--no-index" option Jeff King
2016-02-01  2:25   ` Junio C Hamano
2016-02-01  3:22     ` Jeff King [this message]
2016-01-31 11:30 ` [PATCH 5/6] checkout-index: disallow "--no-stage" option Jeff King
2016-02-01  2:18   ` Junio C Hamano
2016-02-01  3:18     ` Jeff King
2016-01-31 11:35 ` [PATCH 6/6] apply, ls-files: simplify "-z" parsing Jeff King
2016-01-31 11:59   ` Johannes Schindelin
2016-02-01 21:47   ` Junio C Hamano
2016-02-01 22:52     ` Junio C Hamano
2016-02-02  5:29       ` Jeff King
2016-02-01  2:14 ` [PATCH 0/6] post-strbuf_getline cleanups 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=20160201032207.GB12217@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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 NNTP newsgroup(s).