Skip to content

Instantly share code, notes, and snippets.

View nulltoken's full-sized avatar
💭
I may be slow to respond.

nulltoken nulltoken

💭
I may be slow to respond.
View GitHub Profile
@nulltoken
nulltoken / status.fail.cs
Created May 8, 2012 21:06
(LibGit bug?] Surprisingly failing test
[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
@nulltoken
nulltoken / fetch.c
Created May 8, 2012 10:55
[Libgit2] fetching
#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));
@nulltoken
nulltoken / Program.cs
Created April 12, 2012 22:35
[LibGit2Sharp] *Untested* mocked proof of concept of a TreeDefinition - A building block to ease the generation of Trees in the odb
using System;
using System.Collections.Generic;
namespace ConsoleApplication97854
{
class Program
{
static void Main(string[] args)
{
/*
@nulltoken
nulltoken / gist:1917474
Created February 26, 2012 16:07
LibGit2Sharp issue 115
This file has been truncated, but you can view the full file.
[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);
@nulltoken
nulltoken / gist:976649
Created May 17, 2011 15:07
Redcarpet rendering issues?

Test

CSharp

C#

string rootedPath = Repository.Init("D:\temp\rooted\path");

Console.WriteLine(rootedPath);    // "D:\temp\rooted\path\.git\"