<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/read-cache.c, branch v2.10.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.10.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.10.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-09-29T23:49:47Z</updated>
<entry>
<title>Merge branch 'tg/add-chmod+x-fix' into maint</title>
<updated>2016-09-29T23:49:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-09-29T23:49:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=36f64036f647912c8037e625e9fe3cee6713b105'/>
<id>urn:sha1:36f64036f647912c8037e625e9fe3cee6713b105</id>
<content type='text'>
"git add --chmod=+x &lt;pathspec&gt;" added recently only toggled the
executable bit for paths that are either new or modified. This has
been corrected to flip the executable bit for all paths that match
the given pathspec.

* tg/add-chmod+x-fix:
  t3700-add: do not check working tree file mode without POSIXPERM
  t3700-add: create subdirectory gently
  add: modify already added files when --chmod is given
  read-cache: introduce chmod_index_entry
  update-index: add test for chmod flags
</content>
</entry>
<entry>
<title>add: modify already added files when --chmod is given</title>
<updated>2016-09-15T19:13:54Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2016-09-14T21:07:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=610d55af0f082f6b866dc858e144c03d8ed4424c'/>
<id>urn:sha1:610d55af0f082f6b866dc858e144c03d8ed4424c</id>
<content type='text'>
When the chmod option was added to git add, it was hooked up to the diff
machinery, meaning that it only works when the version in the index
differs from the version on disk.

As the option was supposed to mirror the chmod option in update-index,
which always changes the mode in the index, regardless of the status of
the file, make sure the option behaves the same way in git add.

Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>read-cache: introduce chmod_index_entry</title>
<updated>2016-09-15T19:13:54Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2016-09-14T21:07:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d9d7096662122f6b82ad6e4c08397b75906da78d'/>
<id>urn:sha1:d9d7096662122f6b82ad6e4c08397b75906da78d</id>
<content type='text'>
As there are chmod options for both add and update-index, introduce a
new chmod_index_entry function to do the work.  Use it in update-index,
while it will be used in add in the next patch.

Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/renormalize-merge-kill-safer-crlf' into maint</title>
<updated>2016-09-09T04:35:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-09-09T04:35:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7f5885ad2abfbf9b760e2f32f70537d1c380734d'/>
<id>urn:sha1:7f5885ad2abfbf9b760e2f32f70537d1c380734d</id>
<content type='text'>
"git merge" with renormalization did not work well with
merge-recursive, due to "safer crlf" conversion kicking in when it
shouldn't.

* jc/renormalize-merge-kill-safer-crlf:
  merge: avoid "safer crlf" during recording of merge results
  convert: unify the "auto" handling of CRLF
</content>
</entry>
<entry>
<title>merge: avoid "safer crlf" during recording of merge results</title>
<updated>2016-07-12T20:06:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-07-08T17:59:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1335d76e4569fa84e52dc24c88c04daeae6e160e'/>
<id>urn:sha1:1335d76e4569fa84e52dc24c88c04daeae6e160e</id>
<content type='text'>
When merge_recursive() decides what the correct blob object merge
result for a path should be, it uses update_file_flags() helper
function to write it out to a working tree file and then calls
add_cacheinfo().  The add_cacheinfo() function in turn calls
make_cache_entry() to create a new cache entry to replace the
higher-stage entries for the path that represents the conflict.

The make_cache_entry() function calls refresh_cache_entry() to fill
in the cached stat information.  To mark a cache entry as
up-to-date, the data is re-read from the file in the working tree,
and goes through convert_to_git() conversion to be compared with the
blob object name the new cache entry records.

It is important to note that this happens while the higher-stage
entries, which are going to be replaced with the new entry, are
still in the index.  Unfortunately, the convert_to_git() conversion
has a misguided "safer crlf" mechanism baked in, and looks at the
existing cache entry for the path to decide how to convert the
contents in the working tree file.  If our side (i.e. stage#2)
records a text blob with CRLF in it, even when the system is
configured to record LF in blobs and convert them to CRLF upon
checkout (and back to LF upon checkin), the "safer crlf" mechanism
stops us doing so.

This especially poses a problem during a renormalizing merge, where
the merge result for the path is computed by first "normalizing" the
blobs involved in the merge by using convert_to_working_tree()
followed by convert_to_git() with "safer crlf" disabled.  The merge
result that is computed correctly and fed to add_cacheinfo() via
update_file_flags() does _not_ match what refresh_cache_entry() sees
by converting the working tree file via convert_to_git().

We can work this around by not refreshing the new cache entry in
make_cache_entry() called by add_cacheinfo().  After add_cacheinfo()
adds the new entry, we can call refresh_cache_entry() on that,
knowing that addition of this new cache entry would have removed the
stale cache entries that had CRLF in stage #2 that were carried over
before the renormalizing merge started and will not interfere with
the correct recording of the result.

The test update was taken from a series by Torsten Bögershausen
that attempted to fix this with a different approach.

Signed-off-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Reviewed-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
</content>
</entry>
<entry>
<title>add: add --chmod=+x / --chmod=-x options</title>
<updated>2016-06-08T00:43:39Z</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2016-05-31T22:08:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4e55ed32db81d06a4f618e2cc0f9da0e223ae304'/>
<id>urn:sha1:4e55ed32db81d06a4f618e2cc0f9da0e223ae304</id>
<content type='text'>
The executable bit will not be detected (and therefore will not be
set) for paths in a repository with `core.filemode` set to false,
though the users may still wish to add files as executable for
compatibility with other users who _do_ have `core.filemode`
functionality.  For example, Windows users adding shell scripts may
wish to add them as executable for compatibility with users on
non-Windows.

Although this can be done with a plumbing command
(`git update-index --add --chmod=+x foo`), teaching the `git-add`
command allows users to set a file executable with a command that
they're already familiar with.

Signed-off-by: Edward Thomson &lt;ethomson@edwardthomson.com&gt;
Helped-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>
</feed>
