Re: [PATCH v3 09/10] fetch: fetch unpopulated, changed submodules

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

 



Hi,

On Sat, 26 Feb 2022, Junio C Hamano wrote:

> A few tests added by this patch have been failing on one specific
> job (linux-gcc ubuntu-latest) at GitHub CI.
>
> https://github.com/git/git/runs/5341052811?check_suite_focus=true#step:5:3968
> https://github.com/git/git/runs/5343133021?check_suite_focus=true#step:4:5520
>
>     Side note: you may need to be logged in to GitHub to view them.
>     These two use different versions of CI to show the test traces;
>     in the latter you may have to click on right-facing rectangle on
>     the line with label "5520" to see the breakage.
>
> I think there is some baked-in assumption in the failing test what
> the name of the initial branch by default is, which may be the reason
> why this particular job fails while others don't.
>
> Can you take a look at it?

The log says this:

-- snip --
[...]
  + git commit -m super-b2
  [main 00b85ba] super-b2
   Author: A U Thor <author@xxxxxxxxxxx>
   1 file changed, 1 insertion(+), 1 deletion(-)
  + cd same-name-downstream
  + git checkout same-name-2/master
  error: pathspec 'same-name-2/master' did not match any file(s) known to git
  error: last command exited with $?=1
  + git -C same-name-downstream checkout master
  error: pathspec 'master' did not match any file(s) known to git
  + eval_ret=1
  + :
  not ok 49 - fetch --recurse-submodules updates name-conflicted, populated submodule

  #
  #		test_when_finished "git -C same-name-downstream checkout master" &&
  #		(
  #			cd same-name-1 &&
  #			test_commit -C submodule --no-tag b1 &&
  #			git add submodule &&
  #			git commit -m "super-b1"
  #		) &&
  #		(
  #			cd same-name-2 &&
  #			test_commit -C submodule --no-tag b2 &&
  #			git add submodule &&
  #			git commit -m "super-b2"
  #		) &&
  #		(
  #			cd same-name-downstream &&
  #			# even though the .gitmodules is correct, we
  #			cannot
  #			# fetch from same-name-2
  #			git checkout same-name-2/master &&
  #			git fetch --recurse-submodules same-name-1 &&
  #			test_must_fail git fetch --recurse-submodules
  #			same-name-2
  #		) &&
  #		super_head1=$(git -C same-name-1 rev-parse HEAD) &&
  #		git -C same-name-downstream cat-file -e $super_head1 &&
  #
  #		super_head2=$(git -C same-name-2 rev-parse HEAD) &&
  #		git -C same-name-downstream cat-file -e $super_head2 &&
  #
  #		sub_head1=$(git -C same-name-1/submodule rev-parse HEAD)
  #		&&
  #		git -C same-name-downstream/submodule cat-file -e
  #		$sub_head1 &&
  #
  #		sub_head2=$(git -C same-name-2/submodule rev-parse HEAD)
  #		&&
  #		test_must_fail git -C same-name-downstream/submodule
  #		cat-file -e $sub_head2
  #
-- snap --

So yes, there is a lot of `master`ing going on.

I _think_ the remedy will be to use the `-b <branch-name>` option of `git
init` in
https://github.com/git/git/blob/82dd0cbc7fcf2985a3dcfbd99caa9f80626b00df/t/t5526-fetch-submodules.sh#L1015
in
https://github.com/git/git/blob/82dd0cbc7fcf2985a3dcfbd99caa9f80626b00df/t/t5526-fetch-submodules.sh#L1024
and in
https://github.com/git/git/blob/82dd0cbc7fcf2985a3dcfbd99caa9f80626b00df/t/t5526-fetch-submodules.sh#L1033
e.g.

	git -C submodule init -b main

At least that's how _I_ tried to address similar issues in the test suite
in the past.

Ciao,
Dscho




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

  Powered by Linux