Re: [PATCH/RFC 1/7] reset: rename update_refs to reset_refs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brad King <brad.king@xxxxxxxxxxx> writes:

> Get it out of the way for a future refs.h function.

Readers do not know if "update_refs()" is a good name for that
future refs.h function at this point, so "evict squatter" is not a
very good justification by itself.  I do agree that this static
function is resetting a ref, not doing an arbitrary update, and the
new name is a better match than the old one for what it does, though.

> Signed-off-by: Brad King <brad.king@xxxxxxxxxxx>
> ---
>  builtin/reset.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/builtin/reset.c b/builtin/reset.c
> index afa6e02..789ee48 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));
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]