Re: [PATCH v2 2/2] t: Add test for cloning from ref namespace

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

 



On 05/06, Junio C Hamano wrote:
Johannes Löthberg <johannes@xxxxxxxxxxxx> writes:
 +++++++++++++++++++++++++++++++++

It seems that 5509 already has a few tests for namespaced transfer
in both directions.  Perhaps this new test would fit there better?


Missed that, will move it there.

Also I think it probably is better to have these as a single patch.


As you wish.

+		git add file &&
+		git commit -m "commit one" &&
+		git push ../bare master &&

You want to make sure not just "push" does not complain, but that it
left ../bare with the right result, i.e. something along the lines
of

		git -C ../bare symbolic-ref HEAD >actual &&
		echo refs/heads/master >expect &&
               test_cmp expect actual &&

		git -C ../bare rev-parse HEAD >actual &&
               git rev-parse HEAD >expect &&
               test_cmp expect actual &&



Hmm, it seems that git-rev-parse doesn't handle GIT_NAMESPACE yet, so can't check it for the namespaced push right now. Not sure if I can fix that myself though.

+	) &&
+	GIT_NAMESPACE=new_namespace git clone bare clone &&
+	(
+		cd clone &&
+		git show

Likewise on checking the result of the clone; not just it has HEAD
to cause "show" to succeed, you would want it shows the right commit
(i.e. not "one", but "two").  There may be other things you may want
to check, too.


--
Sincerely,
 Johannes Löthberg
 PGP Key ID: 0x50FB9B273A9D0BB5
 https://theos.kyriasis.com/~kyrias/

Attachment: signature.asc
Description: PGP signature


[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]