<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/entry.c, branch v2.30.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.30.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.30.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-08-18T20:26:10Z</updated>
<entry>
<title>checkout_entry(): remove unreachable error() call</title>
<updated>2020-08-18T20:26:10Z</updated>
<author>
<name>Matheus Tavares</name>
<email>matheus.bernardino@usp.br</email>
</author>
<published>2020-08-18T17:46:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=748f733d542c8cca1013c1b0901cd96977a7ea11'/>
<id>urn:sha1:748f733d542c8cca1013c1b0901cd96977a7ea11</id>
<content type='text'>
This if statement never evaluates to true since we already check
state-&gt;force a few lines above, and immediately return when it is
false.

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>Merge branch 'mt/entry-fstat-fallback-fix' into master</title>
<updated>2020-07-09T21:00:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-07-09T21:00:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d341042f718ad39eef06ea8715f926eb17181115'/>
<id>urn:sha1:d341042f718ad39eef06ea8715f926eb17181115</id>
<content type='text'>
"git checkout" failed to catch an error from fstat() after updating
a path in the working tree.

* mt/entry-fstat-fallback-fix:
  entry: check for fstat() errors after checkout
</content>
</entry>
<entry>
<title>entry: check for fstat() errors after checkout</title>
<updated>2020-07-09T16:45:06Z</updated>
<author>
<name>Matheus Tavares</name>
<email>matheus.bernardino@usp.br</email>
</author>
<published>2020-07-09T02:10:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=35e6e212fdea3a22abe0dc5867b974b30b787be0'/>
<id>urn:sha1:35e6e212fdea3a22abe0dc5867b974b30b787be0</id>
<content type='text'>
In 11179eb311 ("entry.c: check if file exists after checkout",
2017-10-05) we started checking the result of the lstat() call done
after writing a file, to avoid writing garbage to the corresponding
cache entry. However, the code skips calling lstat() if it's possible
to use fstat() when it still has the file descriptor open. And when
calling fstat() we don't do the same error checking. To fix that, let
the callers of fstat_output() know when fstat() fails. In this case,
write_entry() will try to use lstat() and properly report an error if
that fails as well.

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>convert: provide additional metadata to filters</title>
<updated>2020-03-16T18:37:02Z</updated>
<author>
<name>brian m. carlson</name>
<email>bk2204@github.com</email>
</author>
<published>2020-03-16T18:05:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c397aac02f9f97976f675115aa5df6ca01e26d59'/>
<id>urn:sha1:c397aac02f9f97976f675115aa5df6ca01e26d59</id>
<content type='text'>
Now that we have the codebase wired up to pass any additional metadata
to filters, let's collect the additional metadata that we'd like to
pass.

The two main places we pass this metadata are checkouts and archives.
In these two situations, reading HEAD isn't a valid option, since HEAD
isn't updated for checkouts until after the working tree is written and
archives can accept an arbitrary tree.  In other situations, HEAD will
usually reflect the refname of the branch in current use.

We pass a smaller amount of data in other cases, such as git cat-file,
where we can really only logically know about the blob.

This commit updates only the parts of the checkout code where we don't
use unpack_trees.  That function and callers of it will be handled in a
future commit.

In the archive code, we leak a small amount of memory, since nothing we
pass in the archiver argument structure is freed.

Signed-off-by: brian m. carlson &lt;bk2204@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>convert: permit passing additional metadata to filter processes</title>
<updated>2020-03-16T18:37:02Z</updated>
<author>
<name>brian m. carlson</name>
<email>bk2204@github.com</email>
</author>
<published>2020-03-16T18:05:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ab90ecae992e44e3e8303f143ad858608acabcf5'/>
<id>urn:sha1:ab90ecae992e44e3e8303f143ad858608acabcf5</id>
<content type='text'>
There are a variety of situations where a filter process can make use of
some additional metadata.  For example, some people find the ident
filter too limiting and would like to include the commit or the branch
in their smudged files.  This information isn't available during
checkout as HEAD hasn't been updated at that point, and it wouldn't be
available in archives either.

Let's add a way to pass this metadata down to the filter.  We pass the
blob we're operating on, the treeish (preferring the commit over the
tree if one exists), and the ref we're operating on.  Note that we won't
pass this information in all cases, such as when renormalizing or when
we're performing diffs, since it doesn't make sense in those cases.

The data we currently get from the filter process looks like the
following:

  command=smudge
  pathname=git.c
  0000

With this change, we'll get data more like this:

  command=smudge
  pathname=git.c
  refname=refs/tags/v2.25.1
  treeish=c522f061d551c9bb8684a7c3859b2ece4499b56b
  blob=7be7ad34bd053884ec48923706e70c81719a8660
  0000

There are a couple things to note about this approach.  For operations
like checkout, treeish will always be a commit, since we cannot check
out individual trees, but for other operations, like archive, we can end
up operating on only a particular tree, so we'll provide only a tree as
the treeish.  Similar comments apply for refname, since there are a
variety of cases in which we won't have a ref.

This commit wires up the code to print this information, but doesn't
pass any of it at this point.  In a future commit, we'll have various
code paths pass the actual useful data down.

Signed-off-by: brian m. carlson &lt;bk2204@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fill_stat_cache_info(): prepare for an fsmonitor fix</title>
<updated>2019-05-28T19:43:42Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2019-05-24T12:23:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d4c0a3ac78cf2fc16c144bf720d1451fcd1e267d'/>
<id>urn:sha1:d4c0a3ac78cf2fc16c144bf720d1451fcd1e267d</id>
<content type='text'>
We will need to pass down the `struct index_state` to
`mark_fsmonitor_valid()` for an upcoming bug fix, and this here function
calls that there function, so we need to extend the signature of
`fill_stat_cache_info()` first.

Signed-off-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 'tg/checkout-no-overlay'</title>
<updated>2019-03-07T00:59:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-03-07T00:59:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7d0c1f4556ad89b2f7eae97d31ea85c3bfdf7c87'/>
<id>urn:sha1:7d0c1f4556ad89b2f7eae97d31ea85c3bfdf7c87</id>
<content type='text'>
"git checkout --no-overlay" can be used to trigger a new mode of
checking out paths out of the tree-ish, that allows paths that
match the pathspec that are in the current index and working tree
and are not in the tree-ish.

* tg/checkout-no-overlay:
  revert "checkout: introduce checkout.overlayMode config"
  checkout: introduce checkout.overlayMode config
  checkout: introduce --{,no-}overlay option
  checkout: factor out mark_cache_entry_for_checkout function
  checkout: clarify comment
  read-cache: add invalidate parameter to remove_marked_cache_entries
  entry: support CE_WT_REMOVE flag in checkout_entry
  entry: factor out unlink_entry function
  move worktree tests to t24*
</content>
</entry>
<entry>
<title>Merge branch 'nd/checkout-noisy'</title>
<updated>2019-01-14T23:29:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-01-14T23:29:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4084df42c26bfd1ff192abf9807a648d89cc81ab'/>
<id>urn:sha1:4084df42c26bfd1ff192abf9807a648d89cc81ab</id>
<content type='text'>
"git checkout [&lt;tree-ish&gt;] path..." learned to report the number of
paths that have been checked out of the index or the tree-ish,
which gives it the same degree of noisy-ness as the case in which
the command checks out a branch.

* nd/checkout-noisy:
  t0027: squelch checkout path run outside test_expect_* block
  checkout: print something when checking out paths
</content>
</entry>
<entry>
<title>entry: support CE_WT_REMOVE flag in checkout_entry</title>
<updated>2019-01-02T23:28:05Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2018-12-20T13:48:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=536ec1839dbde8b9a6b38e6ccb5ab01b2b6311f9'/>
<id>urn:sha1:536ec1839dbde8b9a6b38e6ccb5ab01b2b6311f9</id>
<content type='text'>
'checkout_entry()' currently only supports creating new entries in the
working tree, but not deleting them.  Add the ability to remove
entries at the same time if the entry is marked with the CE_WT_REMOVE
flag.

Currently this doesn't have any effect, as the CE_WT_REMOVE flag is
only used in unpack-tree, however we will make use of this in a
subsequent step in the series.

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>entry: factor out unlink_entry function</title>
<updated>2019-01-02T23:28:05Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2018-12-20T13:48:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b702dd12d52816e192578c6206db5e6c332ba49b'/>
<id>urn:sha1:b702dd12d52816e192578c6206db5e6c332ba49b</id>
<content type='text'>
Factor out the 'unlink_entry()' function from unpack-trees.c to
entry.c.  It will be used in other places as well in subsequent
steps.

As it's no longer a static function, also move the documentation to
the header file to make it more discoverable.

Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
