git log not showing all commits when running from pipeline

Maoz zadok October 1, 2023

hello,

In my case `release-1.0.2` is my first release, when running the `git log main release-1.0.2.. --all --no-merges --decorate --pretty="format:%D%n - %s"` command from my PC, I get the entire log, and when running from the pipeline I get an error

 

 

 

 

error: 

 

+ git log main release-1.0.2.. --all --no-merges --decorate --pretty="format:%D%n - %s" > changelog.txt
2
fatal: ambiguous argument 'release-1.0.2..': unknown revision or path not in the working tree.
3
Use '--' to separate paths from revisions, like this:
4
'git <command> [<revision>...] -- [<file>...]'

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 2, 2023

Hi Maoz,

When a Pipelines build runs, the behavior of the git clone command is determined by the type of pipeline and the way it was triggered. For example, for a branch pipeline that is triggered automatically only that branch is cloned with a default depth of 50. It is possible to specify full depth for a step and then check out another branch if needed:

I can give you advice specific to your use case if you let me know the following:

Kind regards,
Theodora

Maoz zadok October 15, 2023

thanks so much for your response, release-1.0.2  is a tag on a commit from the main branch.

The pipeline runs on a branch definition (main).

pipelines:
branches:
main: .....

 

In my case adding `depth: full`  solved the issue.

clone:
  depth: full

 

Like Theodora Boudale likes this
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 16, 2023

That's good to hear Maoz, thank you for the update. Please feel free to reach out if you ever need anything else!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events