Getting number of commits in bitbucket-pipelines.yml

ogun_ozturk May 8, 2019

I am trying to get number of commits of my master branch bitbucket-pipelines.yml file

 

and I use the command below

git rev-list --first-parent --count origin/master

But it started not counting after 50th commit and it keeps returning 50 everytime I push a new commit.

 

What is the reason for that and how can I fix that issue?

 

Any help would be appreciated. 

1 answer

0 votes
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 23, 2019

Hello Mustafa,

By default, Pipelines uses a shallow clone when cloning the repository.

If you'd like the entire Git history. Please set the clone depth to be full with the configuration here: https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html#Configurebitbucket-pipelines.yml-ci_depthdepth

Thanks,

Phil

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events