为什么`git range-diff`没有显示差异?

时间:2020-03-07 15:44:50

标签: git git-diff

我有git range-diff的下一个输出

enter image description here

我看到8fa7b780更改了历史记录中的3272627a提交,但没有显示任何其他内容。前两条线(红色/绿色)是什么意思?

UPD

$ git range-diff 11f75961...1c1e98db
1:  8fa7b780 < -:  -------- Add Test: interval_match.t
-:  -------- > 1:  3272627a Add Test: interval_match.t
2:  bb4bd0ca = 2:  73b5794b Allow to force current month
3:  9e2f487b = 3:  ea8c2570 Saldo anal table now does not requires extra processing
4:  ddd3362f = 4:  6a82658a Prettify code
5:  b444b0c7 = 5:  2896bf63 Add check for deactivated agreements/contractors
6:  7464d470 = 6:  f2eac3de Install required modules to pars XLS files
7:  11f75961 = 7:  1c1e98db Allow to upload saldo via web interface

UPD

如果我比较提交8fa7b7803272627a,则会看到更改:

interdiff -w -b -B <(git show 8fa7b780) <(git show 3272627a)
diff -wbBu b/t/MaitreD/interval_match.t b/t/MaitreD/interval_match.t
--- b/t/MaitreD/interval_match.t
+++ b/t/MaitreD/interval_match.t
@@ -15,7 +15,7 @@
 my $db =  $t->app->db;


-sub match {
+sub query {
    my $qr_im =  <<"    SQL";
        select * from interval_match( $_[0], $_[1], '$_[2]' )
    SQL

range-diff未显示它们。我错过了什么吗?

$ git --version
git version 2.24.1

1 个答案:

答案 0 :(得分:1)

我可以使用 --creation-factor 参数。

<块引用>
  --creation-factor=<percent>
      Set the creation/deletion cost fudge factor to <percent>. Defaults to 60.
      Try a larger value if git range-diff erroneously considers a large change a
      total rewrite (deletion of one commit and addition of another), and a
      smaller one in the reverse case. See the ``Algorithm`` section below for an
      explanation why this is needed.

例如:

git range-diff --creation-factor=99 11f75961...1c1e98db