<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/worktree.c, branch v2.37.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.37.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.37.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-06-02T21:31:16Z</updated>
<entry>
<title>run-command API: rename "env_array" to "env"</title>
<updated>2022-06-02T21:31:16Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-06-02T09:09:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=29fda24dd11e90583f3ea9ff2f90ee9acacd7792'/>
<id>urn:sha1:29fda24dd11e90583f3ea9ff2f90ee9acacd7792</id>
<content type='text'>
Start following-up on the rename mentioned in c7c4bdeccf3 (run-command
API: remove "env" member, always use "env_array", 2021-11-25) of
"env_array" to "env".

The "env_array" name was picked in 19a583dc39e (run-command: add
env_array, an optional argv_array for env, 2014-10-19) because "env"
was taken. Let's not forever keep the oddity of "*_array" for this
"struct strvec", but not for its "args" sibling.

This commit is almost entirely made with a coccinelle rule[1]. The
only manual change here is in run-command.h to rename the struct
member itself and to change "env_array" to "env" in the
CHILD_PROCESS_INIT initializer.

The rest of this is all a result of applying [1]:

 * make contrib/coccinelle/run_command.cocci.patch
 * patch -p1 &lt;contrib/coccinelle/run_command.cocci.patch
 * git add -u

1. cat contrib/coccinelle/run_command.pending.cocci
   @@
   struct child_process E;
   @@
   - E.env_array
   + E.env

   @@
   struct child_process *E;
   @@
   - E-&gt;env_array
   + E-&gt;env

I've avoided changing any comments and derived variable names here,
that will all be done in the next commit.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pw/worktree-list-with-z'</title>
<updated>2022-04-04T17:56:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-04-04T17:56:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7c6d8ee8fa3be77d4bf4d38f59e866a0af1931f8'/>
<id>urn:sha1:7c6d8ee8fa3be77d4bf4d38f59e866a0af1931f8</id>
<content type='text'>
"git worktree list --porcelain" did not c-quote pathnames and lock
reasons with unsafe bytes correctly, which is worked around by
introducing NUL terminated output format with "-z".

* pw/worktree-list-with-z:
  worktree: add -z option for list subcommand
</content>
</entry>
<entry>
<title>Merge branch 'dp/worktree-repair-in-usage'</title>
<updated>2022-04-04T17:56:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-04-04T17:56:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8e6e14fceab69c9aec939e67107cdbf539725815'/>
<id>urn:sha1:8e6e14fceab69c9aec939e67107cdbf539725815</id>
<content type='text'>
Usage string fix.

* dp/worktree-repair-in-usage:
  worktree: include repair cmd in usage
</content>
</entry>
<entry>
<title>worktree: add -z option for list subcommand</title>
<updated>2022-03-31T20:28:55Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2022-03-31T16:21:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d97eb302ea848ff6f8f9af50a176734930964b9a'/>
<id>urn:sha1:d97eb302ea848ff6f8f9af50a176734930964b9a</id>
<content type='text'>
Add a -z option to be used in conjunction with --porcelain that gives
NUL-terminated output. As 'worktree list --porcelain' does not quote
worktree paths this enables it to handle worktree paths that contain
newlines.

Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>worktree: include repair cmd in usage</title>
<updated>2022-03-29T19:02:21Z</updated>
<author>
<name>Des Preston</name>
<email>despreston@gmail.com</email>
</author>
<published>2022-03-28T20:47:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2e2c0be51ed33598a03db51952993514708240d4'/>
<id>urn:sha1:2e2c0be51ed33598a03db51952993514708240d4</id>
<content type='text'>
The worktree repair command was not added to the usage menu for the
worktree command. This commit adds the usage of 'worktree repair'
according to the existing docs.

Signed-off-by: Des Preston &lt;despreston@gmail.com&gt;
Acked-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ds/worktree-docs'</title>
<updated>2022-03-07T05:25:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-03-07T05:25:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=aae90a156de9d84cfe5e2052678d22c18ff285b2'/>
<id>urn:sha1:aae90a156de9d84cfe5e2052678d22c18ff285b2</id>
<content type='text'>
Tighten the language around "working tree" and "worktree" in the
docs.

* ds/worktree-docs:
  worktree: use 'worktree' over 'working tree'
  worktree: use 'worktree' over 'working tree'
  worktree: use 'worktree' over 'working tree'
  worktree: use 'worktree' over 'working tree'
  worktree: use 'worktree' over 'working tree'
  worktree: use 'worktree' over 'working tree'
  worktree: use 'worktree' over 'working tree'
  worktree: extract checkout_worktree()
  worktree: extract copy_sparse_checkout()
  worktree: extract copy_filtered_worktree_config()
  worktree: combine two translatable messages
</content>
</entry>
<entry>
<title>Merge branch 'ds/sparse-checkout-requires-per-worktree-config'</title>
<updated>2022-02-25T23:47:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-02-25T23:47:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6249ce2d1b9b60e7aa630d370e68c87ef6331629'/>
<id>urn:sha1:6249ce2d1b9b60e7aa630d370e68c87ef6331629</id>
<content type='text'>
"git sparse-checkout" wants to work with per-worktree configuration,
but did not work well in a worktree attached to a bare repository.

* ds/sparse-checkout-requires-per-worktree-config:
  config: make git_configset_get_string_tmp() private
  worktree: copy sparse-checkout patterns and config on add
  sparse-checkout: set worktree-config correctly
  config: add repo_config_set_worktree_gently()
  worktree: create init_worktree_config()
  Documentation: add extensions.worktreeConfig details
</content>
</entry>
<entry>
<title>worktree: extract checkout_worktree()</title>
<updated>2022-02-23T20:24:41Z</updated>
<author>
<name>Derrick Stolee</name>
<email>derrickstolee@github.com</email>
</author>
<published>2022-02-23T14:29:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=23f832e29ec20ddbded431fdf55f49dc0f54e794'/>
<id>urn:sha1:23f832e29ec20ddbded431fdf55f49dc0f54e794</id>
<content type='text'>
The ability to add the --no-checkout flag to 'git worktree' was added in
ef2a0ac9a0 (worktree: add: introduce --checkout option, 2016-03-29).
Recently, we noticed that add_worktree() is rather complicated, so
extract the logic for this checkout process to simplify the method.

Signed-off-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>worktree: extract copy_sparse_checkout()</title>
<updated>2022-02-23T20:24:41Z</updated>
<author>
<name>Derrick Stolee</name>
<email>derrickstolee@github.com</email>
</author>
<published>2022-02-23T14:29:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ace5ac533a198e9bb7f634dafa8e7b10a42919c4'/>
<id>urn:sha1:ace5ac533a198e9bb7f634dafa8e7b10a42919c4</id>
<content type='text'>
This logic was introduced by 5325591 (worktree: copy sparse-checkout
patterns and config on add, 2022-02-07), but some feedback came in that
the add_worktree() method was already too complex. It is better to
extract this logic into a helper method to reduce this complexity.

Reported-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>worktree: extract copy_filtered_worktree_config()</title>
<updated>2022-02-23T20:24:41Z</updated>
<author>
<name>Derrick Stolee</name>
<email>derrickstolee@github.com</email>
</author>
<published>2022-02-23T14:29:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=863970536525f071b29f2ee73ac9ac0a35b32a43'/>
<id>urn:sha1:863970536525f071b29f2ee73ac9ac0a35b32a43</id>
<content type='text'>
This logic was introduced by 5325591 (worktree: copy sparse-checkout
patterns and config on add, 2022-02-07), but some feedback came in that
the add_worktree() method was already too complex. It is better to
extract this logic into a helper method to reduce this complexity.

Reported-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
