<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/entry.c, branch v2.32.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.32.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.32.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-05-19T23:54:59Z</updated>
<entry>
<title>Merge branch 'en/dir-traversal'</title>
<updated>2021-05-19T23:54:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-05-19T23:54:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=33be431c0c7284c1adf0fe49f7838dbc8aee6ea9'/>
<id>urn:sha1:33be431c0c7284c1adf0fe49f7838dbc8aee6ea9</id>
<content type='text'>
"git clean" and "git ls-files -i" had confusion around working on
or showing ignored paths inside an ignored directory, which has
been corrected.

* en/dir-traversal:
  dir: introduce readdir_skip_dot_and_dotdot() helper
  dir: update stale description of treat_directory()
  dir: traverse into untracked directories if they may have ignored subfiles
  dir: avoid unnecessary traversal into ignored directory
  t3001, t7300: add testcase showcasing missed directory traversal
  t7300: add testcase showing unnecessary traversal into ignored directory
  ls-files: error out on -i unless -o or -c are specified
  dir: report number of visited directories and paths with trace2
  dir: convert trace calls to trace2 equivalents
</content>
</entry>
<entry>
<title>dir: introduce readdir_skip_dot_and_dotdot() helper</title>
<updated>2021-05-12T23:45:03Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2021-05-12T17:28:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b548f0f1568f6b01e55ca69c24d3cb19489f92aa'/>
<id>urn:sha1:b548f0f1568f6b01e55ca69c24d3cb19489f92aa</id>
<content type='text'>
Many places in the code were doing
    while ((d = readdir(dir)) != NULL) {
        if (is_dot_or_dotdot(d-&gt;d_name))
            continue;
        ...process d...
    }
Introduce a readdir_skip_dot_and_dotdot() helper to make that a one-liner:
    while ((d = readdir_skip_dot_and_dotdot(dir)) != NULL) {
        ...process d...
    }

This helper particularly simplifies checks for empty directories.

Also use this helper in read_cached_dir() so that our statistics are
consistent across platforms.  (In other words, read_cached_dir() should
have been using is_dot_or_dotdot() and skipping such entries, but did
not and left it to treat_path() to detect and mark such entries as
path_none.)

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mt/parallel-checkout-part-2'</title>
<updated>2021-04-30T04:50:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-04-30T04:50:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a1cac26cc60f611b2f94badfc9c8522a65e79dc1'/>
<id>urn:sha1:a1cac26cc60f611b2f94badfc9c8522a65e79dc1</id>
<content type='text'>
The checkout machinery has been taught to perform the actual
write-out of the files in parallel when able.

* mt/parallel-checkout-part-2:
  parallel-checkout: add design documentation
  parallel-checkout: support progress displaying
  parallel-checkout: add configuration options
  parallel-checkout: make it truly parallel
  unpack-trees: add basic support for parallel checkout
</content>
</entry>
<entry>
<title>Merge branch 'ds/sparse-index-protections'</title>
<updated>2021-04-30T04:50:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-04-30T04:50:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8e97852919fa422bc5fe57bc7e71826cf2b5224d'/>
<id>urn:sha1:8e97852919fa422bc5fe57bc7e71826cf2b5224d</id>
<content type='text'>
Builds on top of the sparse-index infrastructure to mark operations
that are not ready to mark with the sparse index, causing them to
fall back on fully-populated index that they always have worked with.

* ds/sparse-index-protections: (47 commits)
  name-hash: use expand_to_path()
  sparse-index: expand_to_path()
  name-hash: don't add directories to name_hash
  revision: ensure full index
  resolve-undo: ensure full index
  read-cache: ensure full index
  pathspec: ensure full index
  merge-recursive: ensure full index
  entry: ensure full index
  dir: ensure full index
  update-index: ensure full index
  stash: ensure full index
  rm: ensure full index
  merge-index: ensure full index
  ls-files: ensure full index
  grep: ensure full index
  fsck: ensure full index
  difftool: ensure full index
  commit: ensure full index
  checkout: ensure full index
  ...
</content>
</entry>
<entry>
<title>unpack-trees: add basic support for parallel checkout</title>
<updated>2021-04-19T18:57:05Z</updated>
<author>
<name>Matheus Tavares</name>
<email>matheus.bernardino@usp.br</email>
</author>
<published>2021-04-19T00:14:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=04155bdad818381681d44448bb7dc3a850117ffb'/>
<id>urn:sha1:04155bdad818381681d44448bb7dc3a850117ffb</id>
<content type='text'>
This new interface allows us to enqueue some of the entries being
checked out to later uncompress them, apply in-process filters, and
write out the files in parallel. For now, the parallel checkout
machinery is enabled by default and there is no user configuration, but
run_parallel_checkout() just writes the queued entries in sequence
(without spawning additional workers). The next patch will actually
implement the parallelism and, later, we will make it configurable.

Note that, to avoid potential data races, not all entries are eligible
for parallel checkout. Also, paths that collide on disk (e.g.
case-sensitive paths in case-insensitive file systems), are detected by
the parallel checkout code and skipped, so that they can be safely
sequentially handled later. The collision detection works like the
following:

- If the collision was at basename (e.g. 'a/b' and 'a/B'), the framework
  detects it by looking for EEXIST and EISDIR errors after an
  open(O_CREAT | O_EXCL) failure.

- If the collision was at dirname (e.g. 'a/b' and 'A'), it is detected
  at the has_dirs_only_path() check, which is done for the leading path
  of each item in the parallel checkout queue.

Both verifications rely on the fact that, before enqueueing an entry for
parallel checkout, checkout_entry() makes sure that there is no file at
the entry's path and that its leading components are all real
directories. So, any later change in these conditions indicates that
there was a collision (either between two parallel-eligible entries or
between an eligible and an ineligible one).

After all parallel-eligible entries have been processed, the collided
(and thus, skipped) entries are sequentially fed to checkout_entry()
again. This is similar to the way the current code deals with
collisions, overwriting the previously checked out entries with the
subsequent ones. The only difference is that, since we no longer create
the files in the same order that they appear on index, we are not able
to determine which of the colliding entries will survive on disk (for
the classic code, it is always the last entry).

Co-authored-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Co-authored-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Signed-off-by: Matheus Tavares &lt;matheus.bernardino@usp.br&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>entry: ensure full index</title>
<updated>2021-04-14T20:47:35Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2021-04-01T01:49:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3450a304aaa20707a696176441a8bbfe6d5431a3'/>
<id>urn:sha1:3450a304aaa20707a696176441a8bbfe6d5431a3</id>
<content type='text'>
Before iterating over all cache entries, ensure that a sparse index is
expanded to a full index to avoid unexpected behavior.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Reviewed-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mt/parallel-checkout-part-1'</title>
<updated>2021-04-02T21:43:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-04-02T21:43:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c47679d0405f134703fcae0f8f0b7ef82ecf96d5'/>
<id>urn:sha1:c47679d0405f134703fcae0f8f0b7ef82ecf96d5</id>
<content type='text'>
Preparatory API changes for parallel checkout.

* mt/parallel-checkout-part-1:
  entry: add checkout_entry_ca() taking preloaded conv_attrs
  entry: move conv_attrs lookup up to checkout_entry()
  entry: extract update_ce_after_write() from write_entry()
  entry: make fstat_output() and read_blob_entry() public
  entry: extract a header file for entry.c functions
  convert: add classification for conv_attrs struct
  convert: add get_stream_filter_ca() variant
  convert: add [async_]convert_to_working_tree_ca() variants
  convert: make convert_attrs() and convert structs public
</content>
</entry>
<entry>
<title>Merge branch 'mt/checkout-remove-nofollow'</title>
<updated>2021-03-30T21:35:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-03-30T21:35:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9210c68d2af84d869f1635efe9a2092578653297'/>
<id>urn:sha1:9210c68d2af84d869f1635efe9a2092578653297</id>
<content type='text'>
When "git checkout" removes a path that does not exist in the
commit it is checking out, it wasn't careful enough not to follow
symbolic links, which has been corrected.

* mt/checkout-remove-nofollow:
  checkout: don't follow symlinks when removing entries
  symlinks: update comment on threaded_check_leading_path()
</content>
</entry>
<entry>
<title>entry: add checkout_entry_ca() taking preloaded conv_attrs</title>
<updated>2021-03-23T17:34:05Z</updated>
<author>
<name>Matheus Tavares</name>
<email>matheus.bernardino@usp.br</email>
</author>
<published>2021-03-23T14:19:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ae22751f9b4bbbebcd0366a48a118b5a575af72d'/>
<id>urn:sha1:ae22751f9b4bbbebcd0366a48a118b5a575af72d</id>
<content type='text'>
The parallel checkout machinery will call checkout_entry() for entries
that could not be written in parallel due to path collisions. At this
point, we will already be holding the conversion attributes for each
entry, and it would be wasteful to let checkout_entry() load these
again. Instead, let's add the checkout_entry_ca() variant, which
optionally takes a preloaded conv_attrs struct.

Signed-off-by: Matheus Tavares &lt;matheus.bernardino@usp.br&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>entry: move conv_attrs lookup up to checkout_entry()</title>
<updated>2021-03-23T17:34:05Z</updated>
<author>
<name>Matheus Tavares</name>
<email>matheus.bernardino@usp.br</email>
</author>
<published>2021-03-23T14:19:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=30419e7e1d53232bb83dcace200d1295b326b22b'/>
<id>urn:sha1:30419e7e1d53232bb83dcace200d1295b326b22b</id>
<content type='text'>
In a following patch, checkout_entry() will use conv_attrs to decide
whether an entry should be enqueued for parallel checkout or not. But
the attributes lookup only happens lower in this call stack. To avoid
the unnecessary work of loading the attributes twice, let's move it up
to checkout_entry(), and pass the loaded struct down to write_entry().

Signed-off-by: Matheus Tavares &lt;matheus.bernardino@usp.br&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
