Skip to content

Commit 2be778a

Browse files
bradkinggitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e230c56 commit 2be778a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/reset.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ static const char **parse_args(const char **argv, const char *prefix, const char
219219
return argv[0] ? get_pathspec(prefix, argv) : NULL;
220220
}
221221

222-
static int update_refs(const char *rev, const unsigned char *sha1)
222+
static int reset_refs(const char *rev, const unsigned char *sha1)
223223
{
224224
int update_ref_status;
225225
struct strbuf msg = STRBUF_INIT;
@@ -350,7 +350,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
350350
if (!pathspec && !unborn) {
351351
/* Any resets without paths update HEAD to the head being
352352
* 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);
354354

355355
if (reset_type == HARD && !update_ref_status && !quiet)
356356
print_new_head_line(lookup_commit_reference(sha1));

0 commit comments

Comments
 (0)