threads / patch / 15113

patchExtend "checkout --track" DWIM to support more cases

Subject: [PATCH] Extend "checkout --track" DWIM to support more cases

## tl;dr

11 messages between Aug 20, 2008 and Aug 22, 2008. Diffs are folded; open one to read it.

replies: 10people: 4as markdown or json

Alex Riesen· Aug 20, 2008, 18:50 UTC · lore

The code handles additionally "refs/remotes/<something>/name", "remotes/<something>/name", and "refs/<namespace>/name". Test cases included.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
Johannes has likable ideas :)
 builtin-checkout.c |   20 +++++++++++++++-----
 t/t7201-co.sh      |   23 ++++++++++++++++++++++-
 2 files changed, 37 insertions(+), 6 deletions(-)
Show changes to 2 files +37 −6

builtin-checkout.c, t/t7201-co.sh

diff --git a/builtin-checkout.c b/builtin-checkout.c
index e95eab9..20466e2 100644
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
@@ -447,11 +447,21 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 		char *slash;
 		if (!argc || !strcmp(argv[0], "--"))
 			die ("--track needs a branch name");
-		slash = strchr(argv[0], '/');
-		if (slash && !prefixcmp(argv[0], "refs/"))
-			slash = strchr(slash + 1, '/');
-		if (slash && !prefixcmp(argv[0], "remotes/"))
-			slash = strchr(slash + 1, '/');
+		if (!prefixcmp(argv[0], "remotes/"))
+			/* skip the name of a remote */
+			slash = strchr(argv[0] + 8, '/');
+		else if (!prefixcmp(argv[0], "refs/")) {
+			/* skip namespaces, try use the names of their
+			 * branches, but for the target namespace
+			 * (heads) demand a new name. Also skip the
+			 * first element in "remotes" namespace */
+			const char *ns = argv[0] + 5;
+			slash = !prefixcmp(ns, "heads/") ? NULL:
+				!prefixcmp(ns, "remotes/") ?
+				strchr(ns + 8, '/'): strchr(ns, '/');
+		} else
+			/* otherwise - just skip the first element */
+			slash = strchr(argv[0], '/');
 		if (!slash || !slash[1])
 			die ("Missing branch name; try -b");
 		opts.new_branch = slash + 1;
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index 943dd57..1dff84d 100755
--- a/t/t7201-co.sh
+++ b/t/t7201-co.sh
@@ -340,9 +340,30 @@ test_expect_success \
 test_expect_success \
     'checkout with --track fakes a sensible -b <name>' '
     git update-ref refs/remotes/origin/koala/bear renamer &&
+    git update-ref refs/new/koala/bear renamer &&
+
     git checkout --track origin/koala/bear &&
     test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
-    test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)"'
+    test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)" &&
+
+    git checkout master && git branch -D koala/bear &&
+
+    git checkout --track refs/remotes/origin/koala/bear &&
+    test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
+    test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)" &&
+
+    git checkout master && git branch -D koala/bear &&
+
+    git checkout --track remotes/origin/koala/bear &&
+    test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
+    test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)" &&
+
+    git checkout master && git branch -D koala/bear &&
+
+    git checkout --track refs/new/koala/bear &&
+    test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
+    test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)"
+'
 
 test_expect_success \
     'checkout with --track, but without -b, fails with too short tracked name' '
-- 
1.6.0.22.g09248
Johannes Schindelin· Aug 20, 2008, 19:52 UTC · re: Alex Riesen · lore

Re: [PATCH] Extend "checkout --track" DWIM to support more cases

Hi,
On Wed, 20 Aug 2008, Alex Riesen wrote:
Show 26 quoted lines
> The code handles additionally "refs/remotes/<something>/name",
> "remotes/<something>/name", and "refs/<namespace>/name".
> Test cases included.
> 
> Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
> ---
> 
> Johannes has likable ideas :)
> 
>  builtin-checkout.c |   20 +++++++++++++++-----
>  t/t7201-co.sh      |   23 ++++++++++++++++++++++-
>  2 files changed, 37 insertions(+), 6 deletions(-)
> 
> diff --git a/builtin-checkout.c b/builtin-checkout.c
> index e95eab9..20466e2 100644
> --- a/builtin-checkout.c
> +++ b/builtin-checkout.c
> @@ -447,11 +447,21 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
>  		char *slash;
>  		if (!argc || !strcmp(argv[0], "--"))
>  			die ("--track needs a branch name");
> -		slash = strchr(argv[0], '/');
> -		if (slash && !prefixcmp(argv[0], "refs/"))
> -			slash = strchr(slash + 1, '/');
> -		if (slash && !prefixcmp(argv[0], "remotes/"))
> -			slash = strchr(slash + 1, '/');

Why is this not enough? It strips refs/ if there is one, and remotes/ if there is one (possibly after stripping refs/). No?

Puzzled, Dscho

Alex Riesen· Aug 20, 2008, 20:04 UTC · re: Johannes Schindelin · lore

Re: [PATCH] Extend "checkout --track" DWIM to support more cases

Johannes Schindelin, Wed, Aug 20, 2008 21:52:23 +0200:
Show 10 quoted lines
> On Wed, 20 Aug 2008, Alex Riesen wrote:
> > -		slash = strchr(argv[0], '/');
> > -		if (slash && !prefixcmp(argv[0], "refs/"))
> > -			slash = strchr(slash + 1, '/');
> > -		if (slash && !prefixcmp(argv[0], "remotes/"))
> > -			slash = strchr(slash + 1, '/');
> 
> Why is this not enough?  It strips refs/ if there is one, and remotes/ if 
> there is one (possibly after stripping refs/).  No?
> 

No. It strips refs/ OR remotes/ (because of prefixcmp with argv[0]). And I still wanted refs/<namespace>/something...

Johannes Schindelin· Aug 20, 2008, 20:16 UTC · re: Alex Riesen · lore

Re: [PATCH] Extend "checkout --track" DWIM to support more cases

Hi,
On Wed, 20 Aug 2008, Alex Riesen wrote:
Show 14 quoted lines
> Johannes Schindelin, Wed, Aug 20, 2008 21:52:23 +0200:
> > On Wed, 20 Aug 2008, Alex Riesen wrote:
> > > -		slash = strchr(argv[0], '/');
> > > -		if (slash && !prefixcmp(argv[0], "refs/"))
> > > -			slash = strchr(slash + 1, '/');
> > > -		if (slash && !prefixcmp(argv[0], "remotes/"))
> > > -			slash = strchr(slash + 1, '/');
> > 
> > Why is this not enough?  It strips refs/ if there is one, and remotes/ if 
> > there is one (possibly after stripping refs/).  No?
> > 
> 
> No. It strips refs/ OR remotes/ (because of prefixcmp with argv[0]).
> And I still wanted refs/<namespace>/something...
Yes, you are correct.  However, to fix my thinko, I deem this preferable:
-- snipsnap --
 builtin-checkout.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
Show changes to builtin-checkout.c +4 −2
diff --git a/builtin-checkout.c b/builtin-checkout.c
index e95eab9..2a076cf 100644
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
@@ -448,8 +448,10 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 		if (!argc || !strcmp(argv[0], "--"))
 			die ("--track needs a branch name");
 		slash = strchr(argv[0], '/');
-		if (slash && !prefixcmp(argv[0], "refs/"))
-			slash = strchr(slash + 1, '/');
+		if (slash && !prefixcmp(argv[0], "refs/")) {
+			argv[0] = slash + 1;
+			slash = strchr(argv[0], '/');
+		}
 		if (slash && !prefixcmp(argv[0], "remotes/"))
 			slash = strchr(slash + 1, '/');
 		if (!slash || !slash[1])
Alex Riesen· Aug 20, 2008, 20:29 UTC · re: Johannes Schindelin · lore

Re: [PATCH] Extend "checkout --track" DWIM to support more cases

Johannes Schindelin, Wed, Aug 20, 2008 22:16:19 +0200:
Show 25 quoted lines
> > 
> > No. It strips refs/ OR remotes/ (because of prefixcmp with argv[0]).
> > And I still wanted refs/<namespace>/something...
> 
> Yes, you are correct.  However, to fix my thinko, I deem this preferable:
> 
> -- snipsnap --
> 
>  builtin-checkout.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/builtin-checkout.c b/builtin-checkout.c
> index e95eab9..2a076cf 100644
> --- a/builtin-checkout.c
> +++ b/builtin-checkout.c
> @@ -448,8 +448,10 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
>  		if (!argc || !strcmp(argv[0], "--"))
>  			die ("--track needs a branch name");
>  		slash = strchr(argv[0], '/');
> -		if (slash && !prefixcmp(argv[0], "refs/"))
> -			slash = strchr(slash + 1, '/');
> +		if (slash && !prefixcmp(argv[0], "refs/")) {
> +			argv[0] = slash + 1;
> +			slash = strchr(argv[0], '/');
> +		}

Yes, I agree (and its shorter). The git-checkout manpage can be improved, too (no DWIM is obvious, except may be for the implementor).

Junio C Hamano· Aug 20, 2008, 22:22 UTC · re: Alex Riesen · lore

Re: [PATCH] Extend "checkout --track" DWIM to support more cases

Alex Riesen <raa.lkml@gmail.com> writes:
Show 29 quoted lines
> Johannes Schindelin, Wed, Aug 20, 2008 22:16:19 +0200:
>> > 
>> > No. It strips refs/ OR remotes/ (because of prefixcmp with argv[0]).
>> > And I still wanted refs/<namespace>/something...
>> 
>> Yes, you are correct.  However, to fix my thinko, I deem this preferable:
>> 
>> -- snipsnap --
>> 
>>  builtin-checkout.c |    6 ++++--
>>  1 files changed, 4 insertions(+), 2 deletions(-)
>> 
>> diff --git a/builtin-checkout.c b/builtin-checkout.c
>> index e95eab9..2a076cf 100644
>> --- a/builtin-checkout.c
>> +++ b/builtin-checkout.c
>> @@ -448,8 +448,10 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
>>  		if (!argc || !strcmp(argv[0], "--"))
>>  			die ("--track needs a branch name");
>>  		slash = strchr(argv[0], '/');
>> -		if (slash && !prefixcmp(argv[0], "refs/"))
>> -			slash = strchr(slash + 1, '/');
>> +		if (slash && !prefixcmp(argv[0], "refs/")) {
>> +			argv[0] = slash + 1;
>> +			slash = strchr(argv[0], '/');
>> +		}
>
> Yes, I agree (and its shorter). The git-checkout manpage can be
> improved, too (no DWIM is obvious, except may be for the implementor).

I think that makes sense. Care to send an appliable patch with documentation updates, please?

Alex Riesen· Aug 21, 2008, 17:23 UTC · re: Junio C Hamano · lore

The code handles additionally "refs/remotes/<something>/name", "remotes/<something>/name", and "refs/<namespace>/name".

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
Junio C Hamano, Thu, Aug 21, 2008 00:22:21 +0200:
Show 13 quoted lines
> Alex Riesen <raa.lkml@gmail.com> writes:
> > Johannes Schindelin, Wed, Aug 20, 2008 22:16:19 +0200:
> >> > No. It strips refs/ OR remotes/ (because of prefixcmp with argv[0]).
> >> > And I still wanted refs/<namespace>/something...
> >> 
> >> Yes, you are correct.  However, to fix my thinko, I deem this preferable:
> >> 
> >
> > Yes, I agree (and its shorter). The git-checkout manpage can be
> > improved, too (no DWIM is obvious, except may be for the implementor).
> 
> I think that makes sense.  Care to send an appliable patch with
> documentation updates, please?

I just have another quiet evening, so I did that. Johannes, I changed your fix a bit: I see that argv[0] is used later (or if I'm blind and it actually isn't, it may be used in future: I have a feeling that builtint-checkout.c will be popular place).

 Documentation/git-checkout.txt |   18 +++++++++++++++---
 builtin-checkout.c             |   13 ++++++++-----
 t/t7201-co.sh                  |   23 ++++++++++++++++++++++-
 3 files changed, 45 insertions(+), 9 deletions(-)
Show changes to 3 files +45 −9

Documentation/git-checkout.txt, builtin-checkout.c, t/t7201-co.sh

diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 43d4502..d93a18f 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -64,9 +64,21 @@ OPTIONS
 	given. Set it to `always` if you want this behavior when the
 	start-point is either a local or remote branch.
 +
-If no '-b' option was given, a name will be made up for you, by stripping
-the part up to the first slash of the tracked branch.  For example, if you
-called 'git checkout --track origin/next', the branch name will be 'next'.
+If no '-b' option was given, the name of the new branch will be
+derived from the remote branch, by attempting to guess the name of the
+branch on remote system and use it. The algorithm will remove a
+prefixed refs/ and the part after refs/ up to a slash (that part
+usually being a branch namespace, which makes it confusing to use for
+branch names). If the part after refs/ was remotes/, than a part past
+it is stripped too (it is expected to be the name of remote system).
+Otherwise, the part up to the first slash is removed.
+The algorithm aborts either if the given name has no slashes in it or
+if the part left after stripping the prefixes is empty. In this case,
+the name should be provided with '-b'.
++
+For example, if you called 'git checkout --track origin/next', the
+branch name will be 'next', as it will for 'git checkout --track
+remotes/origin/next'.
 
 --no-track::
 	Ignore the branch.autosetupmerge configuration variable.
diff --git a/builtin-checkout.c b/builtin-checkout.c
index e95eab9..214b0b2 100644
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
@@ -445,12 +445,15 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 	/* --track without -b should DWIM */
 	if (opts.track && opts.track != -1 && !opts.new_branch) {
 		char *slash;
-		if (!argc || !strcmp(argv[0], "--"))
+		char *argv0 = argv[0];
+		if (!argc || !strcmp(argv0, "--"))
 			die ("--track needs a branch name");
-		slash = strchr(argv[0], '/');
-		if (slash && !prefixcmp(argv[0], "refs/"))
-			slash = strchr(slash + 1, '/');
-		if (slash && !prefixcmp(argv[0], "remotes/"))
+		slash = strchr(argv0, '/');
+		if (slash && !prefixcmp(argv0, "refs/")) {
+			argv0 = slash + 1;
+			slash = strchr(argv0, '/');
+		}
+		if (slash && !prefixcmp(argv0, "remotes/"))
 			slash = strchr(slash + 1, '/');
 		if (!slash || !slash[1])
 			die ("Missing branch name; try -b");
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index 943dd57..1dff84d 100755
--- a/t/t7201-co.sh
+++ b/t/t7201-co.sh
@@ -340,9 +340,30 @@ test_expect_success \
 test_expect_success \
     'checkout with --track fakes a sensible -b <name>' '
     git update-ref refs/remotes/origin/koala/bear renamer &&
+    git update-ref refs/new/koala/bear renamer &&
+
     git checkout --track origin/koala/bear &&
     test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
-    test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)"'
+    test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)" &&
+
+    git checkout master && git branch -D koala/bear &&
+
+    git checkout --track refs/remotes/origin/koala/bear &&
+    test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
+    test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)" &&
+
+    git checkout master && git branch -D koala/bear &&
+
+    git checkout --track remotes/origin/koala/bear &&
+    test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
+    test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)" &&
+
+    git checkout master && git branch -D koala/bear &&
+
+    git checkout --track refs/new/koala/bear &&
+    test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
+    test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)"
+'
 
 test_expect_success \
     'checkout with --track, but without -b, fails with too short tracked name' '
-- 
1.6.0.59.g8ae62
Junio C Hamano· Aug 22, 2008, 05:54 UTC · re: Alex Riesen · lore

Re: [PATCH] Extend "checkout --track" DWIM to support more cases

Alex Riesen <raa.lkml@gmail.com> writes:
Show 10 quoted lines
> The code handles additionally "refs/remotes/<something>/name",
> "remotes/<something>/name", and "refs/<namespace>/name".
>
> Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
> ---
> ...
> I just have another quiet evening, so I did that. Johannes, I changed
> your fix a bit: I see that argv[0] is used later (or if I'm blind and
> it actually isn't, it may be used in future: I have a feeling that
> builtint-checkout.c will be popular place).
Thanks; the documentation looks good to me.
Show 12 quoted lines
> +		char *argv0 = argv[0];
> +		if (!argc || !strcmp(argv0, "--"))
>  			die ("--track needs a branch name");
> +		slash = strchr(argv0, '/');
> +		if (slash && !prefixcmp(argv0, "refs/")) {
> +			argv0 = slash + 1;
> +			slash = strchr(argv0, '/');
> +		}
> +		if (slash && !prefixcmp(argv0, "remotes/"))
>  			slash = strchr(slash + 1, '/');
>  		if (!slash || !slash[1])
>  			die ("Missing branch name; try -b");
I however wonder if this is clearer.
 * "enum branch_track" was unsigned; comparing equality with -1 was Ok but
   we couldn't say 0 < opts.track;
 * argv[] is an array of constant strings; cannot point into it with
   opts.newbranch without making the latter also a constant string.
 * the logic is to strip "refs/" if there is one, "remotes/" if there is
   one after that, and then strip one level after that unconditionally.
   No need to look explicitly for a slash while doing the first two steps.
 cache.h            |    1 +
 builtin-checkout.c |   26 +++++++++++++-------------
 2 files changed, 14 insertions(+), 13 deletions(-)
Show changes to diff +14 −13
diff --git i/cache.h w/cache.h
index 928ae9f..a097a95 100644
--- i/cache.h
+++ w/cache.h
@@ -451,6 +451,7 @@ enum safe_crlf {
 extern enum safe_crlf safe_crlf;
 
 enum branch_track {
+	BRANCH_TRACK_UNSPECIFIED = -1,
 	BRANCH_TRACK_NEVER = 0,
 	BRANCH_TRACK_REMOTE,
 	BRANCH_TRACK_ALWAYS,
diff --git i/builtin-checkout.c w/builtin-checkout.c
index e95eab9..b380ad6 100644
--- i/builtin-checkout.c
+++ w/builtin-checkout.c
@@ -157,7 +157,7 @@ struct checkout_opts {
 	int force;
 	int writeout_error;
 
-	char *new_branch;
+	const char *new_branch;
 	int new_branch_log;
 	enum branch_track track;
 };
@@ -437,27 +437,27 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 
 	git_config(git_default_config, NULL);
 
-	opts.track = -1;
+	opts.track = BRANCH_TRACK_UNSPECIFIED;
 
 	argc = parse_options(argc, argv, options, checkout_usage,
 			     PARSE_OPT_KEEP_DASHDASH);
 
 	/* --track without -b should DWIM */
-	if (opts.track && opts.track != -1 && !opts.new_branch) {
-		char *slash;
-		if (!argc || !strcmp(argv[0], "--"))
+	if (0 < opts.track && !opts.new_branch) {
+		const char *argv0 = argv[0];
+		if (!argc || !strcmp(argv0, "--"))
 			die ("--track needs a branch name");
-		slash = strchr(argv[0], '/');
-		if (slash && !prefixcmp(argv[0], "refs/"))
-			slash = strchr(slash + 1, '/');
-		if (slash && !prefixcmp(argv[0], "remotes/"))
-			slash = strchr(slash + 1, '/');
-		if (!slash || !slash[1])
+		if (!prefixcmp(argv0, "refs/"))
+			argv0 += 5;
+		if (!prefixcmp(argv0, "remotes/"))
+			argv0 += 8;
+		argv0 = strchr(argv0, '/');
+		if (!argv0 || !argv0[1])
 			die ("Missing branch name; try -b");
-		opts.new_branch = slash + 1;
+		opts.new_branch = argv0 + 1;
 	}
 
-	if (opts.track == -1)
+	if (opts.track == BRANCH_TRACK_UNSPECIFIED)
 		opts.track = git_branch_track;
 
 	if (opts.force && opts.merge)
Alex Riesen· Aug 22, 2008, 09:08 UTC · re: Junio C Hamano · lore

Re: [PATCH] Extend "checkout --track" DWIM to support more cases

2008/8/22 Junio C Hamano <gitster@pobox.com>:
> I however wonder if this is clearer.
It is :)
Show 5 quoted lines
>  * "enum branch_track" was unsigned; comparing equality with -1 was Ok but
>   we couldn't say 0 < opts.track;
>
>  * argv[] is an array of constant strings; cannot point into it with
>   opts.newbranch without making the latter also a constant string.
Cleanup, but it is unrelated, isn't it?
>  * the logic is to strip "refs/" if there is one, "remotes/" if there is
>   one after that, and then strip one level after that unconditionally.
>   No need to look explicitly for a slash while doing the first two steps.
Maybe that should go in documentation instead of the piece I wrote
Junio C Hamano· Aug 22, 2008, 21:17 UTC · re: Alex Riesen · lore

Re: [PATCH] Extend "checkout --track" DWIM to support more cases

"Alex Riesen" <raa.lkml@gmail.com> writes:
Show 12 quoted lines
> 2008/8/22 Junio C Hamano <gitster@pobox.com>:
>> I however wonder if this is clearer.
>
> It is :)
>
>>  * "enum branch_track" was unsigned; comparing equality with -1 was Ok but
>>   we couldn't say 0 < opts.track;
>>
>>  * argv[] is an array of constant strings; cannot point into it with
>>   opts.newbranch without making the latter also a constant string.
>
> Cleanup, but it is unrelated, isn't it?
The code did not compile without it for me as I sometimes use -Werror.
Show 5 quoted lines
>>  * the logic is to strip "refs/" if there is one, "remotes/" if there is
>>   one after that, and then strip one level after that unconditionally.
>>   No need to look explicitly for a slash while doing the first two steps.
>
> Maybe that should go in documentation instead of the piece I wrote

Oh I think what you wrote is fine. I tried to be more descriptive than simply saying "No need to look explicitly for a slash" while explaining the changes.

Jay Soffian· Aug 22, 2008, 23:33 UTC · re: Alex Riesen · lore

Re: [PATCH] Extend "checkout --track" DWIM to support more cases

On Thu, Aug 21, 2008 at 1:23 PM, Alex Riesen <raa.lkml@gmail.com> wrote:
Show 6 quoted lines
> +If no '-b' option was given, the name of the new branch will be
> +derived from the remote branch, by attempting to guess the name of the
> +branch on remote system and use it. The algorithm will remove a
> +prefixed refs/ and the part after refs/ up to a slash (that part
> +usually being a branch namespace, which makes it confusing to use for
> +branch names). If the part after refs/ was remotes/, than a part past
s/than/then/
j.

← back to recent threads