Skip to content

Unhandled error cause infinite loop in @changesets/git #602

Description

@leometzger

Affected Packages

  • @changesets/git

Problem

In some git solutions like Bitbucket, git fetch --deepen [Number] does not work.

When the command changeset version is runned in a step from bitbucket-pipeline, that is using a shallow clone, the step locks.

This happens because the changeset version try to get more commits from history using the git fetch --deepen command

Proposed solution

Throw an error if the returning code from git fetch --deepen [Number] is different from 0.

https://github.com/atlassian/changesets/blob/main/packages/git/src/index.ts#L165

Metadata

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