Skip to content

Remove invalid error handler from git.findCommitAndParent - #611

Merged
bluwy merged 1 commit into
changesets:fix/infinite-loop-gitfrom
leometzger:fix/infinite-loop-git
Nov 18, 2025
Merged

Remove invalid error handler from git.findCommitAndParent#611
bluwy merged 1 commit into
changesets:fix/infinite-loop-gitfrom
leometzger:fix/infinite-loop-git

Conversation

@leometzger

@leometzger leometzger commented Jul 4, 2021

Copy link
Copy Markdown
Contributor

Hi, this PR resolves the issue with the tests.

Return with non-zero code from git command in method findCommitAndParent seems to be an accepted behaivior. Not throwing an error there is not an issue.

As an example, in the scenario that we have a shallow clone with 5 commits and the commit that we searching is 10 commits behind, the method findCommitAndParent will not find the commit and the parent. In this case the do-while loop must do another iteration with a deepen clone.

Merges into #584

@changeset-bot

changeset-bot Bot commented Jul 4, 2021

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 378fb4d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@bluwy
bluwy merged commit 42d4e38 into changesets:fix/infinite-loop-git Nov 18, 2025
Andarist added a commit to mihkeleidast/changesets that referenced this pull request Jun 26, 2026
…ets try to retrieve commits that added files (changesets#584)

* Avoid an infinite loop when git commands fail to execute when Changesets try to retrieve commits that added files

* Remove a invalid error handler from git command (changesets#611)

* Revert impossibly non-0 cases

* Update

---------

Co-authored-by: Leonardo Metzger <leonardo.metzger@outlook.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants