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

Use LibGit2Sharp #37

Closed
dahlbyk opened this issue Apr 8, 2012 · 14 comments
Closed

Use LibGit2Sharp #37

dahlbyk opened this issue Apr 8, 2012 · 14 comments

Comments

@dahlbyk
Copy link
Owner

dahlbyk commented Apr 8, 2012

Hopefully faster than multiple git calls...

@dahlbyk
Copy link
Owner Author

dahlbyk commented Apr 8, 2012

Progress so far is in my libgit2 branch if anyone wants to test it out. PowerShell is blowing up in amd64 mode and I can't figure out why.

See also libgit2/libgit2sharp#128

/cc @tclem @xpaulbettsx @haacked @nulltoken

@nulltoken
Copy link

@dahlbyk does it work if you keep the initial directory structure? Are you sure the process environment Path variable you set is the same that the one which is being accessed in NativeMethods static constructor?

@nulltoken
Copy link

"Initial directory structure" -> relatively to the LibGit2Sharp.dll

@dahlbyk
Copy link
Owner Author

dahlbyk commented Apr 8, 2012

Ah, did not notice that DLL location logic - will try.

@dahlbyk
Copy link
Owner Author

dahlbyk commented Apr 8, 2012

Pushed an update using the initial directory structure. Still blows up on amd64. This works fine:

cd posh-git
add-type -path .\libgit2sharp\LibGit2Sharp.dll
$r = New-Object LibGit2Sharp.Repository (Resolve-Path .)
$i = $r.Index

However calling $i.RetrieveStatus() blows up spectacularly (in unmanaged code, it appears). I'll see if I can reproduce outside of PowerShell, but debugging into libgit2 is beyond me.

@nulltoken
Copy link

Are you able to access, from PS, simple Repository accessors such as Repository.Info.(WorkingDirectory|Path|IsBare)? Would more elaborate ones such as Lookup or Stage work?

What kind of exception do you encounter?

debugging into libgit2 is beyond me.

If you can provide me with some failing C# code, I'll take the burden :)

@dahlbyk
Copy link
Owner Author

dahlbyk commented Apr 8, 2012

Repository.Info returns values for all properties.
Repository.Index enumerates all files.
Repository.Index.Stage() and Repository.Index.Unstage() seem to work.
Repository.Head.Commits enumerates all commits.

And...I can't repro in a console app. :( This is what Windows reports for the PowerShell crash:

Problem Event Name:       APPCRASH
Application Name:         powershell.exe
Application Version:      6.1.7600.16385
Application Timestamp:    4a5bc7f3
Fault Module Name:        mscorwks.dll
Fault Module Version:     2.0.50727.5448
Fault Module Timestamp:   4e153960
Exception Code:           c0000005
Exception Offset:         00000000001703f3
OS Version:               6.1.7601.2.1.0.256.48
Locale ID:                1033

@nulltoken
Copy link

@xpaulbettsx would you be able to provide some ninja debugging help here?

@anaisbetts
Copy link

I'm on it, will check it out tomorrow

Paul Betts
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Sunday, April 8, 2012 at 12:18, nulltoken wrote:

@xpaulbettsx would you be able to provide some ninja debugging help here?


Reply to this email directly or view it on GitHub:
#37 (comment)

@nulltoken
Copy link

@dahlbyk Can you still reproduce this against the latest vNext tip?

@dahlbyk
Copy link
Owner Author

dahlbyk commented Jun 8, 2012

Yes, as far as I can tell I'm getting the same error, still only on amd64. I'll see if I can look at this with @xpaulbettsx while we're in the same room.

@nulltoken
Copy link

Callback issue has been merged in vNext. :)

@rkeithhill
Copy link
Collaborator

Looks like we are still using git.exe and given that MS has switched with VS 2017 to use git.exe instead of some variant of libgit, maybe we just close this issue?

@dahlbyk dahlbyk closed this as completed Jan 6, 2017
@dahlbyk
Copy link
Owner Author

dahlbyk commented Jan 6, 2017

Fasterness option 1: #208
Fasterness option 2: Powerline with PSGet

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

No branches or pull requests

4 participants