git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Oct 28, 2010, 19:13 UTC
Message-ID
<20101028191303.GE14212@burratino>
In-Reply-To
<1288290117-6734-7-git-send-email-Matthieu.Moy@imag.fr>
Matthieu Moy wrote:
Show 11 quoted lines
> --- 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
This still seems inaccurate (and even misleading).  Presumably you mean
	             ... to merge remote-tracking branch "origin/remote"
	based on origin "origin".
or
	             ... to merge remote branch "remote"
	taken from origin "origin"
or even better,
	Configure local branch "local" as downstream to branch "remote"
	from remote "origin".  Used by git branch --set-upstream.
More confusion could presumably be avoided by renaming the parameters.
Show 9 quoted lines
> --- 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";
>  			what = rm->name + 13;

I didn't follow before --- what concrete effect does this have? Are scripts affected? Is fmt-merge-msg affected?

Show 14 quoted lines
> --- 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 branch outside the refs/remotes/ hierarchy was not removed;\n"
>  			"to delete it, use:\n" :
> -			"Note: Non-remote branches were not removed; "
> +			"Note: Some branches outside the refs/remotes/ hierarchy were not removed;\n"
>  			"to delete them, use:\n");
>  		for (i = 0; i < skipped.nr; i++)
>  			fprintf(stderr, "  git branch -d %s\n",
Nice.
Maybe the commit message should explain the reasoning, something like:
 The non-deleted branch is somehow remote-tracking since "fetch" feeds
 it, and the code detecting this case is:
	/* don't delete non-remote-tracking refs */
	if (prefixcmp(refname, "refs/remotes")) {
		/* advise user how to delete local branches */
		if (!prefixcmp(refname, "refs/heads/"))
			string_list_append(branches->skipped,
					   abbrev_branch(refname));
		/* silently skip over other non-remote refs */
		return 0;
	}
 
 hence, really "branches outside the refs/remotes/ hierarchy".
Thanks for your tireless work.  Everything not mentioned above looks good.
Previous: Matthieu MoyNext: Matthieu Moy
Message 77 of 101 in “More consistant terminology ("remote-tracking branch", "not updated")”
  1. 00/11 More consistant terminology ("remote-tracking branch", "not updated")Matthieu Moy, Oct 23, 2010
  2. 01/10 Better "Changed but not updated" message in git-statusMatthieu Moy, Oct 23, 2010
  3. Jonathan NiederOct 23, 2010
  4. Matthieu MoyOct 23, 2010
  5. Jakub NarebskiOct 23, 2010
  6. 02/10 Remplace "remote tracking" with "remote-tracking"Matthieu Moy, Oct 23, 2010
  7. Jonathan NiederOct 23, 2010
  8. Jonathan NiederOct 23, 2010
  9. Matthieu MoyOct 23, 2010
  10. 03/10 Change remote tracking to remote-tracking in non-trivial placesMatthieu Moy, Oct 23, 2010
  11. Jonathan NiederOct 23, 2010
  12. Matthieu MoyOct 23, 2010
  13. 04/10 Change "tracking branch" to "remote-tracking branch"Matthieu Moy, Oct 23, 2010
  14. Jonathan NiederOct 23, 2010
  15. Matthieu MoyOct 28, 2010
  16. 05/10 Change "tracking branch" to "remote-tracking branch" in C codeMatthieu Moy, Oct 23, 2010
  17. Jonathan NiederOct 23, 2010
  18. Matthieu MoyOct 26, 2010
  19. 06/10 Change incorrect uses of "remote branch" meaning "remote-tracking"Matthieu Moy, Oct 23, 2010
  20. 07/10 Change incorrect "remote branch" to "remote tracking branch" in C codeMatthieu Moy, Oct 23, 2010
  21. Jonathan NiederOct 23, 2010
  22. Matthieu MoyOct 23, 2010
  23. 08/10 Use 'remote-tracking branch' in generated merge messagesMatthieu Moy, Oct 23, 2010
  24. Jonathan NiederOct 23, 2010
  25. Matthieu MoyOct 23, 2010
  26. 09/10 user-manual.txt: explain better the remote(-tracking) branch termsMatthieu Moy, Oct 23, 2010
  27. Jonathan NiederOct 23, 2010
  28. Matthieu MoyOct 23, 2010
  29. Thore HusfeldtOct 24, 2010
  30. Jonathan NiederOct 24, 2010
  31. Jakub NarebskiOct 24, 2010
  32. Matthieu MoyOct 26, 2010
  33. Miles BaderOct 26, 2010
  34. 10/10 git-branch.txt: mention --set-upstream as a way to change upstream configurationMatthieu Moy, Oct 23, 2010
  35. Jakub NarebskiOct 23, 2010
  36. Jonathan NiederOct 23, 2010
  37. Matthieu MoyOct 25, 2010
  38. 00/10 More consistant terminology ("remote-tracking branch", "not updated")Matthieu Moy, Oct 25, 2010
  39. 01/10 Better "Changed but not updated" message in git-statusMatthieu Moy, Oct 25, 2010
  40. 02/10 Replace "remote tracking" with "remote-tracking"Matthieu Moy, Oct 25, 2010
  41. 03/10 Change remote tracking to remote-tracking in non-trivial placesMatthieu Moy, Oct 25, 2010
  42. 04/10 Change "tracking branch" to "remote-tracking branch"Matthieu Moy, Oct 25, 2010
  43. 05/10 Change "tracking branch" to "remote-tracking branch" in C codeMatthieu Moy, Oct 25, 2010
  44. 06/10 Change incorrect uses of "remote branch" meaning "remote-tracking"Matthieu Moy, Oct 25, 2010
  45. 07/10 Change incorrect "remote branch" to "remote tracking branch" in C codeMatthieu Moy, Oct 25, 2010
  46. 08/10 Use 'remote-tracking branch' in generated merge messagesMatthieu Moy, Oct 25, 2010
  47. 09/10 user-manual.txt: explain better the remote(-tracking) branch termsMatthieu Moy, Oct 25, 2010
  48. Jay SoffianOct 26, 2010
  49. Matthieu MoyOct 26, 2010
  50. Jay SoffianOct 26, 2010
  51. Matthieu MoyOct 27, 2010
  52. user-manual.txt: explain better the remote(-tracking) branch termsMatthieu Moy, Oct 27, 2010
  53. 10/10 git-branch.txt: mention --set-upstream as a way to change upstream configurationMatthieu Moy, Oct 25, 2010
  54. Drew NorthupOct 25, 2010
  55. 00/10 More consistant terminology ("remote-tracking branch", "not updated")Matthieu Moy, Oct 28, 2010
  56. 01/10 Better "Changed but not updated" message in git-statusMatthieu Moy, Oct 28, 2010
  57. Jonathan NiederOct 28, 2010
  58. Junio C HamanoOct 28, 2010
  59. Jonathan NiederOct 28, 2010
  60. Matthieu MoyOct 28, 2010
  61. Junio C HamanoOct 28, 2010
  62. Matthieu MoyOct 28, 2010
  63. Drew NorthupOct 29, 2010
  64. Matthieu MoyOct 30, 2010
  65. 02/10 Replace "remote tracking" with "remote-tracking"Matthieu Moy, Oct 28, 2010
  66. Jonathan NiederOct 28, 2010
  67. 03/10 Change remote tracking to remote-tracking in non-trivial placesMatthieu Moy, Oct 28, 2010
  68. Jonathan NiederOct 28, 2010
  69. Matthieu MoyOct 28, 2010
  70. Jonathan NiederOct 28, 2010
  71. Matthieu MoyOct 28, 2010
  72. Drew NorthupOct 29, 2010
  73. 04/10 Change "tracking branch" to "remote-tracking branch"Matthieu Moy, Oct 28, 2010
  74. Jonathan NiederOct 28, 2010
  75. 05/10 Change incorrect uses of "remote branch" meaning "remote-tracking"Matthieu Moy, Oct 28, 2010
  76. 06/10 Change incorrect "remote branch" to "remote tracking branch" in C codeMatthieu Moy, Oct 28, 2010
  77. Jonathan NiederOct 28, 2010
  78. Matthieu MoyOct 28, 2010
  79. Jonathan NiederOct 28, 2010
  80. 07/10 Use 'remote-tracking branch' in generated merge messagesMatthieu Moy, Oct 28, 2010
  81. 08/10 user-manual.txt: explain better the remote(-tracking) branch termsMatthieu Moy, Oct 28, 2010
  82. Jonathan NiederOct 28, 2010
  83. Matthieu MoyOct 28, 2010
  84. 09/10 user-manual: remote-tracking can be checked out, with detached HEADMatthieu Moy, Oct 28, 2010
  85. 10/10 git-branch.txt: mention --set-upstream as a way to change upstream configurationMatthieu Moy, Oct 28, 2010
  86. Jonathan NiederOct 28, 2010
  87. 00/11 More consistant terminologyMatthieu Moy, Oct 30, 2010
  88. Jonathan NiederOct 30, 2010
  89. 01/11 Better "Changed but not updated" message in git-statusMatthieu Moy, Oct 30, 2010
  90. 02/11 Replace "remote tracking" with "remote-tracking"Matthieu Moy, Oct 30, 2010
  91. 03/11 Change remote tracking to remote-tracking in non-trivial placesMatthieu Moy, Oct 30, 2010
  92. 04/11 everyday.txt: change "tracking branch" to "remote-tracking branch"Matthieu Moy, Oct 30, 2010
  93. 05/11 Change "tracking branch" to "remote-tracking branch"Matthieu Moy, Oct 30, 2010
  94. 06/11 Change incorrect uses of "remote branch" meaning "remote-tracking"Matthieu Moy, Oct 30, 2010
  95. 07/11 Change incorrect "remote branch" to "remote tracking branch" in C codeMatthieu Moy, Oct 30, 2010
  96. 08/11 Use 'remote-tracking branch' in generated merge messagesMatthieu Moy, Oct 30, 2010
  97. 09/11 user-manual.txt: explain better the remote(-tracking) branch termsMatthieu Moy, Oct 30, 2010
  98. Jonathan NiederOct 30, 2010
  99. Matthieu MoyOct 31, 2010
  100. 10/11 user-manual: remote-tracking can be checked out, with detached HEADMatthieu Moy, Oct 30, 2010
  101. 11/11 git-branch.txt: mention --set-upstream as a way to change upstream configurationMatthieu Moy, Oct 30, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.