diff options
author | Karthik Nayak <karthik.188@gmail.com> | 2024-05-07 14:58:58 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-05-07 17:51:50 +0200 |
commit | f151dfe3c91de744a2ced6ae701d1d8c2215bfd6 (patch) | |
tree | 36782750e7a3f28544a06f5f45cb6daee57e2074 /refs.h | |
parent | refs: use transaction in `refs_create_symref()` (diff) | |
download | git-f151dfe3c91de744a2ced6ae701d1d8c2215bfd6.tar.xz git-f151dfe3c91de744a2ced6ae701d1d8c2215bfd6.zip |
refs: rename `refs_create_symref()` to `refs_update_symref()`
The `refs_create_symref()` function is used to update/create a symref.
But it doesn't check the old target of the symref, if existing. It force
updates the symref. In this regard, the name `refs_create_symref()` is a
bit misleading. So let's rename it to `refs_update_symref()`. This is
akin to how 'git-update-ref(1)' also allows us to create apart from
update.
While we're here, rename the arguments in the function to clarify what
they actually signify and reduce confusion.
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 | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -606,7 +606,7 @@ int refs_copy_existing_ref(struct ref_store *refs, const char *oldref, int copy_existing_ref(const char *oldref, const char *newref, const char *logmsg); -int refs_create_symref(struct ref_store *refs, const char *refname, +int refs_update_symref(struct ref_store *refs, const char *refname, const char *target, const char *logmsg); int create_symref(const char *refname, const char *target, const char *logmsg); |