git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] refs: refs/worktree/* become per-worktree
@ 2015-08-11  4:56 David Turner
  2015-08-11  4:56 ` [PATCH v2 2/2] bisect: make bisection refs per-worktree David Turner
  2015-08-11 21:10 ` Re* [PATCH v2 1/2] refs: refs/worktree/* become per-worktree Junio C Hamano
  0 siblings, 2 replies; 6+ messages in thread
From: David Turner @ 2015-08-11  4:56 UTC (permalink / raw)
  To: git, pclouds, mhagger, Christian Couder; +Cc: David Turner

We need a place to stick refs for bisects in progress that is not
shared between worktrees.  So we use the refs/worktree/ hierarchy.

The is_per_worktree_ref function and associated docs learn that
refs/worktree/ is per-worktree, as does the git_path code in path.c

The ref-packing functions learn that refs beginning with
refs/worktree/ should not be packed (since packed-refs is common
rather than per-worktree).

Signed-off-by: David Turner <dturner@twopensource.com>
---

This implements the very simple solution of making refs/worktree/
per-worktree, as we discussed on the PATCH/RFC first version of this
patch.

Note that git for-each-ref may have inconsistent behavior (I think; I
haven't confirmed this), sometimes showing refs/worktree/* and sometimes
not.  In the long run, we should fix this, but right now, I don't know
that it matters, since the only refs affected are these bisect refs.

---
 Documentation/glossary-content.txt |  5 +++--
 path.c                             | 15 ++++++++++++---
 refs.c                             |  7 ++++++-
 t/t1400-update-ref.sh              | 16 ++++++++++++++++
 t/t3210-pack-refs.sh               |  7 +++++++
 5 files changed, 44 insertions(+), 6 deletions(-)

diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt
index 8c6478b..5c707e6 100644
--- a/Documentation/glossary-content.txt
+++ b/Documentation/glossary-content.txt
@@ -413,8 +413,9 @@ exclude;;
 
 [[def_per_worktree_ref]]per-worktree ref::
 	Refs that are per-<<def_working_tree,worktree>>, rather than
-	global.  This is presently only <<def_HEAD,HEAD>>, but might
-	later include other unusual refs.
+	global.  This is presently only <<def_HEAD,HEAD>> and any refs
+	that start with `refs/worktree/`, but might later include other
+	unusual refs.
 
 [[def_pseudoref]]pseudoref::
 	Pseudorefs are a class of files under `$GIT_DIR` which behave
diff --git a/path.c b/path.c
index 10f4cbf..da0f767 100644
--- a/path.c
+++ b/path.c
@@ -92,8 +92,9 @@ static void replace_dir(struct strbuf *buf, int len, const char *newdir)
 }
 
 static const char *common_list[] = {
+	"/refs", /* special case, since refs/worktree/ is per-worktree */
 	"/branches", "/hooks", "/info", "!/logs", "/lost-found",
-	"/objects", "/refs", "/remotes", "/worktrees", "/rr-cache", "/svn",
+	"/objects", "/remotes", "/worktrees", "/rr-cache", "/svn",
 	"config", "!gc.pid", "packed-refs", "shallow",
 	NULL
 };
@@ -116,8 +117,16 @@ static void update_common_dir(struct strbuf *buf, int git_dir_len)
 			is_dir = 1;
 		}
 		if (is_dir && dir_prefix(base, path)) {
-			replace_dir(buf, git_dir_len, get_git_common_dir());
-			return;
+			/*
+			 * The first entry in common_list is refs, and
+			 * refs/worktree is *not* common.
+			 */
+
+			if (p != common_list ||
+			    !dir_prefix(base, "refs/worktree")) {
+				replace_dir(buf, git_dir_len, get_git_common_dir());
+				return;
+			}
 		}
 		if (!is_dir && !strcmp(base, path)) {
 			replace_dir(buf, git_dir_len, get_git_common_dir());
diff --git a/refs.c b/refs.c
index e6fc3fe..d43bfe1 100644
--- a/refs.c
+++ b/refs.c
@@ -2656,6 +2656,10 @@ static int pack_if_possible_fn(struct ref_entry *entry, void *cb_data)
 	struct ref_entry *packed_entry;
 	int is_tag_ref = starts_with(entry->name, "refs/tags/");
 
+	/* Do not pack per-worktree refs: */
+	if (starts_with(entry->name, "refs/worktree/"))
+		return 0;
+
 	/* ALWAYS pack tags */
 	if (!(cb->flags & PACK_REFS_ALL) && !is_tag_ref)
 		return 0;
@@ -2850,7 +2854,8 @@ static int delete_ref_loose(struct ref_lock *lock, int flag, struct strbuf *err)
 
 static int is_per_worktree_ref(const char *refname)
 {
-	return !strcmp(refname, "HEAD");
+	return !strcmp(refname, "HEAD") ||
+		starts_with(refname, "refs/worktree/");
 }
 
 static int is_pseudoref_syntax(const char *refname)
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index 9d21c19..c9fd1ca 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -1131,4 +1131,20 @@ test_expect_success ULIMIT_FILE_DESCRIPTORS 'large transaction deleting branches
 )
 '
 
+test_expect_success 'handle per-worktree refs in refs/worktree' '
+	git commit --allow-empty -m "initial commit" &&
+	git worktree add -b branch worktree &&
+	(
+		cd worktree &&
+		git commit --allow-empty -m "test commit"  &&
+		git update-ref refs/worktree/something HEAD &&
+		git rev-parse refs/worktree/something > ../worktree-head
+	) &&
+	! test -e .git/refs/worktree &&
+	test_must_fail git rev-parse refs/worktree/something &&
+	git update-ref refs/worktree/something HEAD &&
+	git rev-parse refs/worktree/something > main-head &&
+	! test_cmp main-head worktree-head
+'
+
 test_done
diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh
index 8aae98d..c54cd29 100755
--- a/t/t3210-pack-refs.sh
+++ b/t/t3210-pack-refs.sh
@@ -160,6 +160,13 @@ test_expect_success 'pack ref directly below refs/' '
 	test_path_is_missing .git/refs/top
 '
 
+test_expect_success 'do not pack ref in refs/worktree' '
+	git update-ref refs/worktree/local HEAD &&
+	git pack-refs --all --prune &&
+	! grep refs/worktree/local .git/packed-refs >/dev/null &&
+	test_path_is_file .git/refs/worktree/local
+'
+
 test_expect_success 'disable reflogs' '
 	git config core.logallrefupdates false &&
 	rm -rf .git/logs
-- 
2.0.4.315.gad8727a-twtrsrc

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/2] bisect: make bisection refs per-worktree
  2015-08-11  4:56 [PATCH v2 1/2] refs: refs/worktree/* become per-worktree David Turner
@ 2015-08-11  4:56 ` David Turner
  2015-08-11 21:10 ` Re* [PATCH v2 1/2] refs: refs/worktree/* become per-worktree Junio C Hamano
  1 sibling, 0 replies; 6+ messages in thread
From: David Turner @ 2015-08-11  4:56 UTC (permalink / raw)
  To: git, pclouds, mhagger, Christian Couder; +Cc: David Turner

Using the new refs/worktree/ refs, make bisection per-worktree.

Signed-off-by: David Turner <dturner@twopensource.com>
---
 Documentation/git-bisect.txt       |  4 ++--
 Documentation/rev-list-options.txt | 14 +++++++-------
 bisect.c                           |  2 +-
 builtin/rev-parse.c                |  6 ++++--
 revision.c                         |  2 +-
 t/t6030-bisect-porcelain.sh        | 20 ++++++++++----------
 6 files changed, 25 insertions(+), 23 deletions(-)

diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
index e97f2de..f0c52d1 100644
--- a/Documentation/git-bisect.txt
+++ b/Documentation/git-bisect.txt
@@ -82,7 +82,7 @@ to ask for the next commit that needs testing.
 
 Eventually there will be no more revisions left to inspect, and the
 command will print out a description of the first bad commit. The
-reference `refs/bisect/bad` will be left pointing at that commit.
+reference `refs/worktree/bisect/bad` will be left pointing at that commit.
 
 
 Bisect reset
@@ -373,7 +373,7 @@ on a single line.
 ------------
 $ git bisect start HEAD <known-good-commit> [ <boundary-commit> ... ] --no-checkout
 $ git bisect run sh -c '
-	GOOD=$(git for-each-ref "--format=%(objectname)" refs/bisect/good-*) &&
+	GOOD=$(git for-each-ref "--format=%(objectname)" refs/worktree/bisect/good-*) &&
 	git rev-list --objects BISECT_HEAD --not $GOOD >tmp.$$ &&
 	git pack-objects --stdout >/dev/null <tmp.$$
 	rc=$?
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index a9b808f..1175960 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -183,9 +183,9 @@ explicitly.
 
 ifndef::git-rev-list[]
 --bisect::
-	Pretend as if the bad bisection ref `refs/bisect/bad`
+	Pretend as if the bad bisection ref `refs/worktree/bisect/bad`
 	was listed and as if it was followed by `--not` and the good
-	bisection refs `refs/bisect/good-*` on the command
+	bisection refs `refs/worktree/bisect/good-*` on the command
 	line. Cannot be combined with --first-parent.
 endif::git-rev-list[]
 
@@ -548,10 +548,10 @@ Bisection Helpers
 --bisect::
 	Limit output to the one commit object which is roughly halfway between
 	included and excluded commits. Note that the bad bisection ref
-	`refs/bisect/bad` is added to the included commits (if it
-	exists) and the good bisection refs `refs/bisect/good-*` are
+	`refs/worktree/bisect/bad` is added to the included commits (if it
+	exists) and the good bisection refs `refs/worktree/bisect/good-*` are
 	added to the excluded commits (if they exist). Thus, supposing there
-	are no refs in `refs/bisect/`, if
+	are no refs in `refs/worktree/bisect/`, if
 +
 -----------------------------------------------------------------------
 	$ git rev-list --bisect foo ^bar ^baz
@@ -571,7 +571,7 @@ one. Cannot be combined with --first-parent.
 
 --bisect-vars::
 	This calculates the same as `--bisect`, except that refs in
-	`refs/bisect/` are not used, and except that this outputs
+	`refs/worktree/bisect/` are not used, and except that this outputs
 	text ready to be eval'ed by the shell. These lines will assign the
 	name of the midpoint revision to the variable `bisect_rev`, and the
 	expected number of commits to be tested after `bisect_rev` is tested
@@ -584,7 +584,7 @@ one. Cannot be combined with --first-parent.
 --bisect-all::
 	This outputs all the commit objects between the included and excluded
 	commits, ordered by their distance to the included and excluded
-	commits. Refs in `refs/bisect/` are not used. The farthest
+	commits. Refs in `refs/worktree/bisect/` are not used. The farthest
 	from them is displayed first. (This is the only one displayed by
 	`--bisect`.)
 +
diff --git a/bisect.c b/bisect.c
index 33ac88d..dbe3461 100644
--- a/bisect.c
+++ b/bisect.c
@@ -425,7 +425,7 @@ static int register_ref(const char *refname, const struct object_id *oid,
 
 static int read_bisect_refs(void)
 {
-	return for_each_ref_in("refs/bisect/", register_ref, NULL);
+	return for_each_ref_in("refs/worktree/bisect/", register_ref, NULL);
 }
 
 static void read_bisect_paths(struct argv_array *array)
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index 02d747d..3240ddf 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -663,8 +663,10 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
 				continue;
 			}
 			if (!strcmp(arg, "--bisect")) {
-				for_each_ref_in("refs/bisect/bad", show_reference, NULL);
-				for_each_ref_in("refs/bisect/good", anti_reference, NULL);
+				for_each_ref_in("refs/worktree/bisect/bad",
+						show_reference, NULL);
+				for_each_ref_in("refs/worktree/bisect/good",
+						anti_reference, NULL);
 				continue;
 			}
 			if (starts_with(arg, "--branches=")) {
diff --git a/revision.c b/revision.c
index b6b2cf7..974a11f 100644
--- a/revision.c
+++ b/revision.c
@@ -2084,7 +2084,7 @@ extern void read_bisect_terms(const char **bad, const char **good);
 static int for_each_bisect_ref(const char *submodule, each_ref_fn fn, void *cb_data, const char *term) {
 	struct strbuf bisect_refs = STRBUF_INIT;
 	int status;
-	strbuf_addf(&bisect_refs, "refs/bisect/%s", term);
+	strbuf_addf(&bisect_refs, "refs/worktree/bisect/%s", term);
 	status = for_each_ref_in_submodule(submodule, bisect_refs.buf, fn, cb_data);
 	strbuf_release(&bisect_refs);
 	return status;
diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
index 9e2c203..bfd5463 100755
--- a/t/t6030-bisect-porcelain.sh
+++ b/t/t6030-bisect-porcelain.sh
@@ -68,7 +68,7 @@ test_expect_success 'bisect fails if given any junk instead of revs' '
 	git bisect reset &&
 	test_must_fail git bisect start foo $HASH1 -- &&
 	test_must_fail git bisect start $HASH4 $HASH1 bar -- &&
-	test -z "$(git for-each-ref "refs/bisect/*")" &&
+	test -z "$(git for-each-ref "refs/worktree/bisect/*")" &&
 	test -z "$(ls .git/BISECT_* 2>/dev/null)" &&
 	git bisect start &&
 	test_must_fail git bisect good foo $HASH1 &&
@@ -77,7 +77,7 @@ test_expect_success 'bisect fails if given any junk instead of revs' '
 	test_must_fail git bisect bad $HASH3 $HASH4 &&
 	test_must_fail git bisect skip bar $HASH3 &&
 	test_must_fail git bisect skip $HASH1 foo &&
-	test -z "$(git for-each-ref "refs/bisect/*")" &&
+	test -z "$(git for-each-ref "refs/worktree/bisect/*")" &&
 	git bisect good $HASH1 &&
 	git bisect bad $HASH4
 '
@@ -115,7 +115,7 @@ test_expect_success 'bisect reset removes packed refs' '
 	git pack-refs --all --prune &&
 	git bisect next &&
 	git bisect reset &&
-	test -z "$(git for-each-ref "refs/bisect/*")" &&
+	test -z "$(git for-each-ref "refs/worktree/bisect/*")" &&
 	test -z "$(git for-each-ref "refs/heads/bisect")"
 '
 
@@ -126,7 +126,7 @@ test_expect_success 'bisect reset removes bisect state after --no-checkout' '
 	git bisect bad $HASH3 &&
 	git bisect next &&
 	git bisect reset &&
-	test -z "$(git for-each-ref "refs/bisect/*")" &&
+	test -z "$(git for-each-ref "refs/worktree/bisect/*")" &&
 	test -z "$(git for-each-ref "refs/heads/bisect")" &&
 	test -z "$(git for-each-ref "BISECT_HEAD")"
 '
@@ -176,7 +176,7 @@ test_expect_success 'bisect start: no ".git/BISECT_START" if checkout error' '
 	git branch > branch.output &&
 	grep "* other" branch.output > /dev/null &&
 	test_must_fail test -e .git/BISECT_START &&
-	test -z "$(git for-each-ref "refs/bisect/*")" &&
+	test -z "$(git for-each-ref "refs/worktree/bisect/*")" &&
 	git checkout HEAD hello
 '
 
@@ -671,7 +671,7 @@ test_expect_success 'bisect: --no-checkout - target before breakage' '
 	git bisect bad BISECT_HEAD &&
 	check_same BROKEN_HASH5 BISECT_HEAD &&
 	git bisect bad BISECT_HEAD &&
-	check_same BROKEN_HASH5 bisect/bad &&
+	check_same BROKEN_HASH5 refs/worktree/bisect/bad &&
 	git bisect reset
 '
 
@@ -682,7 +682,7 @@ test_expect_success 'bisect: --no-checkout - target in breakage' '
 	git bisect bad BISECT_HEAD &&
 	check_same BROKEN_HASH5 BISECT_HEAD &&
 	git bisect good BISECT_HEAD &&
-	check_same BROKEN_HASH6 bisect/bad &&
+	check_same BROKEN_HASH6 refs/worktree/bisect/bad &&
 	git bisect reset
 '
 
@@ -693,7 +693,7 @@ test_expect_success 'bisect: --no-checkout - target after breakage' '
 	git bisect good BISECT_HEAD &&
 	check_same BROKEN_HASH8 BISECT_HEAD &&
 	git bisect good BISECT_HEAD &&
-	check_same BROKEN_HASH9 bisect/bad &&
+	check_same BROKEN_HASH9 refs/worktree/bisect/bad &&
 	git bisect reset
 '
 
@@ -702,13 +702,13 @@ test_expect_success 'bisect: demonstrate identification of damage boundary' "
 	git checkout broken &&
 	git bisect start broken master --no-checkout &&
 	git bisect run \"\$SHELL_PATH\" -c '
-		GOOD=\$(git for-each-ref \"--format=%(objectname)\" refs/bisect/good-*) &&
+		GOOD=\$(git for-each-ref \"--format=%(objectname)\" refs/worktree/bisect/good-*) &&
 		git rev-list --objects BISECT_HEAD --not \$GOOD >tmp.\$\$ &&
 		git pack-objects --stdout >/dev/null < tmp.\$\$
 		rc=\$?
 		rm -f tmp.\$\$
 		test \$rc = 0' &&
-	check_same BROKEN_HASH6 bisect/bad &&
+	check_same BROKEN_HASH6 refs/worktree/bisect/bad &&
 	git bisect reset
 "
 
-- 
2.0.4.315.gad8727a-twtrsrc

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re* [PATCH v2 1/2] refs: refs/worktree/* become per-worktree
  2015-08-11  4:56 [PATCH v2 1/2] refs: refs/worktree/* become per-worktree David Turner
  2015-08-11  4:56 ` [PATCH v2 2/2] bisect: make bisection refs per-worktree David Turner
@ 2015-08-11 21:10 ` Junio C Hamano
  2015-08-11 21:42   ` David Turner
  2015-08-11 21:43   ` David Turner
  1 sibling, 2 replies; 6+ messages in thread
From: Junio C Hamano @ 2015-08-11 21:10 UTC (permalink / raw)
  To: David Turner; +Cc: git, pclouds, mhagger, Christian Couder

David Turner <dturner@twopensource.com> writes:

> We need a place to stick refs for bisects in progress that is not
> shared between worktrees.  So we use the refs/worktree/ hierarchy.

This is by itself OK, but to help existing Porcelains, most notably
"gitk", I think refs/bisect/ hierarchy should be treated the same
way.  Moving them out of refs/bisect/ to refs/worktree/bisect/ would
not be a good idea.

Because refs/worktree/ hierarchy is not needed right now, I think we
can even live with just special casing refs/bisect/ the way this
patch does, without adding refs/worktree/ support at this point.

> Note that git for-each-ref may have inconsistent behavior (I think; I
> haven't confirmed this), sometimes showing refs/worktree/* and sometimes
> not.  In the long run, we should fix this, but right now, I don't know
> that it matters, since the only refs affected are these bisect refs.

We should fix that before this hits 'master', preferrably before
this hits 'next', especially if we add support for the more generic
refs/worktree/.  If it is only for refs/bisect/, we might be OK, but
I didn't think things through.

> diff --git a/path.c b/path.c
> index 10f4cbf..da0f767 100644
> --- a/path.c
> +++ b/path.c
> @@ -92,8 +92,9 @@ static void replace_dir(struct strbuf *buf, int len, const char *newdir)
>  }
>  
>  static const char *common_list[] = {
> +	"/refs", /* special case, since refs/worktree/ is per-worktree */
>  	"/branches", "/hooks", "/info", "!/logs", "/lost-found",
> -	"/objects", "/refs", "/remotes", "/worktrees", "/rr-cache", "/svn",
> +	"/objects", "/remotes", "/worktrees", "/rr-cache", "/svn",
>  	"config", "!gc.pid", "packed-refs", "shallow",
>  	NULL
>  };

This is not a new problem, but we probably should use a data
structure that is more performant than a linear list for this.

Also "!gc.pid" hack should be cleaned up.  It does not make much
sense to force all the calls to git_path() pay the price of checking
if each element in common-list begins with '!' and skip, even though
that '!' hack is only used in count-objects and nowhere else.

> diff --git a/refs.c b/refs.c
> index e6fc3fe..d43bfe1 100644
> --- a/refs.c
> +++ b/refs.c
> @@ -2656,6 +2656,10 @@ static int pack_if_possible_fn(struct ref_entry *entry, void *cb_data)
>  	struct ref_entry *packed_entry;
>  	int is_tag_ref = starts_with(entry->name, "refs/tags/");
>  
> +	/* Do not pack per-worktree refs: */
> +	if (starts_with(entry->name, "refs/worktree/"))
> +		return 0;

This should use is_per_worktree_ref(), no?

> diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
> index 9d21c19..c9fd1ca 100755
> --- a/t/t1400-update-ref.sh
> +++ b/t/t1400-update-ref.sh
> @@ -1131,4 +1131,20 @@ test_expect_success ULIMIT_FILE_DESCRIPTORS 'large transaction deleting branches
>  )
>  '
>  
> +test_expect_success 'handle per-worktree refs in refs/worktree' '
> +	git commit --allow-empty -m "initial commit" &&
> +	git worktree add -b branch worktree &&
> +	(
> +		cd worktree &&
> +		git commit --allow-empty -m "test commit"  &&
> +		git update-ref refs/worktree/something HEAD &&
> +		git rev-parse refs/worktree/something > ../worktree-head

Redirection '>', '>>', '<' etc. sticks to the pathname that comes
after it.

> +	) &&
> +	! test -e .git/refs/worktree &&
> +	test_must_fail git rev-parse refs/worktree/something &&
> +	git update-ref refs/worktree/something HEAD &&
> +	git rev-parse refs/worktree/something > main-head &&

Ditto.

Thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re* [PATCH v2 1/2] refs: refs/worktree/* become per-worktree
  2015-08-11 21:10 ` Re* [PATCH v2 1/2] refs: refs/worktree/* become per-worktree Junio C Hamano
@ 2015-08-11 21:42   ` David Turner
  2015-08-11 22:26     ` Junio C Hamano
  2015-08-11 21:43   ` David Turner
  1 sibling, 1 reply; 6+ messages in thread
From: David Turner @ 2015-08-11 21:42 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, pclouds, mhagger, Christian Couder

On Tue, 2015-08-11 at 14:10 -0700, Junio C Hamano wrote:
> David Turner <dturner@twopensource.com> writes:
> 
> > We need a place to stick refs for bisects in progress that is not
> > shared between worktrees.  So we use the refs/worktree/ hierarchy.
> 
> This is by itself OK, but to help existing Porcelains, most notably
> "gitk", I think refs/bisect/ hierarchy should be treated the same
> way.  Moving them out of refs/bisect/ to refs/worktree/bisect/ would
> not be a good idea.

What does gitk do that's relevant here?

> Because refs/worktree/ hierarchy is not needed right now, I think we
> can even live with just special casing refs/bisect/ the way this
> patch does, without adding refs/worktree/ support at this point.

There are a few reasons for refs/worktree hierarchy:

1. To make it easy to see the behavior of a ref at a glance.
2. To avoid too many different special-cases.

It's true that special-casing refs/bisect would make for fewer code
changes for now, but I am worried that next week we'll discover a new
situation where we'll want per-worktree refs and then we'll have to add
more special-cases.

> > Note that git for-each-ref may have inconsistent behavior (I think; I
> > haven't confirmed this), sometimes showing refs/worktree/* and sometimes
> > not.  In the long run, we should fix this, but right now, I don't know
> > that it matters, since the only refs affected are these bisect refs.
> 
> We should fix that before this hits 'master', preferrably before
> this hits 'next', especially if we add support for the more generic
> refs/worktree/.  If it is only for refs/bisect/, we might be OK, but
> I didn't think things through.

I will do this.  Should for-each-ref include or exclude these refs?  One
simple way to do "include" is to always create the refs/worktree
directory (when creating refs/).  

I'll also fix the rest of the things you suggested.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re* [PATCH v2 1/2] refs: refs/worktree/* become per-worktree
  2015-08-11 21:10 ` Re* [PATCH v2 1/2] refs: refs/worktree/* become per-worktree Junio C Hamano
  2015-08-11 21:42   ` David Turner
@ 2015-08-11 21:43   ` David Turner
  1 sibling, 0 replies; 6+ messages in thread
From: David Turner @ 2015-08-11 21:43 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, pclouds, mhagger, Christian Couder

On Tue, 2015-08-11 at 14:10 -0700, Junio C Hamano wrote:
> David Turner <dturner@twopensource.com> writes:

P.S. I noticed an issue with patch 2/2; I had reverted a now-unnecessary
hack, but accidentally reverted the whole file.  So I'll need to re-roll
anyway.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re* [PATCH v2 1/2] refs: refs/worktree/* become per-worktree
  2015-08-11 21:42   ` David Turner
@ 2015-08-11 22:26     ` Junio C Hamano
  0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2015-08-11 22:26 UTC (permalink / raw)
  To: David Turner; +Cc: git, pclouds, mhagger, Christian Couder

David Turner <dturner@twopensource.com> writes:

> What does gitk do that's relevant here?

Ahh, my mistake.  "gitk" spawned from "bisect visualize" is not even
aware of the fact that it is showing the revision ranges delimited
by the bisect references.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-08-11 22:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-11  4:56 [PATCH v2 1/2] refs: refs/worktree/* become per-worktree David Turner
2015-08-11  4:56 ` [PATCH v2 2/2] bisect: make bisection refs per-worktree David Turner
2015-08-11 21:10 ` Re* [PATCH v2 1/2] refs: refs/worktree/* become per-worktree Junio C Hamano
2015-08-11 21:42   ` David Turner
2015-08-11 22:26     ` Junio C Hamano
2015-08-11 21:43   ` David Turner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).