Skip to content

Commit e8afe33

Browse files
Allow disabling rename detection for merge operations.
1 parent d41980c commit e8afe33

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ext/rugged/rugged_tree.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,8 @@ void rugged_parse_merge_options(git_merge_options *opts, VALUE rb_options)
487487
}
488488
}
489489

490-
if (RTEST(rb_hash_aref(rb_options, CSTR2SYM("renames")))) {
491-
opts->flags |= GIT_MERGE_FIND_RENAMES;
490+
if (rb_hash_aref(rb_options, CSTR2SYM("renames")) == Qfalse) {
491+
opts->flags &= ~GIT_MERGE_FIND_RENAMES;
492492
}
493493

494494
if (RTEST(rb_hash_aref(rb_options, CSTR2SYM("fail_on_conflict")))) {
@@ -515,7 +515,8 @@ void rugged_parse_merge_options(git_merge_options *opts, VALUE rb_options)
515515
* The following options can be passed in the +options+ Hash:
516516
*
517517
* :renames ::
518-
* If true, looking for renames will be enabled (`--find-renames`).
518+
* If true, looking for renames will be enabled (`--find-renames`),
519+
* set to false to disable (default true).
519520
*
520521
* :rename_threshold ::
521522
* An integer specifying the minimum similarity of a file to be

0 commit comments

Comments
 (0)