Skip to content
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

StackOverflowException when two feature branches are pointing to the same commit #411

Closed
johannesegger opened this issue Apr 1, 2015 · 3 comments · Fixed by #422
Closed
Milestone

Comments

@johannesegger
Copy link

I made a mistake and set two feature branches to point to the same commit. When running gitversion on one of the branches it crashes with a StackOverflowException. Of course this is my mistake because two feature branches shouldn't point to the same commit, but maybe you can detect and break the recursion (or whatever the exception triggers).

Run the following commands to reproduce the issue:

mkdir stackoverflowtest
cd .\stackoverflowtest
git init
git commit --allow-empty -m "Commit 1"
git checkout -b develop
git checkout -b feature/feature1
git commit --allow-empty -m "Commit 2"
git commit --allow-empty -m "Commit 3"
git checkout -b feature/feature2
gitversion # This will take some time and then crash with a StackOverflowException
cd ..
rm -Force -Recurse .\stackoverflowtest

The version of GitVersion is used was 3.0.0-Beta1.

@johannesegger johannesegger changed the title StackoverflowException when two feature branches are pointing to the same commit StackoverflowException when two feature branches are pointing to the same commit Apr 1, 2015
@johannesegger johannesegger changed the title StackoverflowException when two feature branches are pointing to the same commit StackOverflowException when two feature branches are pointing to the same commit Apr 1, 2015
@nulltoken
Copy link
Contributor

Can you please share the complete stack trace?

@JakeGinnivan
Copy link
Contributor

@nulltoken this will likely be my branch inheriting code as it is recursive. I will create a repro test and fix

@johannesegger
Copy link
Author

I don't get a complete stack trace when I run this from the command line, but I could probably checkout the branch and run it with an attached debugger if you want me to?

@JakeGinnivan JakeGinnivan added this to the 3.0.0 milestone Apr 6, 2015
yannisgu pushed a commit to unic/GitVersion that referenced this issue Apr 23, 2015
@yannisgu yannisgu mentioned this issue Apr 23, 2015
yannisgu pushed a commit to unic/GitVersion that referenced this issue Apr 23, 2015
yannisgu pushed a commit to unic/GitVersion that referenced this issue Apr 23, 2015
yannisgu pushed a commit to unic/GitVersion that referenced this issue Apr 23, 2015
JakeGinnivan added a commit that referenced this issue Apr 23, 2015
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 a pull request may close this issue.

3 participants