2016-11-20 138 views
2

我在下面做了提交。它基本上顯示了幾個文件與靜態html重新命名和移動。git rename後的R {number}中的數字是什麼意思?

commit 8449e207d529779f92bfe8b4eb2864a3f3edf69a 
Author: Carl-Erik Kopseng <[email protected]> 
Date: Sat Nov 19 14:40:47 2016 +0100 

    Integrate static html into epi blocks as partials 

R079 Web/Views/Shared/Blocks/ChristmasLotteryBlock.cshtml Web/Views/Shared/Blocks/ChristmasLotteryBlock/Index.cshtml 
R076 Web/Static/blocks/_block_christmas-lottery-intro.html Web/Views/Shared/Blocks/ChristmasLotteryBlock/_intro.cshtml 
R099 Web/Static/blocks/_block_christmas-lottery-popup.html Web/Views/Shared/Blocks/ChristmasLotteryBlock/_popup.cshtml 
M  Web/Web.csproj 

076,099和079是指什麼?我知道R可能代表「重命名」。

回答

3

引用the git diff documentation

狀態字母C和R總是隨後的得分(表示在移動或複製 的源和目標之間的相似性 百分比)。狀態字母M後可以跟一個分數(表示 不同之處的百分比)用於文件重寫。

(你只能參考M後跟一個數字,如果你使用的是-B標誌下面是添加-B的有點做作的例子,引起M狀態有一個附加得分:

$ git diff --raw -M HEAD~182 | grep 'M[0-9]' 
$ git diff --raw -B -M HEAD~182 | grep 'M[0-9]' 
:100644 100644 2b1487d... bdb5579... M074 Makefile 
:100644 100644 b639986... 8d8ebfe... M067 fcall.h 
:100644 100644 bc4f828... 2e07ef6... M060 lib9p.h 
:100644 100644 f9b5d18... 15e1ae8... M066 request.c 

這種特殊的倉庫有184首父犯下從頭開始:

$ git rev-list --count --first-parent HEAD 
184 

與前幾℃以內出現很多,雖然不是全部,文件因此,在使用-B時,比較HEAD~182HEAD有很多變化,導致許多斷線對。)