Skip to content

Commit

Permalink
Merge pull request libgit2#340 from libgit2/cmn/updates
Browse files Browse the repository at this point in the history
Update to latest libgit2
  • Loading branch information
Vicent Marti committed Mar 25, 2014
2 parents 71a3f9f + a94a2e6 commit 13e5068
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 21 deletions.
2 changes: 1 addition & 1 deletion ext/rugged/rugged.h
Expand Up @@ -91,7 +91,7 @@ VALUE rugged_diff_line_new(const git_diff_line *line);
VALUE rb_git_delta_file_fromC(const git_diff_file *file);

void rugged_parse_diff_options(git_diff_options *opts, VALUE rb_options);
void rugged_parse_merge_options(git_merge_tree_opts *opts, VALUE rb_options);
void rugged_parse_merge_options(git_merge_options *opts, VALUE rb_options);

VALUE rugged_otype_new(git_otype t);
git_otype rugged_otype_get(VALUE rb_type);
Expand Down
2 changes: 1 addition & 1 deletion ext/rugged/rugged_repo.c
Expand Up @@ -728,7 +728,7 @@ static VALUE rb_git_repo_merge_commits(int argc, VALUE *argv, VALUE self)
git_commit *our_commit, *their_commit;
git_index *index;
git_repository *repo;
git_merge_tree_opts opts = GIT_MERGE_TREE_OPTS_INIT;
git_merge_options opts = GIT_MERGE_OPTIONS_INIT;

rb_scan_args(argc, argv, "20:", &rb_our_commit, &rb_their_commit, &rb_options);

Expand Down
20 changes: 4 additions & 16 deletions ext/rugged/rugged_settings.c
Expand Up @@ -48,25 +48,13 @@ static void set_search_path(int level, VALUE value)

static VALUE get_search_path(int level)
{
char *buf = NULL;
size_t len = 64;
int error;
git_buf buf = {NULL};
VALUE ret;

do {
len *= 2;
buf = xrealloc(buf, len);
rugged_exception_check(git_libgit2_opts(GIT_OPT_GET_SEARCH_PATH, level, &buf));

error = git_libgit2_opts(GIT_OPT_GET_SEARCH_PATH, level, buf, len);
} while (error == GIT_EBUFS);

if (error < 0) {
xfree(buf);
rugged_exception_raise();
}

ret = rb_str_new_utf8(buf);
xfree(buf);
ret = rb_str_new_utf8(buf.ptr);
git_buf_free(&buf);

return ret;
}
Expand Down
4 changes: 2 additions & 2 deletions ext/rugged/rugged_tree.c
Expand Up @@ -481,7 +481,7 @@ static VALUE rb_git_tree_diff_workdir(int argc, VALUE *argv, VALUE self)
return rugged_diff_new(rb_cRuggedDiff, self, diff);
}

void rugged_parse_merge_options(git_merge_tree_opts *opts, VALUE rb_options)
void rugged_parse_merge_options(git_merge_options *opts, VALUE rb_options)
{
if (!NIL_P(rb_options)) {
VALUE rb_value;
Expand Down Expand Up @@ -559,7 +559,7 @@ static VALUE rb_git_tree_merge(int argc, VALUE *argv, VALUE self)
git_tree *tree, *other_tree, *ancestor_tree;
git_repository *repo;
git_index *index;
git_merge_tree_opts opts = GIT_MERGE_TREE_OPTS_INIT;
git_merge_options opts = GIT_MERGE_OPTIONS_INIT;
int error;

if (rb_scan_args(argc, argv, "12", &rb_other_tree, &rb_ancestor_tree, &rb_options) == 2) {
Expand Down
2 changes: 1 addition & 1 deletion vendor/libgit2
Submodule libgit2 updated 51 files
+9 −0 PROJECTS.md
+1 −1 include/git2/branch.h
+5 −6 include/git2/common.h
+237 −109 include/git2/merge.h
+2 −2 include/git2/refs.h
+3 −3 include/git2/revert.h
+2 −1 include/git2/transport.h
+1 −1 src/branch.c
+16 −27 src/checkout.c
+4 −4 src/index.c
+2 −0 src/index.h
+226 −205 src/merge.c
+3 −14 src/merge.h
+180 −83 src/merge_file.c
+0 −78 src/merge_file.h
+1 −1 src/odb.c
+1 −1 src/pqueue.c
+154 −35 src/refdb_fs.c
+1 −1 src/refs.c
+3 −3 src/revert.c
+14 −4 src/revwalk.c
+2 −1 src/revwalk.h
+14 −6 src/settings.c
+102 −19 src/transports/winhttp.c
+7 −5 tests/core/env.c
+31 −0 tests/core/pqueue.c
+175 −0 tests/merge/files.c
+6 −4 tests/merge/merge_helpers.c
+48 −4 tests/merge/merge_helpers.h
+4 −26 tests/merge/trees/automerge.c
+3 −14 tests/merge/trees/commits.c
+2 −2 tests/merge/trees/renames.c
+1 −1 tests/merge/trees/treediff.c
+1 −1 tests/merge/trees/trivial.c
+107 −0 tests/merge/workdir/analysis.c
+11 −27 tests/merge/workdir/dirty.c
+0 −148 tests/merge/workdir/fastforward.c
+14 −21 tests/merge/workdir/renames.c
+48 −84 tests/merge/workdir/setup.c
+26 −120 tests/merge/workdir/simple.c
+2 −8 tests/merge/workdir/submodules.c
+1 −4 tests/merge/workdir/trivial.c
+120 −0 tests/refs/reflog/reflog.c
+188 −12 tests/repo/head.c
+6 −4 tests/reset/hard.c
+6 −4 tests/reset/mixed.c
+1 −0 tests/resources/merge-resolve/.gitted/refs/heads/previous
+4 −4 tests/revert/workdir.c
+59 −0 tests/revwalk/basic.c
+64 −1 tests/revwalk/mergebase.c
+11 −6 tests/structinit/structinit.c

0 comments on commit 13e5068

Please sign in to comment.