git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Philip Oakley <philipoakley@iee.org>
Cc: "Halde, Faiz" <fhalde@paypal.com>, git@vger.kernel.org
Subject: Re: Git issue
Date: Tue, 1 Nov 2016 17:03:10 -0400	[thread overview]
Message-ID: <20161101210310.sqrhvviry7iyyjrm@sigill.intra.peff.net> (raw)
In-Reply-To: <7CE3166CFD244DAABF554451E8B0800F@PhilipOakley>

On Tue, Nov 01, 2016 at 08:50:23PM -0000, Philip Oakley wrote:

> > From "git help update-index":
> > 
> >      --[no-]assume-unchanged
> >    When this flag is specified, the object names recorded for
> >    the paths are not updated. Instead, this option sets/unsets
> >    the "assume unchanged" bit for the paths. When the "assume
> >    unchanged" bit is on, the user promises not to change the
> >    file and allows Git to assume that the working tree file
> >    matches what is recorded in the index. If you want to change
> >    the working tree file, you need to unset the bit to tell Git.
> >    This is sometimes helpful when working with a big project on
> >    a filesystem that has very slow lstat(2) system call (e.g.
> >    cifs).
> > 
> >    Git will fail (gracefully) in case it needs to modify this
> >    file in the index e.g. when merging in a commit; thus, in
> >    case the assumed-untracked file is changed upstream, you will
> >    need to handle the situation manually.
> > 
> 
> The whole section (including the ones above this quote) are often confused
> between the promises of the user, and the alleged promises of Git. Even in
> the quote above the "Instead" probably shouldn't be there.

I think the "Instead" is "we are not doing the usual update-index thing
of reading the new data from disk; instead, we are _just_ setting the
bit". Perhaps that can be spelled out more clearly, but I think just
dropping "Instead" is a step backwards.

> Given the number of misrepresentations (on the web) of what the bit does,
> and the ongoing misunderstandings of users it does feel like the man page
> article could be refreshed to be more assertive about the users promise, and
> Git's cautions.

I dunno. I know this has long been a source of confusion, but I
specifically dug in the docs to see what we had, and I thought what I
quoted above was pretty clear. That has "only" been around for about 2
years, and is fighting against other mis-advice on the Internet, though.
So I'm not sure if it is badly worded, or if people simply do not see
it.

-Peff

  reply	other threads:[~2016-11-01 21:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-01 10:28 Git issue Halde, Faiz
2016-11-01 17:45 ` Jeff King
2016-11-01 18:11   ` Junio C Hamano
2016-11-07 22:34     ` Git issue - ignoring changes to tracked file with assume-unchanged Jakub Narębski
2016-11-01 20:50   ` Git issue Philip Oakley
2016-11-01 21:03     ` Jeff King [this message]
2016-11-01 21:23       ` Junio C Hamano
2016-11-04  4:52         ` Jacob Keller
2016-11-01 21:04     ` [PATCH] doc: update-index --assume-unchanged Philip Oakley

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=20161101210310.sqrhvviry7iyyjrm@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=fhalde@paypal.com \
    --cc=git@vger.kernel.org \
    --cc=philipoakley@iee.org \
    /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).