From: Philip Oakley <philipoakley@iee.org>
To: git@vger.kernel.org
Cc: philipoakley@iee.org, fhalde@paypal.com, peff@peff.net,
gitster@pobox.com
Subject: [PATCH] doc: update-index --assume-unchanged
Date: Tue, 1 Nov 2016 21:04:48 +0000 [thread overview]
Message-ID: <20161101210448.4692-1-philipoakley@iee.org> (raw)
In-Reply-To: <7CE3166CFD244DAABF554451E8B0800F@PhilipOakley>
Be more assertive about the User promise, and Git's defensiveness
of file changes.
Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
Here is a full patch for
https://public-inbox.org/git/7CE3166CFD244DAABF554451E8B0800F@PhilipOakley/
---
Documentation/git-update-index.txt | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index 7386c93..4ec1711 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -85,10 +85,10 @@ OPTIONS
--[no-]assume-unchanged::
When this flag is specified, the object names recorded
- for the paths are not updated. Instead, this option
+ for the paths are not updated. 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
+ *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
@@ -301,17 +301,23 @@ $ git ls-files -s
Using ``assume unchanged'' bit
------------------------------
-Many operations in Git depend on your filesystem to have an
+Many operations in Git depend on your filesystem having a fast and
efficient `lstat(2)` implementation, so that `st_mtime`
information for working tree files can be cheaply checked to see
if the file contents have changed from the version recorded in
the index file. Unfortunately, some filesystems have
inefficient `lstat(2)`. If your filesystem is one of them, you
-can set "assume unchanged" bit to paths you have not changed to
-cause Git not to do this check. Note that setting this bit on a
-path does not mean Git will check the contents of the file to
-see if it has changed -- it makes Git to omit any checking and
-assume it has *not* changed. When you make changes to working
+can set "assume unchanged" bit to *paths you have not changed* to
+cause Git not to do this check.
+
+Note that setting this bit on a
+path does not mean Git will never check the contents of the file to
+see if it has changed. Though normally it makes Git to omit any checking to
+assume it has not changed.
+Commands which may overwrite local changes (pull/merge etc) are
+likely to check if the contents have changed
+
+If you make desired changes to working
tree files, you have to explicitly tell Git about it by dropping
"assume unchanged" bit, either before or after you modify them.
--
2.9.0.windows.1.323.g0305acf
prev parent reply other threads:[~2016-11-01 21:04 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
2016-11-01 21:23 ` Junio C Hamano
2016-11-04 4:52 ` Jacob Keller
2016-11-01 21:04 ` Philip Oakley [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161101210448.4692-1-philipoakley@iee.org \
--to=philipoakley@iee.org \
--cc=fhalde@paypal.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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).