You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I did in my app is to check if [GTRepository initWithURL:error:] and check for the libgit2 error which is returned if it is not a repository. I tried both ways, the isAGitDirectory check and checking for the error, they both result in the same behaviour.
Activity
joshaber commentedon Oct 8, 2015
Hah, yeah, and it's almost certainly gonna be wrong in a lot of situations. A PR to 🔥 it would be great 😄
samskiter commentedon Oct 9, 2015
Ah I see. It's an old method. it's not currently public, i just wondered if it should be as it could be pretty useful
joshaber commentedon Oct 9, 2015
It seems likely that libgit2 has some function like that that we should use instead.
pietbrauer commentedon Oct 17, 2015
What I did in my app is to check if
[GTRepository initWithURL:error:]and check for thelibgit2error which is returned if it is not a repository. I tried both ways, theisAGitDirectorycheck and checking for the error, they both result in the same behaviour.joshaber commentedon Oct 19, 2015
Yeah, I'd expect
-initWithURL:error:to be more future-safe.Remove `isAGitDirectory:`