From deb216713a4fdabf77a7049e16595a2390226655 Mon Sep 17 00:00:00 2001 From: Haitao Li Date: Tue, 30 Aug 2011 22:19:58 +0800 Subject: [PATCH 1/4] Formatting change: one tab per line --- Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index b6af23f..cadc9d6 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,15 @@ REBAR=$(shell which rebar || echo ./rebar) all: compile ./rebar: - erl -noshell -s inets start \ - -eval 'httpc:request(get, {"http://hg.basho.com/rebar/downloads/rebar", []}, [], [{stream, "./rebar"}])' \ - -s init stop - chmod +x ./rebar + erl -noshell -s inets start \ + -eval 'httpc:request(get, {\ + "http://hg.basho.com/rebar/downloads/rebar", []\ + }, [], [{stream, "./rebar"}])' \ + -s init stop + chmod +x ./rebar compile: $(REBAR) - @$(REBAR) compile + @$(REBAR) compile clean: $(REBAR) - @$(REBAR) clean + @$(REBAR) clean From 3dc29e79b47e6ba58abff7635e377d6e3902ca1e Mon Sep 17 00:00:00 2001 From: Haitao Li Date: Tue, 30 Aug 2011 22:39:08 +0800 Subject: [PATCH 2/4] Bump version: libgit -> libgit2 --- c_src/geef.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/c_src/geef.c b/c_src/geef.c index 9f63cbe..049cf74 100644 --- a/c_src/geef.c +++ b/c_src/geef.c @@ -1,15 +1,16 @@ #include "erl_nif.h" #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define MAXBUFLEN 1024 @@ -23,7 +24,7 @@ geef_hex_to_raw(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) return enif_make_badarg(env); git_oid oid; - git_oid_mkstr(&oid, sha); + git_oid_fromstr(&oid, sha); ErlNifBinary ibin; enif_alloc_binary(20, &ibin); @@ -49,7 +50,7 @@ geef_object_exists(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) git_odb_open(&odb, path); git_oid oid; - git_oid_mkstr(&oid, sha); + git_oid_fromstr(&oid, sha); int exists = git_odb_exists(odb, &oid); if(exists == 1) { From 663d2f0893a949a568d7dfcd8044b93972ac3502 Mon Sep 17 00:00:00 2001 From: Haitao Li Date: Tue, 30 Aug 2011 22:57:57 +0800 Subject: [PATCH 3/4] Make escript shebang portable --- geef | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geef b/geef index 7485a95..dfa2057 100755 --- a/geef +++ b/geef @@ -1,4 +1,4 @@ -#!/usr/local/Cellar/erlang/R14B/bin/escript +#!/usr/bin/env escript %% -*- erlang -*- %%! debug verbose -noshell -pa ebin From 7f76011a1dd8c5c423eed2d0591fb732ad09b928 Mon Sep 17 00:00:00 2001 From: Haitao Li Date: Tue, 30 Aug 2011 23:04:43 +0800 Subject: [PATCH 4/4] Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c4db9bf..7403223 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ The API looks basically like this: CONTRIBUTING ============== -Fork schacon/ribbit on GitHub, make it awesomer (preferably in a branch named +Fork schacon/geef on GitHub, make it awesomer (preferably in a branch named for the topic), send a pull request.