Skip to content

repo.py: fix checking out commits#51695

Merged
alecbcs merged 1 commit intodevelopfrom
hs/fix/checkout-commit
Dec 10, 2025
Merged

repo.py: fix checking out commits#51695
alecbcs merged 1 commit intodevelopfrom
hs/fix/checkout-commit

Conversation

@haampie
Copy link
Copy Markdown
Member

@haampie haampie commented Dec 5, 2025

Fix an issue where git fetch --all does not unshallow.

Ensure that git fetch --all happens only in the worst case.

  • Don't fetch if commit is locally available
  • If the server supports direct fetching of commits, do that with
    --depth=N
  • If nothing works: do git fetch --all --depth=<large number>.

@haampie haampie added v1.1.1 v1.0.3 PRs to backport for v1.0.3 labels Dec 5, 2025
@haampie haampie requested a review from alecbcs December 5, 2025 10:56
@haampie haampie force-pushed the hs/fix/checkout-commit branch from bb4af09 to 3057bc3 Compare December 5, 2025 11:27

This comment was marked as outdated.

* If the commit is available locally, checkout directly.
* If the server supports direct fetching of commits, do that with
  --depth=N
* If nothing works: do `git fetch --all` followed by a checkout.

Signed-off-by: Harmen Stoppels <[email protected]>
@haampie haampie force-pushed the hs/fix/checkout-commit branch from 3057bc3 to ee610d2 Compare December 5, 2025 13:57
@alecbcs alecbcs self-assigned this Dec 5, 2025
Copy link
Copy Markdown
Member

@alecbcs alecbcs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks @haampie

@alecbcs alecbcs merged commit 8a47f8d into develop Dec 10, 2025
33 of 34 checks passed
@alecbcs alecbcs deleted the hs/fix/checkout-commit branch December 10, 2025 19:47
becker33 pushed a commit that referenced this pull request Jan 10, 2026
* If the commit is available locally, checkout directly.
* If the server supports direct fetching of commits, do that with
  --depth=N
* If nothing works: do `git fetch --all` followed by a checkout.

Signed-off-by: Harmen Stoppels <[email protected]>
@becker33 becker33 mentioned this pull request Jan 10, 2026
2 tasks
becker33 pushed a commit that referenced this pull request Jan 11, 2026
* If the commit is available locally, checkout directly.
* If the server supports direct fetching of commits, do that with
  --depth=N
* If nothing works: do `git fetch --all` followed by a checkout.

Signed-off-by: Harmen Stoppels <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
becker33 pushed a commit that referenced this pull request Jan 15, 2026
* If the commit is available locally, checkout directly.
* If the server supports direct fetching of commits, do that with
  --depth=N
* If nothing works: do `git fetch --all` followed by a checkout.

Signed-off-by: Harmen Stoppels <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
vjranagit pushed a commit to vjranagit/spack that referenced this pull request Jan 18, 2026
* If the commit is available locally, checkout directly.
* If the server supports direct fetching of commits, do that with
  --depth=N
* If nothing works: do `git fetch --all` followed by a checkout.

Signed-off-by: Harmen Stoppels <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
becker33 pushed a commit that referenced this pull request Jan 22, 2026
* If the commit is available locally, checkout directly.
* If the server supports direct fetching of commits, do that with
  --depth=N
* If nothing works: do `git fetch --all` followed by a checkout.

Signed-off-by: Harmen Stoppels <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
becker33 pushed a commit that referenced this pull request Jan 26, 2026
* If the commit is available locally, checkout directly.
* If the server supports direct fetching of commits, do that with
  --depth=N
* If nothing works: do `git fetch --all` followed by a checkout.

Signed-off-by: Harmen Stoppels <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
@becker33 becker33 mentioned this pull request Feb 2, 2026
becker33 pushed a commit that referenced this pull request Feb 2, 2026
* If the commit is available locally, checkout directly.
* If the server supports direct fetching of commits, do that with
  --depth=N
* If nothing works: do `git fetch --all` followed by a checkout.

Signed-off-by: Harmen Stoppels <[email protected]>
becker33 pushed a commit that referenced this pull request Feb 2, 2026
* If the commit is available locally, checkout directly.
* If the server supports direct fetching of commits, do that with
  --depth=N
* If nothing works: do `git fetch --all` followed by a checkout.

Signed-off-by: Harmen Stoppels <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
becker33 pushed a commit that referenced this pull request Feb 19, 2026
* If the commit is available locally, checkout directly.
* If the server supports direct fetching of commits, do that with
  --depth=N
* If nothing works: do `git fetch --all` followed by a checkout.

Signed-off-by: Harmen Stoppels <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v1.0.3 PRs to backport for v1.0.3 v1.1.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants