<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/read-cache.c, branch v2.8.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.8.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.8.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-02-10T22:20:06Z</updated>
<entry>
<title>Merge branch 'cc/untracked'</title>
<updated>2016-02-10T22:20:06Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-02-10T22:20:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0e35fcb412965f855e5ac6f469343e2f8e28d5ae'/>
<id>urn:sha1:0e35fcb412965f855e5ac6f469343e2f8e28d5ae</id>
<content type='text'>
Update the untracked cache subsystem and change its primary UI from
"git update-index" to "git config".

* cc/untracked:
  t7063: add tests for core.untrackedCache
  test-dump-untracked-cache: don't modify the untracked cache
  config: add core.untrackedCache
  dir: simplify untracked cache "ident" field
  dir: add remove_untracked_cache()
  dir: add {new,add}_untracked_cache()
  update-index: move 'uc' var declaration
  update-index: add untracked cache notifications
  update-index: add --test-untracked-cache
  update-index: use enum for untracked cache options
  dir: free untracked cache when removing it
</content>
</entry>
<entry>
<title>config: add core.untrackedCache</title>
<updated>2016-01-27T20:30:00Z</updated>
<author>
<name>Christian Couder</name>
<email>christian.couder@gmail.com</email>
</author>
<published>2016-01-27T06:58:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=435ec090ec6aed9c533e096b31947b3fa765548e'/>
<id>urn:sha1:435ec090ec6aed9c533e096b31947b3fa765548e</id>
<content type='text'>
When we know that mtime on directory as given by the environment
is usable for the purpose of untracked cache, we may want the
untracked cache to be always used without any mtime test or
kernel name check being performed.

Also when we know that mtime is not usable for the purpose of
untracked cache, for example because the repo is shared over a
network file system, we may want the untracked-cache to be
automatically removed from the index.

Allow the user to express such preference by setting the
'core.untrackedCache' configuration variable, which can take
'keep', 'false', or 'true' and default to 'keep'.

When read_index_from() is called, it now adds or removes the
untracked cache in the index to respect the value of this
variable. So it does nothing if the value is `keep` or if the
variable is unset; it adds the untracked cache if the value is
`true`; and it removes the cache if the value is `false`.

`git update-index --[no-|force-]untracked-cache` still adds the
untracked cache to, or removes it, from the index, but this
shows a warning if it goes against the value of
core.untrackedCache, because the next time the index is read
the untracked cache will be added or removed if the
configuration is set to do so.

Also `--untracked-cache` used to check that the underlying
operating system and file system change `st_mtime` field of a
directory if files are added or deleted in that directory. But
because those tests take a long time, `--untracked-cache` no
longer performs them. Instead, there is now
`--test-untracked-cache` to perform the tests. This change
makes `--untracked-cache` the same as `--force-untracked-cache`.

This last change is backward incompatible and should be
mentioned in the release notes.

Helped-by: Duy Nguyen &lt;pclouds@gmail.com&gt;
Helped-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
Helped-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;

read-cache: Duy'sfixup

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/ita-cleanup'</title>
<updated>2016-01-20T19:43:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-01-20T19:43:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cc14ea8cf4520a9607fba4b1fbacea7fa9723c73'/>
<id>urn:sha1:cc14ea8cf4520a9607fba4b1fbacea7fa9723c73</id>
<content type='text'>
Paths that have been told the index about with "add -N" are not
quite yet in the index, but a few commands behaved as if they
already are in a harmful way.

* nd/ita-cleanup:
  grep: make it clear i-t-a entries are ignored
  add and use a convenience macro ce_intent_to_add()
  blame: remove obsolete comment
</content>
</entry>
<entry>
<title>Merge branch 'dt/name-hash-dir-entry-fix'</title>
<updated>2015-10-29T20:59:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-10-29T20:59:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=69fe31887bf8be496bb0adb4db3150cec52e1a2c'/>
<id>urn:sha1:69fe31887bf8be496bb0adb4db3150cec52e1a2c</id>
<content type='text'>
The name-hash subsystem that is used to cope with case insensitive
filesystems keeps track of directories and their on-filesystem
cases for all the paths in the index by holding a pointer to a
randomly chosen cache entry that is inside the directory (for its
ce-&gt;ce_name component).  This pointer was not updated even when the
cache entry was removed from the index, leading to use after free.
This was fixed by recording the path for each directory instead of
borrowing cache entries and restructuring the API somewhat.

* dt/name-hash-dir-entry-fix:
  name-hash: don't reuse cache_entry in dir_entry
</content>
</entry>
<entry>
<title>Merge branch 'tk/sigchain-unnecessary-post-tempfile'</title>
<updated>2015-10-29T20:59:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-10-29T20:59:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=433cc7e3fb861d4530ca6c49b152e94219bddfda'/>
<id>urn:sha1:433cc7e3fb861d4530ca6c49b152e94219bddfda</id>
<content type='text'>
Remove no-longer used #include.

* tk/sigchain-unnecessary-post-tempfile:
  shallow: remove unused #include "sigchain.h"
  read-cache: remove unused #include "sigchain.h"
  diff: remove unused #include "sigchain.h"
  credential-cache--daemon: remove unused #include "sigchain.h"
</content>
</entry>
<entry>
<title>read-cache: remove unused #include "sigchain.h"</title>
<updated>2015-10-22T18:12:37Z</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2015-10-22T12:43:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a559263caead4cb8078b651f25f5b08a56cf406e'/>
<id>urn:sha1:a559263caead4cb8078b651f25f5b08a56cf406e</id>
<content type='text'>
After switching to use the tempfile module in commit f6ecc62d
(write_shared_index(): use tempfile module), no declarations from
sigchain.h are used in read-cache.c anymore. Thus, remove the #include.

Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>name-hash: don't reuse cache_entry in dir_entry</title>
<updated>2015-10-21T19:47:38Z</updated>
<author>
<name>David Turner</name>
<email>dturner@twopensource.com</email>
</author>
<published>2015-10-21T17:54:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=41284eb0f944fe2d73708bb4105a8e3ccd0297df'/>
<id>urn:sha1:41284eb0f944fe2d73708bb4105a8e3ccd0297df</id>
<content type='text'>
Stop reusing cache_entry in dir_entry; doing so causes a
use-after-free bug.

During merges, we free entries that we no longer need in the
destination index.  But those entries might have also been stored in
the dir_entry cache, and when a later call to add_to_index found them,
they would be used after being freed.

To prevent this, change dir_entry to store a copy of the name instead
of a pointer to a cache_entry.  This entails some refactoring of code
that expects the cache_entry.

Keith McGuigan &lt;kmcguigan@twitter.com&gt; diagnosed this bug and wrote
the initial patch, but this version does not use any of Keith's code.

Helped-by: Keith McGuigan &lt;kmcguigan@twitter.com&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: David Turner &lt;dturner@twopensource.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>add and use a convenience macro ce_intent_to_add()</title>
<updated>2015-09-07T03:01:13Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2015-08-22T01:08:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=895ff3b2c73c737b699a921fe71cea4dadefab7b'/>
<id>urn:sha1:895ff3b2c73c737b699a921fe71cea4dadefab7b</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>read-cache: fix indentation in read_index_from</title>
<updated>2015-08-31T19:31:00Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2015-08-31T18:43:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6bea53c130a8f519fd534edfcd8116d2963afce8'/>
<id>urn:sha1:6bea53c130a8f519fd534edfcd8116d2963afce8</id>
<content type='text'>
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mh/tempfile'</title>
<updated>2015-08-25T21:57:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-25T21:57:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=db86e61cbbc4c59a0886366bbf392498e64b53c8'/>
<id>urn:sha1:db86e61cbbc4c59a0886366bbf392498e64b53c8</id>
<content type='text'>
The "lockfile" API has been rebuilt on top of a new "tempfile" API.

* mh/tempfile:
  credential-cache--daemon: use tempfile module
  credential-cache--daemon: delete socket from main()
  gc: use tempfile module to handle gc.pid file
  lock_repo_for_gc(): compute the path to "gc.pid" only once
  diff: use tempfile module
  setup_temporary_shallow(): use tempfile module
  write_shared_index(): use tempfile module
  register_tempfile(): new function to handle an existing temporary file
  tempfile: add several functions for creating temporary files
  prepare_tempfile_object(): new function, extracted from create_tempfile()
  tempfile: a new module for handling temporary files
  commit_lock_file(): use get_locked_file_path()
  lockfile: add accessor get_lock_file_path()
  lockfile: add accessors get_lock_file_fd() and get_lock_file_fp()
  create_bundle(): duplicate file descriptor to avoid closing it twice
  lockfile: move documentation to lockfile.h and lockfile.c
</content>
</entry>
</feed>
