git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] doc: update-index --assume-unchanged

From
Philip Oakley <philipoakley@iee.org>
Date
Nov 1, 2016, 21:04 UTC
Message-ID
<20161101210448.4692-1-philipoakley@iee.org>
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
Previous: Jacob Keller
Message 9 of 9 in “Git issue”
  1. Halde, FaizNov 1, 2016
  2. Jeff KingNov 1, 2016
  3. Junio C HamanoNov 1, 2016
  4. Jakub NarębskiNov 7, 2016
  5. Philip OakleyNov 1, 2016
  6. Jeff KingNov 1, 2016
  7. Junio C HamanoNov 1, 2016
  8. Jacob KellerNov 4, 2016
  9. doc: update-index --assume-unchangedPhilip Oakley, Nov 1, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.