Skip to content

Commit c59b8bb

Browse files
committed
Fix indentation / method names
We're only wrapping one function now, so fix the method name
1 parent 59af00e commit c59b8bb

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

ext/rugged/rugged_index.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ static VALUE rb_git_index_readtree(VALUE self, VALUE rb_tree)
791791
* marked with a single entry in the diff. If this flag is set to true,
792792
* all files under ignored directories will be included in the diff, too.
793793
*/
794-
static VALUE rb_git_index_diff(VALUE self, VALUE rb_other, VALUE rb_options)
794+
static VALUE rb_git_diff_tree_to_index(VALUE self, VALUE rb_other, VALUE rb_options)
795795
{
796796
git_index *index;
797797
git_diff_options opts = GIT_DIFF_OPTIONS_INIT;
@@ -806,13 +806,13 @@ static VALUE rb_git_index_diff(VALUE self, VALUE rb_other, VALUE rb_options)
806806
owner = rugged_owner(self);
807807
Data_Get_Struct(owner, git_repository, repo);
808808

809-
// Need to flip the reverse option, so that the index is by default
810-
// the "old file" side of the diff.
811-
opts.flags ^= GIT_DIFF_REVERSE;
809+
// Need to flip the reverse option, so that the index is by default
810+
// the "old file" side of the diff.
811+
opts.flags ^= GIT_DIFF_REVERSE;
812812

813-
git_tree *other_tree;
814-
Data_Get_Struct(rb_other, git_tree, other_tree);
815-
error = git_diff_tree_to_index(&diff, repo, other_tree, index, &opts);
813+
git_tree *other_tree;
814+
Data_Get_Struct(rb_other, git_tree, other_tree);
815+
error = git_diff_tree_to_index(&diff, repo, other_tree, index, &opts);
816816

817817
xfree(opts.pathspec.strings);
818818
rugged_exception_check(error);
@@ -1229,7 +1229,7 @@ void Init_rugged_index(void)
12291229
rb_define_method(rb_cRuggedIndex, "get", rb_git_index_get, -1);
12301230
rb_define_method(rb_cRuggedIndex, "[]", rb_git_index_get, -1);
12311231
rb_define_method(rb_cRuggedIndex, "each", rb_git_index_each, 0);
1232-
rb_define_private_method(rb_cRuggedIndex, "_diff", rb_git_index_diff, 2);
1232+
rb_define_private_method(rb_cRuggedIndex, "diff_tree_to_index", rb_git_diff_tree_to_index, 2);
12331233
rb_define_private_method(rb_cRuggedIndex, "diff_index_to_workdir", rb_git_diff_index_to_workdir, 1);
12341234

12351235
rb_define_method(rb_cRuggedIndex, "conflicts?", rb_git_index_conflicts_p, 0);

lib/rugged/index.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ def diff(*args)
99
diff_index_to_workdir options
1010
else
1111
if other.is_a? ::Rugged::Commit
12-
_diff other.tree, options
12+
diff_tree_to_index other.tree, options
1313
else
1414
if other.is_a? ::Rugged::Tree
15-
_diff other, options
15+
diff_tree_to_index other, options
1616
else
1717
raise TypeError, "A Rugged::Commit or Rugged::Tree instance is required"
1818
end

0 commit comments

Comments
 (0)