Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

Re: [Q] assume unchanged?

From: Andreas Ericsson <hidden>
Date: 2016-06-15 22:44:22

しらいしななこ wrote:
I was looking at the documentation of git-update-index because I
thought git-add is the preferred way to do what the command was used
for in the old versions of git, and wanted to see if the old command
has more features that are missing from git-add.

I noticed that there is --assume-unchanged option, and I read its
description three times, but I do not understand it.  What is it good
for?  Version control systems are used in order to keep track
changes, and if using that option makes my changes ignored, how can
it be a good thing?

The manual says "This is sometimes helpful when working with a big
project on a filesystem that has very slow lstat(2) system call", but
unfortunately it does not answer my question.

Could somebody explain, please?
If you're hacking on, oh, let's say the openoffice repo (or something
similarly huge), and the files you're actually testing are located on
an NFS-mounted network disk, you can use "--assume-unchanged java
--assume-unchanged writer" to make git not walk through those directories
and lstat(2) everything in it to see if there are changes. For huge
projects, doing the lstat() walk can take a couple of seconds on a quick
filesystem sitting on a local disk, and several minutes on a really slow
network disk.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help