<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/worktree.c, branch v2.44.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.44.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.44.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-02-06T22:31:21Z</updated>
<entry>
<title>Merge branch 'jc/comment-style-fixes'</title>
<updated>2024-02-06T22:31:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-02-06T22:31:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=184c3b4c735f1c1f0f811fddcf3c2676e7ad613f'/>
<id>urn:sha1:184c3b4c735f1c1f0f811fddcf3c2676e7ad613f</id>
<content type='text'>
Rewrite //-comments to /* comments */ in files whose comments
prevalently use the latter.

* jc/comment-style-fixes:
  reftable/pq_test: comment style fix
  merge-ort.c: comment style fix
  builtin/worktree: comment style fixes
</content>
</entry>
<entry>
<title>builtin/worktree: comment style fixes</title>
<updated>2024-01-29T22:08:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-01-29T20:28:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=777f7838415f6e83c350a39b8119e38794a04739'/>
<id>urn:sha1:777f7838415f6e83c350a39b8119e38794a04739</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ps/worktree-refdb-initialization'</title>
<updated>2024-01-26T16:54:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-01-26T16:54:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dc8ce995a2ad203ffb5ef335682b64da955e645a'/>
<id>urn:sha1:dc8ce995a2ad203ffb5ef335682b64da955e645a</id>
<content type='text'>
Instead of manually creating refs/ hierarchy on disk upon a
creation of a secondary worktree, which is only usable via the
files backend, use the refs API to populate it.

* ps/worktree-refdb-initialization:
  builtin/worktree: create refdb via ref backend
  worktree: expose interface to look up worktree by name
  builtin/worktree: move setup of commondir file earlier
  refs/files: skip creation of "refs/{heads,tags}" for worktrees
  setup: move creation of "refs/" into the files backend
  refs: prepare `refs_init_db()` for initializing worktree refs
</content>
</entry>
<entry>
<title>builtin/worktree: create refdb via ref backend</title>
<updated>2024-01-08T21:17:30Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-01-08T10:05:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8f4c00de954f809e83daf8b1425de82561f3721e'/>
<id>urn:sha1:8f4c00de954f809e83daf8b1425de82561f3721e</id>
<content type='text'>
When creating a worktree we create the worktree's ref database manually
by first writing a "HEAD" file so that the directory is recognized as a
Git repository by other commands, and then running git-update-ref(1) or
git-symbolic-ref(1) to write the actual value. But while this is fine
for the files backend, this logic simply assumes too much about how the
ref backend works and will leave behind an invalid ref database once any
other ref backend lands.

Refactor the code to instead use `refs_init_db()` to initialize the ref
database so that git-worktree(1) itself does not need to know about how
to initialize it. This will allow future ref backends to customize how
the per-worktree ref database is set up. Furthermore, as we now already
have a worktree ref store around, we can also avoid spawning external
commands to write the HEAD reference and instead use the refs API to do
so.

Note that we do not have an equivalent to passing the `--quiet` flag to
git-symbolic-ref(1) as we did before. This flag does not have an effect
anyway though, as git-symbolic-ref(1) only honors it when reading a
symref, but never when writing one.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/worktree: move setup of commondir file earlier</title>
<updated>2024-01-08T21:17:30Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-01-08T10:05:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=84f0ea956fbd3a3c9989a2d44da27881c0a5f546'/>
<id>urn:sha1:84f0ea956fbd3a3c9989a2d44da27881c0a5f546</id>
<content type='text'>
Shuffle around how we create supporting worktree files so that we first
ensure that the worktree has all link files ("gitdir", "commondir")
before we try to initialize the ref database by writing "HEAD". This
will be required by a subsequent commit where we start to initialize the
ref database via `refs_init_db()`, which will require an initialized
`struct worktree *`.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/orphan-unborn'</title>
<updated>2024-01-02T21:51:30Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-01-02T21:51:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=601b1571e8e61e7dc1473a6d5049261a9524f381'/>
<id>urn:sha1:601b1571e8e61e7dc1473a6d5049261a9524f381</id>
<content type='text'>
Doc updates to clarify what an "unborn branch" means.

* jc/orphan-unborn:
  orphan/unborn: fix use of 'orphan' in end-user facing messages
  orphan/unborn: add to the glossary and use them consistently
</content>
</entry>
<entry>
<title>worktree: simplify incompatibility message for --orphan and commit-ish</title>
<updated>2023-12-08T22:41:03Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2023-12-06T11:52:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=792b86283b13fb2e06b9e62c64fca51b879d0266'/>
<id>urn:sha1:792b86283b13fb2e06b9e62c64fca51b879d0266</id>
<content type='text'>
Use a single translatable string to report that the worktree add option
--orphan is incompatible with a commit-ish instead of having the
commit-ish in a separate translatable string.  This reduces the number
of strings to translate and gives translators the full context.

A similar message is used in builtin/describe.c, but with the plural of
commit-ish, and here we need the singular form.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>worktree: standardize incompatibility messages</title>
<updated>2023-12-08T22:41:03Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2023-12-06T11:52:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=62bc6dd33c9cfc3fe155f46dc91d1c9056464dde'/>
<id>urn:sha1:62bc6dd33c9cfc3fe155f46dc91d1c9056464dde</id>
<content type='text'>
Use the standard parameterized message for reporting incompatible
options for worktree add.  This reduces the number of strings to
translate and makes the UI slightly more consistent.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>orphan/unborn: fix use of 'orphan' in end-user facing messages</title>
<updated>2023-11-24T03:11:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-11-24T03:10:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d44b517137ab0d869c81bd532163c3e3e85481e6'/>
<id>urn:sha1:d44b517137ab0d869c81bd532163c3e3e85481e6</id>
<content type='text'>
"orphan branch" is not even grammatical ("orphaned branch" is), and
we have been using "unborn branch" to mean the state where the HEAD
points at a branch that does not yet exist.

Update end-user facing messages to correct them.  There are cases
other random words are used (e.g., "unparented branch") but now we
have a glossary entry, use the term "unborn branch" consistently.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>worktree: mark unused parameters in each_ref_fn callback</title>
<updated>2023-08-30T00:56:24Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2023-08-29T23:45:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bbfc4f53b9622ba996c1cd083eaa6cb10d84f6d0'/>
<id>urn:sha1:bbfc4f53b9622ba996c1cd083eaa6cb10d84f6d0</id>
<content type='text'>
This is similar to the cases in 63e14ee2d6 (refs: mark unused
each_ref_fn parameters, 2022-08-19), but it was added after that commit.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
