# HG changeset patch # User Kevin Bullock # Date 1366167641 18000 # Node ID 2b34d004e644fe7268c4ba3bfaae7e89f6c01d0b # Parent 811e253226c332ebcbc4dcf224861fa65096e0cf subrepo: add regression test for issue3870 diff -r 811e253226c3 -r 2b34d004e644 tests/test-subrepo-git.t --- a/tests/test-subrepo-git.t Tue Apr 16 22:00:05 2013 -0500 +++ b/tests/test-subrepo-git.t Tue Apr 16 22:00:41 2013 -0500 @@ -238,6 +238,31 @@ source ../gitroot revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc +create a new git branch + + $ cd s + $ git checkout -b b2 + Switched to a new branch 'b2' + $ echo a>a + $ git add a + $ git commit -qm 'add a' + $ cd .. + $ hg commit -m 'add branch in s' + +pulling new git branch should not create tracking branch named 'origin/b2' +(issue3870) + $ cd ../td/s + $ git remote set-url origin $TESTTMP/tb/s + $ cd .. + $ hg pull -q ../tb + $ hg up + From $TESTTMP/tb/s + * [new branch] b2 -> origin/b2 + Previous HEAD position was f47b465... merge + Switched to a new branch 'b2' + pulling subrepo s from $TESTTMP/tb/s + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + update to a revision without the subrepo, keeping the local git repository $ cd ../t