aboutsummaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-12-29 00:56:44 -0500
committerJunio C Hamano <gitster@pobox.com>2015-12-29 10:33:09 -0800
commitb9badadd06ae307c5e1e0e7c36985a1360cabc22 (patch)
tree35206c54702c6541fde7e3bb89b4f21f8b483cfa /refs.h
parente929264e8d769cd3637279c0a2b6338f9ec1c4c3 (diff)
downloadgit-b9badadd06ae307c5e1e0e7c36985a1360cabc22.tar.gz
git-b9badadd06ae307c5e1e0e7c36985a1360cabc22.tar.xz
create_symref: modernize variable names
Once upon a time, create_symref() was used only to point HEAD at a branch name, and the variable names reflect that (e.g., calling the path git_HEAD). However, it is much more generic these days (and has been for some time). Let's update the variable names to make it easier to follow: - `ref_target` is now just `refname`. This is closer to the `ref` that is already in `cache.h`, but with the extra twist that "name" makes it clear this is the name and not a ref struct. Dropping "target" hopefully makes it clear that we are talking about the symref itself, not what it points to. - `git_HEAD` is now `ref_path`; the on-disk path corresponding to `ref`. - `refs_heads_master` is now just `target`; i.e., what the symref points at. This term also matches what is in the symlink(2) manpage (at least on Linux). - the buffer to hold the symref file's contents was simply called `ref`. It's now `buf` (admittedly also generic, but at least not actively introducing confusion with the other variable holding the refname). Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.h b/refs.h
index 7a0407748..3c3da29bf 100644
--- a/refs.h
+++ b/refs.h
@@ -292,7 +292,7 @@ extern char *shorten_unambiguous_ref(const char *refname, int strict);
/** rename ref, return 0 on success **/
extern int rename_ref(const char *oldref, const char *newref, const char *logmsg);
-extern int create_symref(const char *ref, const char *refs_heads_master, const char *logmsg);
+extern int create_symref(const char *refname, const char *target, const char *logmsg);
enum action_on_err {
UPDATE_REFS_MSG_ON_ERR,