-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Added check for _lastHEADBranch to be not NSNull. #182
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
Conversation
When cloning from remote URL _lastHEADBranch gets set to a NSNull which later would cause crash as conditional would fall thru and fail on the comparison.
Encountered this on first use of cloning from remote URL. |
What was the crash exactly? I don't think this fix is right since the code checks for |
After opening app for first time and selecting a remote URL, the app crashed because the conditional fell thru and the test if (![headBranch isEqualToBranch:_lastHEADBranch]) { Crashed because _lastHEADBranch was a NSNull First time thru _lastHEADBranch is nil then the later code sets it to NSNull, Adding the additional test caused the problem to go away.
|
That's working around the crash, but I'd like to know its exact cause since nobody reported it before. That's the only way to make sure the fix is the right one. For instance if not executing this code at all anymore if
If you can share more details (is it reproducible?) and a backtrace that'd be great, thanks. |
As I said, entering remote URL to clone, _lastHEADBranch first time thru = 0, after the clone is fetched the second time in _lastHEADBranch Is a NSNull in frame 3
|
Looks like you're pushing a bunch of commits to that branch as part of your experiments. I have to close this PR to stop Travis from building it. |
It was not pushing at all, its was cloning from the remote repo.
|
This appears related to #185. |
When cloning from remote URL _lastHEADBranch gets set to a NSNull which
later would cause crash as conditional would fall thru and fail on
the comparison.