Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6692e58

Browse files
committedJan 31, 2021
register-git-cache.sh: do_list_subrepos(): fix order of fields returned by do_list_remotes() to handle empty subdirnames better
1 parent d906cd0 commit 6692e58

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎register-git-cache.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ do_list_remotes() {
332332
[ -n "${REFREPODIR_MODE-}" ] && REFREPODIR_REPO="`get_subrepo_dir "$REPO"`" \
333333
&& { pushd "${REFREPODIR_BASE}/${REFREPODIR_REPO}" >/dev/null || exit $? ; }
334334
{ $CI_TIME git ls-remote "$REPO" || echo "[I] `date`: FAILED to 'git ls-remote $REPO' in '`pwd`'">&2 ; } \
335-
| awk -v REPODIR="${REFREPODIR_REPO}" -v REPO="${REPO}" '{print $1"\t"$2"\t"REPODIR"\t"REPO}' \
335+
| awk -v REPODIR="${REFREPODIR_REPO}" -v REPOURL="${REPO}" '{print $1"\t"$2"\t"REPOURL"\t"REPODIR}' \
336336
> "`mktemp --tmpdir="$TEMPDIR_REMOTES" remote-refs.XXXXXXXXXXXX`"
337337
# Note: the trailing column is empty for discoveries/runs without REFREPODIR
338338
# And we ignore here faults like absent remotes... or invalid Git dirs...
@@ -382,8 +382,8 @@ do_list_subrepos() {
382382
exit 1
383383
fi
384384

385-
do_list_remotes "$@" | while IFS="${TABCHAR}" read HASH GITREF REFREPODIR_REPO REPOURL ; do
386-
echo "===== Will check submodules (if any) under tip hash '$HASH' => '$GITREF' $REFREPODIR_REPO $REPOURL..." >&2
385+
do_list_remotes "$@" | while IFS="${TABCHAR}" read HASH GITREF REPOURL REFREPODIR_REPO ; do
386+
echo "===== Will check submodules (if any) under tip hash '$HASH' => '$GITREF' in '$REFREPODIR_REPO' for '$REPOURL'..." >&2
387387
# After pretty reporting, constrain the list to unique items for inspection
388388
echo "$HASH $REFREPODIR_REPO"
389389
done | sort | uniq | \

0 commit comments

Comments
 (0)
Please sign in to comment.