<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/refs.h, branch v2.48.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.48.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.48.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-12-23T17:32:29Z</updated>
<entry>
<title>Merge branch 'kn/reflog-migration'</title>
<updated>2024-12-23T17:32:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-12-23T17:32:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6f8ae955bda8ad246cc1f5f7a15f1c3b1c04696a'/>
<id>urn:sha1:6f8ae955bda8ad246cc1f5f7a15f1c3b1c04696a</id>
<content type='text'>
"git refs migrate" learned to also migrate the reflog data across
backends.

* kn/reflog-migration:
  refs: mark invalid refname message for translation
  refs: add support for migrating reflogs
  refs: allow multiple reflog entries for the same refname
  refs: introduce the `ref_transaction_update_reflog` function
  refs: add `committer_info` to `ref_transaction_add_update()`
  refs: extract out refname verification in transactions
  refs/files: add count field to ref_lock
  refs: add `index` field to `struct ref_udpate`
  refs: include committer info in `ref_update` struct
</content>
</entry>
<entry>
<title>Merge branch 'bf/set-head-symref'</title>
<updated>2024-12-19T18:58:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-12-19T18:58:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5f212684abb66c9604e745a2296af8c4bb99961c'/>
<id>urn:sha1:5f212684abb66c9604e745a2296af8c4bb99961c</id>
<content type='text'>
When "git fetch $remote" notices that refs/remotes/$remote/HEAD is
missing and discovers what branch the other side points with its
HEAD, refs/remotes/$remote/HEAD is updated to point to it.

* bf/set-head-symref:
  fetch set_head: handle mirrored bare repositories
  fetch: set remote/HEAD if it does not exist
  refs: add create_only option to refs_update_symref_extended
  refs: add TRANSACTION_CREATE_EXISTS error
  remote set-head: better output for --auto
  remote set-head: refactor for readability
  refs: atomically record overwritten ref in update_symref
  refs: standardize output of refs_read_symbolic_ref
  t/t5505-remote: test failure of set-head
  t/t5505-remote: set default branch to main
</content>
</entry>
<entry>
<title>refs: introduce the `ref_transaction_update_reflog` function</title>
<updated>2024-12-16T17:45:34Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2024-12-16T16:44:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=84675fa2717e08b39bf810eb9a439068ac915dfb'/>
<id>urn:sha1:84675fa2717e08b39bf810eb9a439068ac915dfb</id>
<content type='text'>
Introduce a new function `ref_transaction_update_reflog`, for clients to
add a reflog update to a transaction. While the existing function
`ref_transaction_update` also allows clients to add a reflog entry, this
function does a few things more, It:
  - Enforces that only a reflog entry is added and does not update the
  ref itself.
  - Allows the users to also provide the committer information. This
  means clients can add reflog entries with custom committer
  information.

The `transaction_refname_valid()` function also modifies the error
message selectively based on the type of the update. This change also
affects reflog updates which go through `ref_transaction_update()`.

A follow up commit will utilize this function to add reflog support to
`git refs migrate`.

Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/forbid-head-as-tagname'</title>
<updated>2024-12-16T01:54:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-12-16T01:54:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ab738b2f1f35fbc3658ac107e1ad55b21c1e0fbc'/>
<id>urn:sha1:ab738b2f1f35fbc3658ac107e1ad55b21c1e0fbc</id>
<content type='text'>
"git tag" has been taught to refuse to create refs/tags/HEAD
as such a tag will be confusing in the context of UI provided by
the Git Porcelain commands.

* jc/forbid-head-as-tagname:
  tag: "git tag" refuses to use HEAD as a tagname
  t5604: do not expect that HEAD can be a valid tagname
  refs: drop strbuf_ prefix from helpers
  refs: move ref name helpers around
</content>
</entry>
<entry>
<title>Merge branch 'sj/ref-contents-check'</title>
<updated>2024-12-04T01:14:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-12-04T01:14:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=57e81b59f35198afedae18e8363dbffdc96c481d'/>
<id>urn:sha1:57e81b59f35198afedae18e8363dbffdc96c481d</id>
<content type='text'>
"git fsck" learned to issue warnings on "curiously formatted" ref
contents that have always been taken valid but something Git
wouldn't have written itself (e.g., missing terminating end-of-line
after the full object name).

* sj/ref-contents-check:
  ref: add symlink ref content check for files backend
  ref: check whether the target of the symref is a ref
  ref: add basic symref content check for files backend
  ref: add more strict checks for regular refs
  ref: port git-fsck(1) regular refs check for files backend
  ref: support multiple worktrees check for refs
  ref: initialize ref name outside of check functions
  ref: check the full refname instead of basename
  ref: initialize "fsck_ref_report" with zero
</content>
</entry>
<entry>
<title>refs: drop strbuf_ prefix from helpers</title>
<updated>2024-12-03T03:38:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-12-03T02:32:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=93e5e048f84138a632b239632c9b45ae238cdf1c'/>
<id>urn:sha1:93e5e048f84138a632b239632c9b45ae238cdf1c</id>
<content type='text'>
The helper functions (strbuf_branchname, strbuf_check_branch_ref,
and strbuf_check_tag_ref) are about handling branch and tag names,
and it is a non-essential fact that these functions use strbuf to
hold these names.  Rename them to make it clarify that these are
more about "ref".

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: move ref name helpers around</title>
<updated>2024-12-03T03:38:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-12-03T02:32:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5bcbde9e49c14f4e47a0ed5fc60470f3d4447efd'/>
<id>urn:sha1:5bcbde9e49c14f4e47a0ed5fc60470f3d4447efd</id>
<content type='text'>
strbuf_branchname(), strbuf_check_{branch,tag}_ref() are helper
functions to deal with branch and tag names, and the fact that they
happen to use strbuf to hold the name of a branch or a tag is not
essential.  These functions fit better in the refs API than strbuf
API, the latter of which is about string manipulations.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: adapt `initial_transaction` flag to be unsigned</title>
<updated>2024-11-25T23:39:38Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-11-25T07:34:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0f5762b0435234c4dc916f4b3672c78c1b24f0e2'/>
<id>urn:sha1:0f5762b0435234c4dc916f4b3672c78c1b24f0e2</id>
<content type='text'>
The `initial_transaction` flag is tracked as a signed integer, but we
typically pass around flags via unsigned integers. Adapt the type
accordingly.

Suggested-by: Christian Couder &lt;christian.couder@gmail.com&gt;
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>refs: add create_only option to refs_update_symref_extended</title>
<updated>2024-11-25T02:46:36Z</updated>
<author>
<name>Bence Ferdinandy</name>
<email>bence@ferdinandy.com</email>
</author>
<published>2024-11-22T12:28:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9963746c841dc786529827b7b6755d0a3e208ad4'/>
<id>urn:sha1:9963746c841dc786529827b7b6755d0a3e208ad4</id>
<content type='text'>
Allow the caller to specify that it only wants to update the symref if
it does not already exist. Silently ignore the error from the
transaction API if the symref already exists.

Signed-off-by: Bence Ferdinandy &lt;bence@ferdinandy.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: add TRANSACTION_CREATE_EXISTS error</title>
<updated>2024-11-25T02:46:36Z</updated>
<author>
<name>Bence Ferdinandy</name>
<email>bence@ferdinandy.com</email>
</author>
<published>2024-11-22T12:28:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ed2f6f8804cc142a02c701e808d110223b0256f8'/>
<id>urn:sha1:ed2f6f8804cc142a02c701e808d110223b0256f8</id>
<content type='text'>
Currently there is only one special error for transaction, for when
there is a naming conflict, all other errors are dumped under a generic
error. Add a new special error case for when the caller requests the
reference to be updated only when it does not yet exist and the
reference actually does exist.

Signed-off-by: Bence Ferdinandy &lt;bence@ferdinandy.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
