Re: [PATCH 07/10] Change incorrect "remote branch" to "remote tracking branch" in C code

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

 



Matthieu Moy wrote:

> --- a/branch.h
> +++ b/branch.h
> @@ -22,7 +22,7 @@ void create_branch(const char *head, const char *name, const char *start_name,
>  void remove_branch_state(void);
>  
>  /*
> - * Configure local branch "local" to merge remote branch "remote"
> + * Configure local branch "local" to merge remote-tracking branch "remote"
>   * taken from origin "origin".
>   */
>  #define BRANCH_CONFIG_VERBOSE 01

Is this really more accurate?  I thought what install_branch_config does
is to configure local branch "local" as downstream to remote branch
"remote" from origin "origin".  That means:

 - "git pull" fetches that remote and then merges the corresponding
   remote-tracking branch
 - "git remote show" compares the local branch to the remote branch
 - "git branch -v" compares the local branch to the remote-tracking
   branch

and so on.

> index 3b0b614..4243ef0 100644
> --- a/builtin/fetch.c
> +++ b/builtin/fetch.c
> @@ -359,7 +359,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
>  			what = rm->name + 10;
>  		}
>  		else if (!prefixcmp(rm->name, "refs/remotes/")) {
> -			kind = "remote branch";
> +			kind = "remote-tracking branch";

For use by "git merge" and other "git fmt-merge-msg"-like consumers.  Good.

> --- a/builtin/remote.c
> +++ b/builtin/remote.c
> @@ -791,9 +791,9 @@ static int rm(int argc, const char **argv)
>  
>  	if (skipped.nr) {
>  		fprintf(stderr, skipped.nr == 1 ?
> -			"Note: A non-remote branch was not removed; "
> +			"Note: A non-remote-tracking branch was not removed; "
>  			"to delete it, use:\n" :
> -			"Note: Non-remote branches were not removed; "
> +			"Note: Non-remote-tracking branches were not removed; "
>  			"to delete them, use:\n");

This wording is ugly.  Maybe something to this effect would be better?

	Note: A ref outside the refs/remotes/ hierarchy was not removed:

> --- a/t/t5505-remote.sh
> +++ b/t/t5505-remote.sh
> @@ -107,16 +107,16 @@ test_expect_success 'remove remote' '
>  )
>  '
>  
> -test_expect_success 'remove remote protects non-remote branches' '
> +test_expect_success 'remove remote protects non-remote-tracking branches' '

Maybe:

	test_expect_success 'remove remote protects local branches' '

since that is what is important in practice.
--
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]