git-pr-release requires git history. However, in many CI services in recent years, the shallow clone is used by default for speed. e.g., https://github.com/actions/checkout
It requires users to write additional settings such as fetch-depth: 0, which is a pitfall for beginners.
To make it easier to use, I add behavior to determine if a repository is a shallow repository and, if so, unshallow it.
It may be controversial whether this behavior is also applied when --no-fetch is specified. Still, I added this behavior uniformly since git-pr-release does not work correctly with a shallow clone.
git fetch --unshallow is available git 1.8.3 or later, and git rev-parse --is-shallow-repository is also 2.15. These are old enough, and in recent years, users have been using the newer git client for security reasons, so I do not check the git version compatibility.
git-pr-release requires git history. However, in many CI services in recent years, the shallow clone is used by default for speed. e.g., https://github.com/actions/checkout
It requires users to write additional settings such as
fetch-depth: 0
, which is a pitfall for beginners.To make it easier to use, I add behavior to determine if a repository is a shallow repository and, if so, unshallow it.
It may be controversial whether this behavior is also applied when
--no-fetch
is specified. Still, I added this behavior uniformly since git-pr-release does not work correctly with a shallow clone.git fetch --unshallow
is available git 1.8.3 or later, andgit rev-parse --is-shallow-repository
is also 2.15. These are old enough, and in recent years, users have been using the newer git client for security reasons, so I do not check the git version compatibility.