Skip to content

Commit 665008a

Browse files
committed
Merge remote-tracking branch 'upstream/master' into cmn/inmemory
2 parents 561afc3 + 2492eb8 commit 665008a

File tree

506 files changed

+19341
-9836
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

506 files changed

+19341
-9836
lines changed

.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,3 @@
33

44
# Custom for Visual Studio
55
*.cs diff=csharp
6-
*.sln merge=union
7-
*.csproj merge=union

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Thumbs.db
1313
*_p.c
1414
*.ncb
1515
*.suo
16+
.vs/
1617
*.sln.ide/
1718
*.tlb
1819
*.tlh
@@ -37,8 +38,8 @@ _ReSharper*/
3738
*.DotSettings
3839
#Ignore custom generated files
3940
LibGit2Sharp/Core/UniqueIdentifier.cs
41+
LibGit2Sharp/Core/NativeDllName.cs
4042

41-
!Lib/NativeBinaries/*/*.pdb
4243
!nuget.package/build/
4344
_NCrunch_LibGit2Sharp/
4445
packages/

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

.nuget/packages.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="xunit.runners" version="1.9.2" />
3+
<package id="xunit.runner.console" version="2.0.0" />
4+
<package id="xunit.runner.msbuild" version="2.0.0" />
45
</packages>

.travis.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
# Travis-CI Build for libgit2sharp
22
# see travis-ci.org for details
33

4-
language: c
4+
language: csharp
5+
mono:
6+
- 3.12.0
7+
- 4.2.3
58

69
os:
710
- osx
811
- linux
912

13+
env:
14+
global:
15+
- MONO_OPTIONS=--debug
16+
1017
before_install:
1118
- date -u
1219
- uname -a
13-
- export PATH=/opt/mono/bin:$PATH
1420
- env | sort
1521

16-
# Make sure CMake and Mono are installed
17-
install: ./CI/travis.${TRAVIS_OS_NAME}.install.deps.sh
22+
solution: LibGit2Sharp.sln
1823

1924
# Build libgit2, LibGit2Sharp and run the tests
2025
script:

CHANGES.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,72 @@
1010
- Windows (x86/amd64): <https://ci.appveyor.com/project/libgit2/libgit2sharp>
1111
- Linux/Mac OS X: <https://travis-ci.org/libgit2/libgit2sharp>
1212

13+
## v0.22 + 1
14+
15+
### Additions
16+
17+
### Changes
18+
19+
- The native libraries are now expected to be in the `lib` directory,
20+
instead of `NativeBinaries` for improved mono compatibility. In
21+
addition, the names of platform architectures now better reflect
22+
the vendor naming (eg, `x86_64` instead of `amd64` on Linux).
23+
- Obsolete the config paths in RepositoryOptions
24+
25+
### Fixes
26+
27+
## v0.22 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.21.1...v0.22))
28+
29+
### Additions
30+
31+
- Add CustomHeaders in the push options (#1217)
32+
- Expose the minimal diff algorithm (#1229)
33+
- Expose Reset() with checkout options (#1219)
34+
- Add a prettify option to history rewrite options (#1185)
35+
- Add option to describe to only follow the first parent (#1190)
36+
- Allow setting the config search path (#1123)
37+
- Provide access to the remote's host HTTPS certificate (#1134)
38+
- Add support for rebase (#964)
39+
- ListReferences() now accepts a credentials provider (#1099)
40+
- Introduce FileStatus.Conflicted and introduce staging of conflicts (#1062)
41+
- Support streaming filters written in C# (#1030)
42+
- Add support for the pre-push callback (#1061)
43+
- Add support for listing remote references without a Repository instance (#1065)
44+
- Add StashCollection.Apply() and .Pop() (#1068)
45+
- Support retrieving a configuration for a repository without instantiating it (#1042)
46+
- Implement 'log --follow'-like functionality (#963)
47+
- Introduce in-memory merging via Repository.MergeCommits() (#990)
48+
- Allow setting whether to prune during a fetch (#1258)
49+
50+
### Changes
51+
52+
- Deprecate MergeConflictException in a backwards-compatible way (#1243)
53+
- Improve type safety in the generic type for Diff.Compare() (#1180)
54+
- Obsolete Repository.Commit(), NoteCollection.Add() and
55+
NoteCollection.Remove() overloads which do not require a signature (#1173)
56+
- BuildSignature() no longer tries to build a signature from the
57+
environment if there is none configured (#1171)
58+
- Rename the commit walker's Since to IncludeReachableFrom and Until to ExcludeReachableFrom (#1069)
59+
- Rename MergeConflictException to CheckoutConflictException to more
60+
accurately reflect what it means (#1059)
61+
- Specify the diff algorithm instead of setting a boolean to use patience (#1043)
62+
- Remove optional parameters (#1031)
63+
- Move Repository.Reset(paths) into Index (#959)
64+
- Move FindMergeBase() overloads to ObjectDatabase (#957)
65+
66+
### Fixes
67+
68+
- ListReferences() is now able to handle symbolic references (#1132)
69+
- Repository.IsValid() returns false on empty paths (#1156)
70+
- The included version of libgit2 includes racy-git support
71+
- Fix a racy NRE in the filters (#1113)
72+
73+
## v0.21.1 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.21...v0.21.1))
74+
75+
### Changes
76+
77+
- Fix Fetch() related tests to cope with recent GitHub policy change regarding include-tag handling (#995, #1001)
78+
1379
## v0.21 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.20.2...v0.21))
1480

1581
### Additions

CI/build.msbuild

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<DeployFolder>$(RootDir)\Build</DeployFolder>
77
</PropertyGroup>
88

9-
<UsingTask AssemblyFile="$(RootDir)\packages\xunit.runners.1.9.2\tools\xunit.runner.msbuild.dll"
9+
<UsingTask AssemblyFile="$(RootDir)\packages\xunit.runner.msbuild.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.runner.msbuild.dll"
1010
TaskName="Xunit.Runner.MSBuild.xunit" />
1111
<Target Name="Clean">
1212
<Message Text="Commit SHA = $(CommitSha)" />
@@ -37,7 +37,7 @@
3737
</Target>
3838

3939
<Target Name="Test" DependsOnTargets="Build">
40-
<xunit Assembly="$(TestBuildDir)/LibGit2Sharp.Tests.dll" Xml="$(DeployFolder)/Test-result.xml" />
40+
<xunit Assemblies="$(TestBuildDir)/LibGit2Sharp.Tests.dll" ShadowCopy="false" WorkingFolder="$(TestBuildDir)" Xml="$(DeployFolder)/Test-result.xml" />
4141
</Target>
4242

4343
<Target Name="Deploy" DependsOnTargets="Test">
@@ -49,10 +49,10 @@
4949
DestinationFiles="@(OutputFiles->'$(DeployFolder)\%(RecursiveDir)%(Filename)%(Extension)')" />
5050

5151
<ItemGroup>
52-
<NativeBinaries Include="$(TestBuildDir)\NativeBinaries\**\*.*" />
52+
<NativeBinaries Include="$(TestBuildDir)\lib\**\*.*" />
5353
</ItemGroup>
5454

5555
<Copy SourceFiles="@(NativeBinaries)"
56-
DestinationFiles="@(NativeBinaries->'$(DeployFolder)\NativeBinaries\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
56+
DestinationFiles="@(NativeBinaries->'$(DeployFolder)\lib\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
5757
</Target>
5858
</Project>

CI/travis.linux.install.deps.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

CI/travis.osx.install.deps.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# How to Contribute
2+
3+
We love Pull Requests! Your contributions help make LibGit2Sharp great.
4+
5+
## Getting Started
6+
7+
So you want to contribute to LibGit2Sharp. Great! Contributions take many forms from
8+
submitting issues, writing documentation, to making code changes. We welcome it all.
9+
10+
But first things first...
11+
12+
* Make sure you have a [GitHub account](https://github.com/signup/free)
13+
* Submit a ticket for your issue, assuming one does not already exist.
14+
* Clearly describe the issue including steps to reproduce when it is a bug.
15+
* Make sure you fill in the earliest version that you know has the issue.
16+
* Fork the repository on GitHub, then clone it using your favorite Git client.
17+
* Make sure the project builds and all tests pass on your machine by running
18+
the `build.libgit2sharp.cmd` script on Windows or `build.libgit2sharp.sh` on Linux/Mac.
19+
20+
## LibGit2
21+
22+
LibGit2Sharp brings all the might and speed of libgit2, a native Git implementation, to the managed world of .Net and Mono.
23+
LibGit2 is a git submodule referencing the [libgit2 project](https://github.com/libgit2/libgit2). To learn more about
24+
submodules read [here](http://git-scm.com/book/en/v2/Git-Tools-Submodules).
25+
To build libgit2 see [here](https://github.com/libgit2/libgit2sharp/wiki/How-to-build-x64-libgit2-and-LibGit2Sharp).
26+
27+
## Making Changes
28+
29+
* Create a topic branch off master (don't work directly on master).
30+
* Implement your feature or fix your bug. Please following existing coding styles and do not introduce new ones.
31+
* Make atomic, focused commits with good commit messages.
32+
* Make sure you have added the necessary tests for your changes.
33+
* Run _all_ the tests to assure nothing else was accidentally broken.
34+
35+
## Submitting Changes
36+
37+
* Push your changes to a topic branch in your fork of the repository.
38+
* Send a Pull Request targeting the master branch. Note what issue/issues your patch fixes.
39+
40+
Some things that will increase the chance that your pull request is accepted.
41+
42+
* Following existing code conventions.
43+
* Including unit tests that would otherwise fail without the patch, but pass after applying it.
44+
* Updating the documentation and tests that are affected by the contribution.
45+
* If code from elsewhere is used, proper credit and a link to the source should exist in the code comments.
46+
Then licensing issues can be checked against LibGit2Sharp's very permissive MIT based open source license.
47+
* Having a configured git client that converts line endings to LF. [See here.](https://help.github.com/articles/dealing-with-line-endings/).
48+
# Additional Resources
49+
50+
* [General GitHub documentation](http://help.github.com/)
51+
* [GitHub pull request documentation](https://help.github.com/articles/using-pull-requests/)

Lib/CustomBuildTasks/CustomBuildTasks.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>CustomBuildTasks</RootNamespace>
1111
<AssemblyName>CustomBuildTasks</AssemblyName>
12-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<TargetFrameworkProfile />
1515
</PropertyGroup>
@@ -33,10 +33,11 @@
3333
<ItemGroup>
3434
<Reference Include="System" />
3535
<Reference Include="Microsoft.Build.Framework" />
36-
<Reference Include="Microsoft.Build.Utilities" />
36+
<Reference Include="Microsoft.Build.Utilities.v4.0" />
3737
</ItemGroup>
3838
<ItemGroup>
3939
<Compile Include="GenerateUniqueIdentifierTask.cs" />
40+
<Compile Include="GenerateNativeDllNameTask.cs" />
4041
</ItemGroup>
4142
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
4243
</Project>
1 KB
Binary file not shown.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
using System;
2+
using System.IO;
3+
using Microsoft.Build.Framework;
4+
using Microsoft.Build.Utilities;
5+
6+
namespace CustomBuildTasks
7+
{
8+
public class GenerateNativeDllNameTask : Task
9+
{
10+
public ITaskItem InputHashFile { get; set; }
11+
12+
public string OutputFile { get; set; }
13+
14+
public override bool Execute()
15+
{
16+
var fileName = InputHashFile.GetMetadata("FullPath");
17+
string libgit2FileName;
18+
19+
using (var sr = new StreamReader(fileName))
20+
{
21+
libgit2FileName = sr.ReadLine();
22+
}
23+
24+
var nativeDllName = @"namespace LibGit2Sharp.Core
25+
{{
26+
internal static class NativeDllName
27+
{{
28+
public const string Name = ""{0}"";
29+
}}
30+
}}
31+
";
32+
33+
using (var sw = new StreamWriter(OutputFile))
34+
{
35+
sw.Write(nativeDllName, libgit2FileName);
36+
}
37+
38+
return true;
39+
}
40+
}
41+
}
-981 KB
Binary file not shown.
-5.44 MB
Binary file not shown.

0 commit comments

Comments
 (0)