Closed mweidling closed 2 years ago
and
git submodule update --init --remote
cannot handleeynollah
's default branchmain
(instead ofmaster
).
That is strange, branch names should not be an issue for submodules, they are linked to a specific commit SHA not branch name - can you post a link to the failing CI for this? Because we do essentially the same git submodule update --init
for most processors and git submodule update --init --recursive
for some specific projects in ocrd_all and it works there.
and
git submodule update --init --remote
cannot handleeynollah
's default branchmain
(instead ofmaster
).That is strange, branch names should not be an issue for submodules, they are linked to a specific commit SHA not branch name - can you post a link to the failing CI for this? Because we do essentially the same
git submodule update --init
for most processors andgit submodule update --init --recursive
for some specific projects in ocrd_all and it works there.
Mmh, I ran git submodule foreach 'git submodule update --init --remote'
(without the hack with the exit code) only locally and received
Unable to find current origin/master revision in submodule path 'eynollah'
Stopping at 'submodules/ocrd_all'; script returned non-zero status.
Do you think it's worth trying it again in a runner?
I guess this happens because the --remote
part - what is the purpose of that?
I guess this happens because the
--remote
part - what is the purpose of that?
You're right, it's because --remote
assumes that master
is the default branch. TBH i followed the instructions on https://git-scm.com/book/en/v2/Git-Tools-Submodules where they suggest using this flag, but while re-reading the docs I realized their case doesn't apply to ocrd_all.
However, removing the flag yields the old problem with cor-asv-ann
:
Entering 'submodules/ocrd_all/cor-asv-ann'
fatal: remote error: upload-pack: not our ref 66c4711918d4fe87cc200744b614e1757874f8f2
fatal: The remote end hung up unexpectedly
Fetched in submodule path 'data-processing', but it did not contain 66c4711918d4fe87cc200744b614e1757874f8f2. Direct fetching of that commit failed.
Stopping at 'submodules/ocrd_all/cor-asv-ann'; script returned non-zero status.
That's why || exit 0
still makes sense, I guess.
This PR implements cloning of all of
ocrd_all
's submodules which is necessary for the creation ofrepos.json
.It consists of the somewhat strange line
which causes the step to be always successful. This is necessary because
git submodule update --init --recursive
interferes with the private submodules incor-asv-ann
andgit submodule update --init --remote
cannot handleeynollah
's default branchmain
(instead ofmaster
). The necessary info for the creation ofrepos.json
is present, though.Closes #19.