Skip to content

Commit 49612cd

Browse files
Change how/where the logic for file renames is
1 parent d186286 commit 49612cd

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

diff-so-fancy

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,16 @@ sub do_dsf_stuff {
240240
###############
241241
# File rename #
242242
###############
243-
} elsif ($line =~ /^${ansi_color_regex}similarity index 100%/) {
243+
} elsif ($line =~ /^${ansi_color_regex}similarity index (\d+)%/) {
244+
my $simil = $4;
245+
246+
# If it's a move with content change we ignore this and the next two lines
247+
if ($simil != 100) {
248+
shift(@$input);
249+
shift(@$input);
250+
next;
251+
}
252+
244253
my $next = shift(@$input);
245254
my ($file1) = $next =~ /rename from (.+)/;
246255

@@ -260,10 +269,6 @@ sub do_dsf_stuff {
260269

261270
$i += 3; # We've consumed three lines
262271
next;
263-
} elsif ($line =~ /^${ansi_color_regex}similarity index/) {
264-
shift(@$input);
265-
shift(@$input);
266-
next;
267272
#####################################
268273
# Just a regular line, print it out #
269274
#####################################

0 commit comments

Comments
 (0)