GIT_CLONE_COMMIT_COUNT returns 1 instead of actual commit count

Bitrise Build Issue Report template

Description of the issue

Our application makes use of git rev-list HEAD --count in our script to create a version number in our application. In version 8.0.1, this value returns 1. In version 6.2.3, this value returns the correct number of commits. We feel that this is a regression.

Environment:

On Bitrise.io stack: Xcode 14.2.x, on macOS 13.2 (Ventura) Intel Large
Build Step: Git Clone Repository
Git Clone v8.0.1

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • Does the issue happen sporadically, or every time? :
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? :
    Version 7

Local reproduction

_Can it be reproduced on your own Mac/PC by following our [local debug guide]
No, running the git command on my local Mac doesnt have the problem.

Build log

I can’t send the build log here but is available for Bitrise support team.

I think it’s the expected behaviour of the git-clone step that it now performs a shallow clone by default: Release 7.0.0: Shallow clone by default · bitrise-steplib/steps-git-clone · GitHub

If you require the entire git history, I think you want clone_depth: -1

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.