<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/read-cache.c, branch v2.11.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.11.4</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.11.4'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2017-01-19T20:17:57Z</updated>
<entry>
<title>cache.h: document remove_index_entry_at</title>
<updated>2017-01-19T20:17:57Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2017-01-19T03:18:52Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=3bd72adff1f4435898508f5c74227aaa2561c182'/>
<id>urn:sha1:3bd72adff1f4435898508f5c74227aaa2561c182</id>
<content type='text'>
Do this by moving the existing documentation from
read-cache.c to cache.h.

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>read-cache: make sure file handles are not inherited by child processes</title>
<updated>2016-10-25T18:10:18Z</updated>
<author>
<name>Lars Schneider</name>
<email>larsxschneider@gmail.com</email>
</author>
<published>2016-10-24T18:03:00Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a0a6cb96625cebe8590841c469bfbb461a132ae3'/>
<id>urn:sha1:a0a6cb96625cebe8590841c469bfbb461a132ae3</id>
<content type='text'>
This fixes "convert: add filter.&lt;driver&gt;.process option" (edcc8581) on
Windows.

Consider the case of a file that requires filtering and is present in
branch A but not in branch B. If A is the current HEAD and we checkout B
then the following happens:

1. ce_compare_data() opens the file
2.   index_fd() detects that the file requires to run a clean filter and
     calls index_stream_convert_blob()
4.     index_stream_convert_blob() calls convert_to_git_filter_fd()
5.       convert_to_git_filter_fd() calls apply_filter() which creates a
         new long running filter process (in case it is the first file
         of this kind to be filtered)
6.       The new filter process inherits all file handles. This is the
         default on Linux/OSX and is explicitly defined in the
         `CreateProcessW` call in `mingw.c` on Windows.
7. ce_compare_data() closes the file
8. Git unlinks the file as it is not present in B

The unlink operation does not work on Windows because the filter process
has still an open handle to the file. On Linux/OSX the unlink operation
succeeds but the file descriptors still leak into the child process.

Fix this problem by opening files in read-cache with the O_CLOEXEC flag
to ensure that the file descriptor does not remain open in a newly
spawned process similar to 05d1ed6148 ("mingw: ensure temporary file
handles are not inherited by child processes", 2016-08-22).

Signed-off-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tg/add-chmod+x-fix'</title>
<updated>2016-09-26T23:09:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-09-26T23:09:20Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=ebc63580a1287325eef85e96c436de494406fd0a'/>
<id>urn:sha1:ebc63580a1287325eef85e96c436de494406fd0a</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://www.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://www.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>cache: convert struct cache_entry to use struct object_id</title>
<updated>2016-09-07T19:59:42Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2016-09-05T20:07:52Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=99d1a9861ae88595e7386c453b6b38573a8a570c'/>
<id>urn:sha1:99d1a9861ae88595e7386c453b6b38573a8a570c</id>
<content type='text'>
Convert struct cache_entry to use struct object_id by applying the
following semantic patch and the object_id transforms from contrib, plus
the actual change to the struct:

@@
struct cache_entry E1;
@@
- E1.sha1
+ E1.oid.hash

@@
struct cache_entry *E1;
@@
- E1-&gt;sha1
+ E1-&gt;oid.hash

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/renormalize-merge-kill-safer-crlf'</title>
<updated>2016-07-25T21:13:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-07-25T21:13:38Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=21bed620cd2d4fc4fb3d42447136c9f899ede5bb'/>
<id>urn:sha1:21bed620cd2d4fc4fb3d42447136c9f899ede5bb</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://www.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://www.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://www.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>
</feed>
