Re: [PATCH v3 03/10] t5526: create superproject commits with test helper
From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2022-02-25 11:44:09
On Fri, Feb 25 2022, Glen Choo wrote:
Jonathan Tan [off-list ref] writes:quoted
Glen Choo [off-list ref] writes:quoted
+# For each superproject in the test setup, update its submodule, add the +# submodule and create a new commit with the submodule change. +# +# This requires add_submodule_commits() to be called first, otherwise +# the submodules will not have changed and cannot be "git add"-ed. +add_superproject_commits() { +( + cd submodule && + ( + cd subdir/deepsubmodule && + git fetch && + git checkout -q FETCH_HEAD + ) && + git add subdir/deepsubmodule && + git commit -m "new deep submodule" + ) &&The indentation looks off. Also, no need for "-q".Ah thanks. I think the "-q" is there to suppress the detached HEAD warning, which is very large. I'd prefer to keep it unless there are stronger reasons than "it's not needed for correctness".
FWIW I was going to comment on the -q, but didn't because you're just moving this around. I think even for large warnings it's fine to omit -q etc, since that's what --verbose (as in the test-lib.sh argument) is for. But in this case it's probably better to leave it as-is.