]> git.ipfire.org Git - thirdparty/git.git/commit
refs: extract out refname verification in transactions
authorKarthik Nayak <karthik.188@gmail.com>
Mon, 16 Dec 2024 16:44:29 +0000 (17:44 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Dec 2024 17:45:33 +0000 (09:45 -0800)
commitadd2c4f6e225083747e86c2e2e89e80c97b28733
treeec131901ace098eb90a904332508ba2bf9922f59
parent611986f3007d591731f56ad04cf3e00f0d2f163f
refs: extract out refname verification in transactions

Unless the `REF_SKIP_REFNAME_VERIFICATION` flag is set for an update,
the refname of the update is verified for:

  - Ensuring it is not a pseudoref.
  - Checking the refname format.

These checks will also be needed in a following commit where the
function to add reflog updates to the transaction is introduced. Extract
the code out into a new static function.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c