镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
962aeb3
Bump libgit2
Oct 5, 2012
b613a8b
Fix GIT_REVWALKOVER -> GIT_ITEROVER (renamed in libgit2)
Oct 5, 2012
e28f102
Fix Repository#create_branch crashing when a direct reference was pas…
Oct 8, 2012
e068d35
Add tests for Reference.valid?
Oct 8, 2012
67ba33b
Add Rugged::Repository.clone.
Oct 5, 2012
a1222be
Add wrappers for git_checkout_tree et al
Oct 5, 2012
99f96dc
First working implementation of Repository#checkout_tree .
Oct 8, 2012
6789030
Further complete Repository#checkout, add docs.
Oct 8, 2012
ba34a71
Extract the checkout argument parsing into an extra function, add Rep…
Oct 8, 2012
a42681f
Add Repository#checkout_head.
Oct 8, 2012
f7a1b90
Add tests for Repository::clone.
Oct 8, 2012
92b7859
Add :bare option to Repository::clone and allow passing checkout opti…
Oct 8, 2012
e03ae59
Make Repository::clone release the GVL.
Oct 9, 2012
6f337a2
Move test for bare repos before local test.
Oct 9, 2012
772aceb
Add tests for Repository::checkout.
Oct 9, 2012
16f7722
Use memset() to zero out the git_checkout_options struct before filli…
Oct 10, 2012
4e8a00e
Minor comment corrections
Oct 10, 2012
3c3e6ff
Add tests for Repository#checkout_index
Oct 10, 2012
57d9aab
Use an own testing context for the checkout tests.
Oct 10, 2012
da98988
Add tests for Repository#checkout_head and fix it.
Oct 10, 2012
ba82230
Bump libgit2.
Oct 10, 2012
d3514be
Merge branch 'bump-libgit2' into implement-clone-checkout
Oct 10, 2012
8593fcc
Use tabs for indentation.
Oct 10, 2012
06b9cb2
Use old hash syntax.
Oct 10, 2012
ef1b71c
Use rb_thread_blocking_region() only on Ruby 1.9.
Oct 10, 2012
b2f96fb
Correct some typos, include ruby/version.h
Oct 10, 2012
dc5f814
Check Ruby version in extconf.rb, ruby/version.h has been deprecated …
Oct 11, 2012
452495a
Merge branch 'development' into implement-clone-checkout
Oct 31, 2012
9761802
Adapt new libgit2 API for clone/checkout.
Oct 31, 2012
c9d5d49
Repository#clone_repo now accepts a block for transmission statistics.
Nov 1, 2012
13b8f0f
Merge branch 'development' into implement-clone-checkout
Dec 6, 2012
41234dd
Adapt new libgit2 API
Dec 6, 2012
2002f67
Reorganise clone code to support the new callbacks provided by libgit2.
Dec 7, 2012
1518e46
Correct checkout callback handling
Dec 7, 2012
2a3b6e7
Add tests for callbacks
Dec 7, 2012
86b5a4a
Some doc fixes
Dec 7, 2012
12c1ba2
Remove debugging flags from extconf.rb
Dec 7, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ext/rugged/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,12 @@ def sys(cmd)
end
end

print("checking whether we're compiling for Ruby >= 1.9... ")
if RUBY_VERSION >= "1.9"
$CFLAGS += " -DUSING_RUBY_19"
puts "yes"
else
puts "no"
end

create_makefile("rugged/rugged")
17 changes: 17 additions & 0 deletions ext/rugged/rugged_reference.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,22 @@ static VALUE rb_git_ref_exist(VALUE klass, VALUE rb_repo, VALUE rb_name)
return Qtrue;
}

/*
* call-seq:
* Reference.valid?(name) -> true or false
*
* Checks whether the given string is a well-formed reference
* name. Note this just checks the syntax, no semantic checks
* are performed.
*/
static VALUE rb_git_ref_valid(VALUE self, VALUE rb_str)
{
if (git_reference_is_valid_name(StringValueCStr(rb_str)))
return Qtrue;
else
return Qfalse;
}

/*
* call-seq:
* Reference.create(repository, name, oid, force = false) -> new_ref
Expand Down Expand Up @@ -562,6 +578,7 @@ void Init_rugged_reference()
rb_define_singleton_method(rb_cRuggedReference, "lookup", rb_git_ref_lookup, 2);
rb_define_singleton_method(rb_cRuggedReference, "exist?", rb_git_ref_exist, 2);
rb_define_singleton_method(rb_cRuggedReference, "exists?", rb_git_ref_exist, 2);
rb_define_singleton_method(rb_cRuggedReference, "valid?", rb_git_ref_valid, 1);
rb_define_singleton_method(rb_cRuggedReference, "create", rb_git_ref_create, -1);
rb_define_singleton_method(rb_cRuggedReference, "pack_all", rb_git_ref_packall, 1);
rb_define_singleton_method(rb_cRuggedReference, "each", rb_git_ref_each, -1);
Expand Down
Loading