Steven Walter <stevenrwalter@xxxxxxxxx> writes: > - my %o = ( D => 1, R => 0, C => -1, A => 3, M => 3, T => 3 ); > + my %o = ( D => -2, R => 0, C => -1, A => 3, M => 3, T => 3 ); I know this code arrangement dates back to cf52b8f (git-svn: fix several corner-case and rare bugs with 'commit', 2006-02-20), but somehow I find it extremely hard to follow. The absolute values do not matter (this is only used to sort the classes of operations), and the fact that A/M/T shares the same value does not help a stable sort result (as it is used as a key to sort {} that is not given any key other than $o{$ab->{chg}} to tie-break). I suspect that writing it this way my %o = (D => 0, C => 1, R => 2, A => 3, M => 4, T => 5) or even my $ord = 0; my %o = map { $_ => $ord++ } qw(D C R A M T); would make it much easier to follow. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html