Skip to content

Conversation

EliahKagan
Copy link
Member

Instead of git remote.

Since Git 2.51.0, path collisions in remote names are automatically detected and rejected when git remote add is used to attempt to add them, since creating such collisions is usually unintentional: git/git@a5a727c

However, we deliberately do this in our test suite, in the make_remote_config_repos.sh fixture script. When Git 2.51.0 came to be used on CI, some new test failures arose as a result, as observed in #2130.

This fixes the script by using two git config commands rather than a git remote command to produce the overlap. This technique is (intentionally) still allowed in Git 2.51.0.

Starting in Git 2.51.0, at least one of the `git remote` commands
in the `make_remote_config_repos.sh` fixutre script fails, which
causes a subsequently run command depending on it to fail. This is
the cause of the CI failures observed in GitoxideLabs#2130.

But when any command fails, the intention is that the script fails
fast. To help achieve this, `set -e` is used. But the rules for
`set -e` have a number of exceptions. At least in some versions of
`bash`, the way `&&` was being used kept it from failing fast.

This changes that to run the commands separately, surfacing the
specific `git remote` command that fails, rather than a subsequent
command that fails later as a result of the first failure.
Instead of `git remote`.

Since Git 2.51.0, path collisions in remote names are automatically
detected and rejected when `git remote add` is used to attempt to
add them, since creating such collisions is usually unintentional:
git/git@a5a727c

However, we deliberately do this in our test suite, in the
`make_remote_config_repos.sh` fixture script. When Git 2.51.0 came
to be used on CI, some new test failures arose as a result, as
observed in GitoxideLabs#2130.

This fixes the script by using two `git config` commands rather
than a `git remote` command to produce the overlap. This technique
is (intentionally) still allowed in Git 2.51.0.
This was regenerated via `cargo nextest --workspace --no-fail-fast`
and verifying that there were no failures, then committing the one
changed file, on an Ubuntu 24.04 LTS x86_64 system with Git 2.51.0
from the git-core PPA.
@EliahKagan EliahKagan enabled auto-merge August 22, 2025 09:29
@EliahKagan EliahKagan merged commit a4b0d2c into GitoxideLabs:main Aug 22, 2025
25 checks passed
@EliahKagan EliahKagan deleted the run-ci/overlap branch August 22, 2025 09:45
@EliahKagan EliahKagan mentioned this pull request Aug 22, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant