On Fri, Jan 31, 2025 at 5:53 AM Patrick Steinhardt <ps@xxxxxx> wrote: > Refactor the function setup_upstream_and_workbench(), extracting > create_upstream_template() and setup_upstream() from it. The former is > used to create the upstream repository template, while the latter is > used to rebuild the upstream repository and will be reused in subsequent > commits. > > To ensure that setup_upstream() works properly in both local and HTTP > protocols, the HTTP settings have been moved to the setup_upstream() and > setup_upstream_and_workbench() functions. > > Signed-off-by: Jiang Xin <zhiyou.jx@xxxxxxxxxxxxxxx> > Signed-off-by: Patrick Steinhardt <ps@xxxxxx> > --- > diff --git a/t/t5548-push-porcelain.sh b/t/t5548-push-porcelain.sh > @@ -54,29 +54,67 @@ format_and_save_expect () { > setup_upstream_and_workbench () { > + if test $# -ne 1 > + then > + BUG "location of upstream repository is not provided" > + fi && It's not clear why &&-chaining is being used here considering that this function is not called by any tests and is itself not linked into any &&-chains, hence the use of && is superfluous and misleading. > + # Assign the first argument to the variable upstream; > + # we will use it in the subsequent test cases. > + upstream="$1" Comment doesn't seem to add any value. (Neither of these are worth a reroll on their own.)