From: Johannes Löthberg <hidden> Date: 2016-06-15 23:05:05
Each ref namespace have their own separate branches, tags, and HEAD, so
when pushing to a namespace we need to make sure that there exists a
HEAD ref for the namespace, otherwise you will not be able to check out
the repo after cloning from a namespace
---
So, I have absolutely no clue where this should actually be put, so I
just put it where it fit for now.
Any comments on where to put it, or comments on the patch in general?
builtin/receive-pack.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
From: Michael J Gruber <hidden> Date: 2016-06-15 23:05:09
Johannes Löthberg venit, vidit, dixit 05.06.2015 13:53:
Ping.
--
Sincerely,
Johannes Löthberg
(Sent from my phone.)
It appears your patch proposes to fix a problem. It's a good idea to
expose the problem by writing a test so that one can check that the fix
actually fixes the problem.
(Also, your patch duplicates the line "struct strbuf namespaced_head_buf
= STRBUF_INIT;")
Michael
From: Johannes Löthberg <hidden> Date: 2016-06-15 23:05:09
On 05/06, Michael J Gruber wrote:
It appears your patch proposes to fix a problem. It's a good idea to
expose the problem by writing a test so that one can check that the fix
actually fixes the problem.
Right, will look into writing a test for it.
(Also, your patch duplicates the line "struct strbuf
namespaced_head_buf
= STRBUF_INIT;")
Hmm, that's weird, no clue how that happened. Thanks.
--
Sincerely,
Johannes Löthberg
PGP Key ID: 0x50FB9B273A9D0BB5
https://theos.kyriasis.com/~kyrias/
From: Johannes Löthberg <hidden> Date: 2016-06-15 23:05:09
On 05/06, Michael J Gruber wrote:
(Also, your patch duplicates the line "struct strbuf namespaced_head_buf
= STRBUF_INIT;")
I replied too soon, it doesn't duplicate it, it's a different variable
named similarly.
--
Sincerely,
Johannes Löthberg
PGP Key ID: 0x50FB9B273A9D0BB5
https://theos.kyriasis.com/~kyrias/
From: Johannes Löthberg <hidden> Date: 2016-06-15 23:05:09
Since v1:
* Added a test case
Johannes Löthberg (2):
receive-pack: Create a HEAD ref for ref namespace
t: Add test for cloning from ref namespace
builtin/receive-pack.c | 12 +++++++++++-
t/t9904-clone-from-ref-namespace.sh | 33 +++++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 1 deletion(-)
create mode 100755 t/t9904-clone-from-ref-namespace.sh
--
2.4.2
From: Johannes Löthberg <hidden> Date: 2016-06-15 23:05:09
Each ref namespace have their own separate branches, tags, and HEAD, so
when pushing to a namespace we need to make sure that there exists a
HEAD ref for the namespace, otherwise you will not be able to check out
the repo after cloning from a namespace
Signed-off-by: Johannes Löthberg <redacted>
---
builtin/receive-pack.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
From: Johannes Löthberg <hidden> Date: 2016-06-15 23:05:09
Test that the master ref is set up properly when cloning from a ref
namespace
Signed-off-by: Johannes Löthberg <redacted>
---
t/t9904-clone-from-ref-namespace.sh | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100755 t/t9904-clone-from-ref-namespace.sh
From: Johannes Löthberg <hidden> Date: 2016-06-15 23:05:09
Each ref namespace have their own separate branches, tags, and HEAD, so
when pushing to a namespace we need to make sure that there exists a
HEAD ref for the namespace, otherwise you will not be able to check out
the repo after cloning from a namespace
Signed-off-by: Johannes Löthberg <redacted>
---
since v2:
* Added test case in t5509
* Check that the remote refs get set properly in the test
builtin/receive-pack.c | 12 +++++++++-
t/t5509-fetch-push-namespaces.sh | 49 +++++++++++++++++++++++++++++++++++++++-
2 files changed, 59 insertions(+), 2 deletions(-)
From: Johannes Löthberg <hidden> Date: 2016-06-15 23:05:09
I should also look into why the other tests in t5509 fail later.
--
Sincerely,
Johannes Löthberg
PGP Key ID: 0x50FB9B273A9D0BB5
https://theos.kyriasis.com/~kyrias/
From: Johannes Löthberg <hidden> Date: 2016-06-15 23:05:09
Each ref namespace have their own separate branches, tags, and HEAD, so
when pushing to a namespace we need to make sure that there exists a
HEAD ref for the namespace, otherwise you will not be able to check out
the repo after cloning from a namespace
Signed-off-by: Johannes Löthberg <redacted>
---
Changes since v3:
test:
* Use a single printf statement
* Check that the contents of the file and sha of the commits in the
initial and cloned repositories matches
builtin/receive-pack.c | 12 +++++++++-
t/t5509-fetch-push-namespaces.sh | 50 +++++++++++++++++++++++++++++++++++++++-
2 files changed, 60 insertions(+), 2 deletions(-)
From: Johannes Löthberg <hidden> Date: 2016-06-15 23:05:15
On 05/06, Johannes Löthberg wrote:
Each ref namespace have their own separate branches, tags, and HEAD, so
when pushing to a namespace we need to make sure that there exists a
HEAD ref for the namespace, otherwise you will not be able to check out
the repo after cloning from a namespace
Signed-off-by: Johannes Löthberg <redacted>
---
Changes since v3:
test:
* Use a single printf statement
* Check that the contents of the file and sha of the commits in the
initial and cloned repositories matches