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

Keybase proof

I hereby claim:

  • I am nulltoken on github.
  • I am nulltoken (https://keybase.io/nulltoken) on keybase.
  • I have a public key whose fingerprint is 7574 A483 0590 8365 FE46 31C2 443A 12BC CAB4 B650

To claim this, I am signing this object:

@nulltoken
nulltoken / gist:5928977
Created July 4, 2013 16:33
libgit2 4ae29053d51968cbf49f30ae14e5405cbd9543cc build and test run
D:\libgit2\libgit2-msvc>SETLOCAL
D:\libgit2\libgit2-msvc>SET BUILD=RelWithDebInfo
D:\libgit2\libgit2-msvc>RD /S /q "cmake-build"
The system cannot find the file specified.
D:\libgit2\libgit2-msvc>MD "cmake-build"
D:\libgit2\libgit2-msvc>PUSHD "cmake-build"
@nulltoken
nulltoken / revparse-probe.sh
Created June 18, 2012 14:36
[revparse] Troubleshooting the probing logic
#!/bin/sh
retrieve_head() {
local oid=$(git reflog HEAD@{0} -n 1 --format=format:%H);
echo "$oid"
}
add_commit() {
echo "$1" > file.txt
git add .
@nulltoken
nulltoken / issue-161.patch
Created June 1, 2012 09:42
[LibGit2Sharp] Proposal for #161 fix
LibGit2Sharp.Tests/ConfigurationFixture.cs | 38 ++++++++++++++++++++++++++-
LibGit2Sharp/Configuration.cs | 36 +++++++++++++++++++-------
LibGit2Sharp/Core/Ensure.cs | 22 +++++++++++----
3 files changed, 78 insertions(+), 18 deletions(-)
diff --git a/LibGit2Sharp.Tests/ConfigurationFixture.cs b/LibGit2Sharp.Tests/ConfigurationFixture.cs
index 7e1ebd9..634ed21 100644
--- a/LibGit2Sharp.Tests/ConfigurationFixture.cs
+++ b/LibGit2Sharp.Tests/ConfigurationFixture.cs
@@ -1,6 +1,6 @@
@nulltoken
nulltoken / mono.load.cs
Created May 31, 2012 21:07
[LibGit2Sharp] Issue while loading the native dll on Mono/Windows x86
internal class Program
{
private static void Main(string[] args)
{
string originalAssemblypath = new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath;
string parentPath = Path.GetDirectoryName(originalAssemblypath);
string currentArchSubPath = "NativeBinaries/" + ProcessorArchitecture;
string path = Path.Combine(parentPath, currentArchSubPath);
Console.WriteLine("{0} = {1}", "originalAssemblypath", originalAssemblypath);
@nulltoken
nulltoken / LibGit2Sharp.Issue.153.cs
Created May 24, 2012 14:01
[LibGit2Sharp] Troubleshooting probing of the native dll on a network path
using System;
using System.IO;
using System.Reflection;
using LibGit2Sharp;
namespace ConsoleApplication2
{
internal class Program
{
private static void Main(string[] args)
@nulltoken
nulltoken / CanCopeWithEndOfFileNewlineChanges.cs
Created May 21, 2012 09:32
[LibGit2Sharp] Line ending diff handling
[Fact]
/*
* $ git init .
* $ echo -ne 'a' > file.txt
* $ git add .
* $ git commit -m "No line ending"
* $ echo -ne '\n' >> file.txt
* $ git add .
* $ git diff --cached
* diff --git a/file.txt b/file.txt
@nulltoken
nulltoken / diff.tests.cs
Created May 20, 2012 17:19
[Libgit2] Diff issues?
using System.IO;
using System.Linq;
using System.Text;
using LibGit2Sharp.Tests.TestHelpers;
using Xunit;
namespace LibGit2Sharp.Tests
{
public class DiffTreeToTargetFixture : BaseFixture
{
@nulltoken
nulltoken / dump.txt
Created May 9, 2012 13:13
[Libgit2] fetching libgit2 over git protocol
0039git-upload-pack /libgit2/libgit2.git.host=github.com.009b0536afcaa9c27105b184d2fccac1a7b9e778f27c HEAD.multi_ack thin-pack side-band side-band-64k ofs-delta shallow no-progress include-tag multi_ack_detailed
004432dc20b5af696724753ea54a4dacc3fa479774a1 refs/heads/clay-rename
004255f207110fac886861b100831305c32c94da01da refs/heads/clay-test
0049107e30e9c58facc3fdafefa7bb17ab6f04ddd2ec refs/heads/config-int-types
00478cd767ef52ad35331f082394ec93df8e57757120 refs/heads/config-parsing
00440536afcaa9c27105b184d2fccac1a7b9e778f27c refs/heads/development
004a4ef14af93517b3842bc0dfa24147cf10dd029582 refs/heads/development-merge
0047bdd31dd5e832126b2f22fccbe244a1106c241ab0 refs/heads/error-handling
0040d3789825d3823bdbbebe278172345243618ca541 refs/heads/fileops
0040ce49c7a8a902bd3a74a59a356dd11886e83d2e92 refs/heads/filters
@nulltoken
nulltoken / status.fail.2.cs
Created May 9, 2012 11:28
(LibGit bug?] Status failing test
[Fact]
public void RetrievingTheStatusOfAnEmptyRepositoryHonorsTheGitIgnoreDirectives()
{
SelfCleaningDirectory scd = BuildSelfCleaningDirectory();
using (Repository repo = Repository.Init(scd.DirectoryPath))
{
string relativePath = "look-ma.txt";
string fullFilePath = Path.Combine(repo.Info.WorkingDirectory, relativePath);
File.WriteAllText(fullFilePath, "I'm going to be ignored!");