Skip to content

Tags no longer fetch with Git v2.48.0 #2041

Open
@sethrj

Description

It's not clear whether this is a problem with my expectations of the fetch-tags option, a bug in checkout, or a bug in Git 2.48.0, but ancestral tags are no longer fetched as of Git 2.48.0 for shallow (but not too shallow) builds.

Here, v0.6.0-dev is a nearish ancestor of the branch backports/v0.5 being tested. With 2.47, tags within the fetch depth are fetched. With 2.48, only the ref is fetched: no tags.

Full run output with git 2.47.1
Run actions/checkout@v4
  with:
    fetch-depth: 383
    fetch-tags: true
    repository: celeritas-project/celeritas
    token: ***
    ssh-strict: true
    ssh-user: git
    persist-credentials: true
    clean: true
    sparse-checkout-cone-mode: true
    show-progress: true
    lfs: false
    submodules: false
    set-safe-directory: true
  env:
    SPACK_REF: 866785bd74964142e4b47bf71bee68d7426c84ee
    CCACHE_DIR: /home/runner/work/celeritas/celeritas/.ccache
    CCACHE_MAXSIZE: 100Mi
    CMAKE_PRESET: reldeb-vecgeom
    SPACK_VIEW: /opt/spack-view
    SPACK_BUILDCACHE: celer-buildcache
    CC: clang-18
    CXX: clang++-18
    CLANG_TIDY: clang-tidy-18
    CXXSTD: 17
Syncing repository: celeritas-project/celeritas
Getting Git version info
  Working directory is '/home/runner/work/celeritas/celeritas'
  /usr/bin/git version
  git version 2.47.1
Temporarily overriding HOME='/home/runner/work/_temp/7af84466-ea8b-4c97-9ce1-a234a016c05d' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
/usr/bin/git config --global --add safe.directory /home/runner/work/celeritas/celeritas
Deleting the contents of '/home/runner/work/celeritas/celeritas'
Initializing the repository
  /usr/bin/git init /home/runner/work/celeritas/celeritas
  hint: Using 'master' as the name for the initial branch. This default branch name
  hint: is subject to change. To configure the initial branch name to use in all
  hint: of your new repositories, which will suppress this warning, call:
  hint:
  hint: 	git config --global init.defaultBranch 
  hint:
  hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
  hint: 'development'. The just-created branch can be renamed via this command:
  hint:
  hint: 	git branch -m 
  Initialized empty Git repository in /home/runner/work/celeritas/celeritas/.git/
  /usr/bin/git remote add origin https://github.com/celeritas-project/celeritas
Disabling automatic garbage collection
  /usr/bin/git config --local gc.auto 0
Setting up auth
  /usr/bin/git config --local --name-only --get-regexp core\.sshCommand
  /usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
  /usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
  /usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
  /usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic ***
Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --prune --no-recurse-submodules --depth=383 origin +8e7ea3919c1b60a9e0e616fba355c7010c458f99:refs/remotes/origin/backports/v0.5
  From https://github.com/celeritas-project/celeritas
   * [new ref]         8e7ea3919c1b60a9e0e616fba355c7010c458f99 -> origin/backports/v0.5
   * [new tag]         v0.4.1     -> v0.4.1
   * [new tag]         v0.4.1-rc.1 -> v0.4.1-rc.1
   * [new tag]         v0.5.0     -> v0.5.0
   * [new tag]         v0.5.0-dev -> v0.5.0-dev
   * [new tag]         v0.5.0-rc.1 -> v0.5.0-rc.1
   * [new tag]         v0.6.0-dev -> v0.6.0-dev
Determining the checkout info
/usr/bin/git sparse-checkout disable
/usr/bin/git config --local --unset-all extensions.worktreeConfig
Checking out the ref
  /usr/bin/git checkout --progress --force -B backports/v0.5 refs/remotes/origin/backports/v0.5
  Switched to a new branch 'backports/v0.5'
  branch 'backports/v0.5' set up to track 'origin/backports/v0.5'.
/usr/bin/git log -1 --format=%H
8e7ea3919c1b60a9e0e616fba355c7010c458f99
Full run output with git 2.48.0
Run actions/checkout@v4
  with:
    fetch-depth: 383
    fetch-tags: true
    repository: celeritas-project/celeritas
    token: ***
    ssh-strict: true
    ssh-user: git
    persist-credentials: true
    clean: true
    sparse-checkout-cone-mode: true
    show-progress: true
    lfs: false
    submodules: false
    set-safe-directory: true
  env:
    SPACK_REF: 866785bd74964142e4b47bf71bee68d7426c84ee
    CCACHE_DIR: /home/runner/work/celeritas/celeritas/.ccache
    CCACHE_MAXSIZE: 100Mi
    CMAKE_PRESET: reldeb-vecgeom
    SPACK_VIEW: /opt/spack-view
    SPACK_BUILDCACHE: celer-buildcache
    CC: clang-18
    CXX: clang++-18
    CLANG_TIDY: clang-tidy-18
    CXXSTD: 17
Syncing repository: celeritas-project/celeritas
Getting Git version info
  Working directory is '/home/runner/work/celeritas/celeritas'
  /usr/bin/git version
  git version 2.48.0
Temporarily overriding HOME='/home/runner/work/_temp/8b79ca34-cc4e-479d-94c7-49fec4fb5080' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
/usr/bin/git config --global --add safe.directory /home/runner/work/celeritas/celeritas
Deleting the contents of '/home/runner/work/celeritas/celeritas'
Initializing the repository
  /usr/bin/git init /home/runner/work/celeritas/celeritas
  hint: Using 'master' as the name for the initial branch. This default branch name
  hint: is subject to change. To configure the initial branch name to use in all
  hint: of your new repositories, which will suppress this warning, call:
  hint:
  hint: 	git config --global init.defaultBranch 
  hint:
  hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
  hint: 'development'. The just-created branch can be renamed via this command:
  hint:
  hint: 	git branch -m 
  Initialized empty Git repository in /home/runner/work/celeritas/celeritas/.git/
  /usr/bin/git remote add origin https://github.com/celeritas-project/celeritas
Disabling automatic garbage collection
  /usr/bin/git config --local gc.auto 0
Setting up auth
  /usr/bin/git config --local --name-only --get-regexp core\.sshCommand
  /usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
  /usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
  /usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
  /usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic ***
Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --prune --no-recurse-submodules --depth=383 origin +8e7ea3919c1b60a9e0e616fba355c7010c458f99:refs/remotes/origin/backports/v0.5
  From https://github.com/celeritas-project/celeritas
   * [new ref]         8e7ea3919c1b60a9e0e616fba355c7010c458f99 -> origin/backports/v0.5
Determining the checkout info
/usr/bin/git sparse-checkout disable
/usr/bin/git config --local --unset-all extensions.worktreeConfig
Checking out the ref
  /usr/bin/git checkout --progress --force -B backports/v0.5 refs/remotes/origin/backports/v0.5
  Switched to a new branch 'backports/v0.5'
  branch 'backports/v0.5' set up to track 'origin/backports/v0.5'.
/usr/bin/git log -1 --format=%H
8e7ea3919c1b60a9e0e616fba355c7010c458f99

This issue first appeared when the GHA ubuntu-24.04 runner image updated from 20250105.1.0 to 20250113.1.0 .

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions