summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2015-12-29 00:56:44 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-12-29 10:33:09 -0800
commitb9badadd06ae307c5e1e0e7c36985a1360cabc22 (patch)
tree35206c54702c6541fde7e3bb89b4f21f8b483cfa /dir.c
parentMerge branch 'jk/symbolic-ref-maint' (diff)
downloadtgif-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 'dir.c')
0 files changed, 0 insertions, 0 deletions