summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-08-30 14:11:59 -0400
committerJunio C Hamano <gitster@pobox.com>2013-08-30 14:57:27 -0700
commit2be778a8ac557931c270fb09fa6b4b3c4ec0729c (patch)
tree87b011d5a9dae31dfb62e4d4cb0d21e5455c94e7
parente230c568c4b9a991e3175e5f65171a566fd8e39c (diff)
downloadgit-2be778a8ac557931c270fb09fa6b4b3c4ec0729c.tar.gz
reset: rename update_refs to reset_refs
The function resets refs rather than doing arbitrary updates. Rename it to allow a future general-purpose update_refs function to be added. Signed-off-by: Brad King <brad.king@kitware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/reset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/reset.c b/builtin/reset.c
index afa6e020e8..789ee489b7 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -219,7 +219,7 @@ static const char **parse_args(const char **argv, const char *prefix, const char
return argv[0] ? get_pathspec(prefix, argv) : NULL;
}
-static int update_refs(const char *rev, const unsigned char *sha1)
+static int reset_refs(const char *rev, const unsigned char *sha1)
{
int update_ref_status;
struct strbuf msg = STRBUF_INIT;
@@ -350,7 +350,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
if (!pathspec && !unborn) {
/* Any resets without paths update HEAD to the head being
* switched to, saving the previous head in ORIG_HEAD before. */
- update_ref_status = update_refs(rev, sha1);
+ update_ref_status = reset_refs(rev, sha1);
if (reset_type == HARD && !update_ref_status && !quiet)
print_new_head_line(lookup_commit_reference(sha1));