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

Libgit2sharp branch #176

Merged
merged 22 commits into from Jun 2, 2012

Conversation

Projects
None yet
5 participants
@sc68cal
Contributor

sc68cal commented May 15, 2012

Based on my libgit2sharp_dev branch, but with history cleaned up so I don't look like a twit. :trollface:

sc68cal added some commits Feb 6, 2012

Import LibGit2Sharp
Switch to using LibGit2Sharp.Blob for Copy(), and begin adding
explicit references, so we can swap out parts of GitSharp with
LibGit2Sharp as we go.
Replace GitSharp.Core.ObjectWriter
Replace with libgit2sharp.Repository.ObjectDatabse
Refactor GetBlob
The name didn't really match what it does. Also, remove
the Copy function to save a function call.

This is part of the work required for #144
Remove GetChangeSummary
It doesn't appear to be used anywhere.

Work for #144
Replace GitSharp with LibGit2Sharp
Most of the functions use the LibGit2Sharp API, only
GetCommit remains, and that is tied to #142.
GitRepository.CopyBlob: Create parent directory
If the parent directory does not exist
@sc68cal

This comment has been minimized.

Show comment
Hide comment
@sc68cal

sc68cal May 15, 2012

Contributor

Comments from fellow @git-tfs members and @nulltoken are appreciated.

I'd like to hold off on merging this PR while we wait for a stable release of libgit2 and libgit2sharp

Contributor

sc68cal commented May 15, 2012

Comments from fellow @git-tfs members and @nulltoken are appreciated.

I'd like to hold off on merging this PR while we wait for a stable release of libgit2 and libgit2sharp

GitIndexInfo: Use temporary file
Now that libgit2 and libgit2sharp support adding files from paths outside
the working directory
where
entry.State != FileStatus.Ignored &&
entry.State != FileStatus.Untracked
select entry).Count() > 0;

This comment has been minimized.

@spraints

spraints May 16, 2012

Member

I haven't checked to see if this is the case or not, but if WorkingCopyHasUnstagedOrUncommitedChanges is called inside of a WithTemporaryIndex call, then this won't work right (ie. it looks at the default index instead of the temporary one).

@spraints

spraints May 16, 2012

Member

I haven't checked to see if this is the case or not, but if WorkingCopyHasUnstagedOrUncommitedChanges is called inside of a WithTemporaryIndex call, then this won't work right (ie. it looks at the default index instead of the temporary one).

This comment has been minimized.

@sc68cal

sc68cal May 16, 2012

Contributor

if WorkingCopyHasUnstagedOrUncommitedChanges is called inside of a WithTemporaryIndex

I don't think that is the case.

If I am not mistaken, Rcheckin is the only user of this method, and we want it to use the actual index since we shell out to a git rebase

@sc68cal

sc68cal May 16, 2012

Contributor

if WorkingCopyHasUnstagedOrUncommitedChanges is called inside of a WithTemporaryIndex

I don't think that is the case.

If I am not mistaken, Rcheckin is the only user of this method, and we want it to use the actual index since we shell out to a git rebase

sc68cal and others added some commits May 16, 2012

Merge pull request #1 from spraints/libgit2sharp
Add TemporaryFile class 

Syntactic sugar, so that the using statement will automatically 
delete the temporary file at the end of the block
Replace GitSharp in GitCommit and GitTreeEntry
The paths returned from LibGit2Sharp are platform
dependent, while the paths returned from TFS are
URIs that use a forward slash.
Remove OnlyIn function
Call happens inside a tight loop.
@sc68cal

This comment has been minimized.

Show comment
Hide comment
@sc68cal

sc68cal May 22, 2012

Owner

Hmmm....

Updating 4c74cbe..0dc5493
error: The following untracked working tree files would be overwritten by merge:
        Development\Source\Enhance\src\Enhance\Features\About.xaml
        Development\Source\Enhance\src\Enhance\Features\ReviewPatientNotesViewModel.cs
        Development\Source\Enhance\src\Enhance\Models\ResourceGetter.cs
Please move or remove them before you can merge.
Aborting

Removing them, just for kicks:

Updating 4c74cbe..0dc5493
Fast-forward
 ...e\\Enhance\\src\\Enhance\\Features\\About.xaml" |   69 ++++++
 ...ance\\Features\\ReviewPatientNotesViewModel.cs" |  239 ++++++++++++++++++++
 ...hance\\src\\Enhance\\Models\\ResourceGetter.cs" |   24 ++
 3 files changed, 332 insertions(+), 0 deletions(-)
 create mode 100644 "Development\\Source\\Enhance\\src\\Enhance\\Features\\About.xaml"
 create mode 100644 "Development\\Source\\Enhance\\src\\Enhance\\Features\\ReviewPatientNotesViewModel.cs"
 create mode 100644 "Development\\Source\\Enhance\\src\\Enhance\\Models\\ResourceGetter.cs"
Owner

sc68cal commented on GitTfs/Core/GitTfsRemote.cs in f72048b May 22, 2012

Hmmm....

Updating 4c74cbe..0dc5493
error: The following untracked working tree files would be overwritten by merge:
        Development\Source\Enhance\src\Enhance\Features\About.xaml
        Development\Source\Enhance\src\Enhance\Features\ReviewPatientNotesViewModel.cs
        Development\Source\Enhance\src\Enhance\Models\ResourceGetter.cs
Please move or remove them before you can merge.
Aborting

Removing them, just for kicks:

Updating 4c74cbe..0dc5493
Fast-forward
 ...e\\Enhance\\src\\Enhance\\Features\\About.xaml" |   69 ++++++
 ...ance\\Features\\ReviewPatientNotesViewModel.cs" |  239 ++++++++++++++++++++
 ...hance\\src\\Enhance\\Models\\ResourceGetter.cs" |   24 ++
 3 files changed, 332 insertions(+), 0 deletions(-)
 create mode 100644 "Development\\Source\\Enhance\\src\\Enhance\\Features\\About.xaml"
 create mode 100644 "Development\\Source\\Enhance\\src\\Enhance\\Features\\ReviewPatientNotesViewModel.cs"
 create mode 100644 "Development\\Source\\Enhance\\src\\Enhance\\Models\\ResourceGetter.cs"

This comment has been minimized.

Show comment
Hide comment
@sc68cal
Owner

sc68cal replied May 22, 2012

uhoh

@sc68cal

This comment has been minimized.

Show comment
Hide comment
@sc68cal

sc68cal Jun 2, 2012

Contributor

:godmode: Time to merge this :godmode:

Contributor

sc68cal commented Jun 2, 2012

:godmode: Time to merge this :godmode:

@@ -152,15 +152,18 @@ public ItemDownloadStrategy(TfsApiBridge bridge)
_bridge = bridge;
}
public Stream DownloadFile(IItem item)
public TemporaryFile DownloadFile(IItem item)

This comment has been minimized.

@spraints

spraints Jun 2, 2012

Member

We can move this to VsCommon, and nuke the Vs2008 implementation. They're the same, except that this one has a catch.

@spraints

spraints Jun 2, 2012

Member

We can move this to VsCommon, and nuke the Vs2008 implementation. They're the same, except that this one has a catch.

This comment has been minimized.

@sc68cal

sc68cal Jun 2, 2012

Contributor

Good idea.

@sc68cal

sc68cal Jun 2, 2012

Contributor

Good idea.

@spraints

This comment has been minimized.

Show comment
Hide comment
@spraints

spraints Jun 2, 2012

Member

👍

Member

spraints commented Jun 2, 2012

👍

sc68cal added a commit that referenced this pull request Jun 2, 2012

Merge pull request #176 from sc68cal/libgit2sharp
Replaces GitSharp with LibGit2Sharp

@sc68cal sc68cal merged commit fedc7aa into git-tfs:master Jun 2, 2012

@sc68cal sc68cal referenced this pull request Aug 9, 2012

Closed

Submodule Support #175

@rbirkby

This comment has been minimized.

Show comment
Hide comment
@rbirkby

rbirkby Aug 13, 2012

Contributor

It may be a good idea to mention the need to git submodule update --init in the git-tfs Readme.md Building section.
The current build instructions make no mention of this extra step and you're left wondering why libgit2sharp is missing from the build.

Contributor

rbirkby commented on 5149549 Aug 13, 2012

It may be a good idea to mention the need to git submodule update --init in the git-tfs Readme.md Building section.
The current build instructions make no mention of this extra step and you're left wondering why libgit2sharp is missing from the build.

This comment has been minimized.

Show comment
Hide comment
@sc68cal
Contributor

sc68cal replied Aug 13, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment