New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitFindRootFromPath will loop forever if a valid Git repository can't be found. #127
Labels
Comments
kcamp
added a commit
to kcamp/Cake_Git
that referenced
this issue
Nov 22, 2020
kcamp
added a commit
to kcamp/Cake_Git
that referenced
this issue
Nov 28, 2020
kcamp
added a commit
to kcamp/Cake_Git
that referenced
this issue
Nov 28, 2020
kcamp
added a commit
to kcamp/Cake_Git
that referenced
this issue
Nov 28, 2020
nils-a
pushed a commit
to nils-a/Cake_Git
that referenced
this issue
Dec 12, 2021
nils-a
added a commit
to nils-a/Cake_Git
that referenced
this issue
Dec 12, 2021
and added a workaround for the hitherto missing DirectoryInfo.GetParent()
nils-a
pushed a commit
to nils-a/Cake_Git
that referenced
this issue
Dec 13, 2021
nils-a
added a commit
to nils-a/Cake_Git
that referenced
this issue
Dec 13, 2021
and added a workaround for the hitherto missing DirectoryInfo.GetParent()
nils-a
added a commit
that referenced
this issue
Dec 13, 2021
GH-127: Modify do/while in GitFindRootFromPath to avoid infinite loop
Closed in #128 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you call
GitFindRootFromPath("./")
from a path where no ancestor contains a valid Git repository, the method will loop forever.Repro
Create a folder where a valid git repository is not accessible - i.e.,
c:\git\repro
and add this cake script.The task will get caught in the
do..while
loop and loop forever.Cake_Git/src/Cake.Git/GitAliases.Repository.cs
Lines 192 to 201 in 63ee1c9
We need to add a termination condition to the loop and allow the exception to be thrown.
The text was updated successfully, but these errors were encountered: