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>
Brad King committed
Aug 30, 2013 at 14:11 UTC
2be778a8ac557931c270fb09fa6b4b3c4ec0729c
1 file changed
+2
-2
builtin/reset.c
+2
-2
@@ -219,7 +219,7 @@ static const char **parse_args(const char **argv, const char *prefix, const char
219
return argv[0] ? get_pathspec(prefix, argv) : NULL;
220
}
221
222
-static int update_refs(const char *rev, const unsigned char *sha1)
222
+static int reset_refs(const char *rev, const unsigned char *sha1)
223
{
224
int update_ref_status;
225
struct strbuf msg = STRBUF_INIT;
@@ -350,7 +350,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
350
if (!pathspec && !unborn) {
351
/* Any resets without paths update HEAD to the head being
352
* switched to, saving the previous head in ORIG_HEAD before. */
353
- update_ref_status = update_refs(rev, sha1);
353
+ update_ref_status = reset_refs(rev, sha1);
354
355
if (reset_type == HARD && !update_ref_status && !quiet)
356
print_new_head_line(lookup_commit_reference(sha1));