mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
refs: add create_only option to refs_update_symref_extended
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 <bence@ferdinandy.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
ed2f6f8804
commit
9963746c84
2
refs.h
2
refs.h
@@ -586,7 +586,7 @@ int refs_update_symref(struct ref_store *refs, const char *refname,
|
||||
|
||||
int refs_update_symref_extended(struct ref_store *refs, const char *refname,
|
||||
const char *target, const char *logmsg,
|
||||
struct strbuf *referent);
|
||||
struct strbuf *referent, int create_only);
|
||||
|
||||
enum action_on_err {
|
||||
UPDATE_REFS_MSG_ON_ERR,
|
||||
|
||||
Reference in New Issue
Block a user