Skip to content

repo: don't overwrite branch when initially cloning repo#51105

Merged
becker33 merged 2 commits intospack:developfrom
alecbcs:fix/repo-init-branch
Aug 4, 2025
Merged

repo: don't overwrite branch when initially cloning repo#51105
becker33 merged 2 commits intospack:developfrom
alecbcs:fix/repo-init-branch

Conversation

@alecbcs
Copy link
Copy Markdown
Member

@alecbcs alecbcs commented Aug 4, 2025

@becker33 identified a bug where v1.0 instances of Spack were not correctly defaulting to the stable release of the packages repository. That happened due to how we tried to find the default branch for a remote repository and were accidentally replacing any supplied branch with that of the dynamically determined branch.

This PR gates that dynamic logic behind a conditional statement if a branch, tag, or commit are NOT specified.

@alecbcs alecbcs requested a review from becker33 August 4, 2025 15:42
@alecbcs alecbcs added the v1.0.1 PRs to backport for v1.0.1 label Aug 4, 2025
becker33
becker33 previously approved these changes Aug 4, 2025
@alecbcs
Copy link
Copy Markdown
Member Author

alecbcs commented Aug 4, 2025

@spackbot fix style

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Aug 4, 2025

Let me see if I can fix that for you!

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Aug 4, 2025

I was able to run spack style --fix for you!

spack style --fix
==> Running style checks on spack
  selected: import, isort, black, flake8, mypy
==> Modified files
  lib/spack/spack/repo.py
==> Running import checks
  import checks were clean
==> Running isort checks
  isort checks were clean
==> Running black checks
reformatted lib/spack/spack/repo.py
All done! ✨ 🍰 ✨
1 file reformatted.
  black checks were clean
==> Running flake8 checks
  flake8 checks were clean
==> Running mypy checks
Success: no issues found in 614 source files
  mypy checks were clean
==> spack style checks were clean
Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request. If I was able to push to your branch, if you make further changes you will need to pull from your updated branch before pushing again.

I've updated the branch with style fixes.

@alecbcs alecbcs force-pushed the fix/repo-init-branch branch from 594901d to 19c26e6 Compare August 4, 2025 15:47
@becker33 becker33 enabled auto-merge (squash) August 4, 2025 18:12
@becker33 becker33 merged commit 38ded78 into spack:develop Aug 4, 2025
60 of 62 checks passed
haampie pushed a commit that referenced this pull request Aug 11, 2025
@haampie haampie mentioned this pull request Aug 11, 2025
29 tasks
alecbcs added a commit that referenced this pull request Aug 12, 2025
@alecbcs alecbcs deleted the fix/repo-init-branch branch August 15, 2025 01:40
alstar555 pushed a commit to alstar555/spack that referenced this pull request Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v1.0.1 PRs to backport for v1.0.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants