diff options
author | Karthik Nayak <karthik.188@gmail.com> | 2024-06-07 15:33:02 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-06-07 19:25:45 +0200 |
commit | ed3272720eb5ac8fca0e555d1f64a145140e69dd (patch) | |
tree | 8d02486c8d595c67e5a8f934fa493c444642fe3f /refs.h | |
parent | update-ref: add support for 'symref-delete' command (diff) | |
download | git-ed3272720eb5ac8fca0e555d1f64a145140e69dd.tar.xz git-ed3272720eb5ac8fca0e555d1f64a145140e69dd.zip |
update-ref: add support for 'symref-create' command
Add 'symref-create' command to the '--stdin' mode 'git-update-ref' to
allow creation of symbolic refs in a transaction. The 'symref-create'
command takes in a <new-target>, which the created <ref> will point to.
Also, support the 'core.prefersymlinkrefs' config, wherein if the config
is set and the filesystem supports symlinks, we create the symbolic ref
as a symlink. We fallback to creating a regular symref if creating the
symlink is unsuccessful.
Helped-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r-- | refs.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -753,6 +753,7 @@ int ref_transaction_update(struct ref_transaction *transaction, int ref_transaction_create(struct ref_transaction *transaction, const char *refname, const struct object_id *new_oid, + const char *new_target, unsigned int flags, const char *msg, struct strbuf *err); |