string rootedPath = Repository.Init("D:\temp\rooted\path");
Console.WriteLine(rootedPath); // "D:\temp\rooted\path\.git\"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Fact] | |
public void RetrievingTheStatusOfARepositoryReturnNativeFilePaths() | |
{ | |
// Initialize a new repository | |
SelfCleaningDirectory scd = BuildSelfCleaningDirectory(); | |
const string directoryName = "directory"; | |
const string fileName = "Testfile.txt"; | |
// Create a file and insert some content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "clar_libgit2.h" | |
#include "path.h" | |
#include "fileops.h" | |
#include "remote.h" | |
git_repository *repo; | |
git_remote *remote; | |
void test_network_fetch__initialize(void) | |
{ | |
cl_git_pass(git_repository_init(&repo, "fetched", false)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace ConsoleApplication97854 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
/* |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void CanListMergeCommits() | |
{ | |
using (var repo = new Repository(@"D:\temp\Linux\linux-2.6")) | |
{ | |
var cs = repo.Commits.Where(c => c.ParentsCount > 1); | |
foreach (var c in cs) | |
{ | |
Console.WriteLine("{0} : {1} - {2}", c.Committer.When.ToString("o"), c.Sha, c.ParentsCount); |
NewerOlder