当 git 合并从两个不同的 parents 得到相同的行时,哪一个受到指责?

when a git merge gets the same line from two different parents, which one gets blamed?

如果我在功能分支中更改某些内容,然后将其更改回来,然后合并,即使合并提交的 parent #1 对该行没有任何更改,它会归咎于提交我改回的地方,而不是原来的提交。这是怎么计算的?

$ git init
$ # create a simple file
$ echo line 1 >> file.txt
$ echo line 2 >> file.txt
$ echo line 3 >> file.txt
$ git add file.txt
$ git commit -minitial
$ # now create a feature branch
$ git checkout -b feature
$ # and check off some items in the file
$ nano file.txt # so that when you are done you have
$ cat file.txt
line 1
line 2 check
line 3 check
$ git add file.txt
$ git commit -m'check off some items'
$ # now undo something in the feature branch
$ nano file.txt # and take away one of the checks:
$ cat file.txt
line 1
line 2 check
line 3
$ git add file.txt
$ git commit -m'uncheck one that I checked by accident'
$ git log --pretty=oneline
7321c57f0b2e6feb35a8498efb2939eb1e4268f2 (HEAD -> feature) uncheck one that I checked by accident
eb267c857bb529ee80dd1309994fcd76d6586c12 check off some items
d027e2f7185c2287337ad275d888fc19acbf2292 initial
$ # now go to master and merge this
$ git checkout master
$ git merge --no-ff feature
$ # so now we only have one difference between this and the previous commit
$ git diff HEAD^
diff --git a/file.txt b/file.txt
index a92d664..99e5441 100644
--- a/file.txt
+++ b/file.txt
@@ -1,3 +1,3 @@
 line 1
-line 2
+line 2 check
 line 3

然而!!!

$ git blame file.txt

^d027e2f .. line 1
eb267c85 .. line 2 check
7321c57f .. line 3

已经更改并改回的行归咎于它被改回的提交哈希!

我希望看到类似

的内容
^d027e2f .. line 1
eb267c85 .. line 2 check
d027e2f7 .. line 3

我想当合并的任何一侧的提交都做出相同的更改时,必须做出类似的决定。它如何确定哪个 parent 受到指责?我以为它永远是 parent #1。 (HEAD^指的是同一个)

它是否总是归咎于该行中的最新提交? 如果我在一个功能分支中更改了某些内容,然后又在同一个功能分支中将其更改回来,我宁愿责怪原作者。

如果你想要我期望的结果,就这样

git blame --first-parent