Vim逃犯:Gblame reblame选项 [英] Vim Fugitive: Gblame reblame options
问题描述
我最近一直在使用逃亡者的Gblame,但不太明白reblame的作用。
有人可以更清楚地描述这些选项的作用:
- 在提交时回扣
〜reblame在第[count]个第一个祖父母
P reblame at [count ]的父母(如HEAD ^ [count])
将reblame视为导航到提交,然后在您的文件上运行blame或 git blame< commit> - < file>
-
-
最简单的情况。 -
〜
相当于运行git blame < rev>〜[count] - < file>
-
P
git blame< rev> ^ [count] - < file>
-
git help gitrevisions
- Git Tools - 修订版本选择
- 克拉和倾斜,重置和还原注意:本文正在讨论重置,但图形和修订部分对文章中间有帮助。
-
the simplest case. Use the commit in question under your cursor and reblame the file.~
Is equivalent to runninggit blame <rev>~[count] -- <file>
P
Is equivalent to runninggit blame <rev>^[count] -- <file>
git help gitrevisions
- Git Tools - Revision Selection
- Carats and Tildes, Resets and Reverts Note: this article is talking about reset however the graph and revision part is helpful towards the middle of the article.
<对于常见情况,即没有
[count]
,〜
和 P 是等效的。 (请注意, [count]
默认为1)
从 git快速修订教程帮助gitrevisions
:
以下是Jon Loeliger的插图。
提交节点B和C都是提交节点A的父节点。
父提交按从左到右的顺序排列。
G H I J
\ / \ /
D E F
\ | / \
\ | / |
\ | / |
BC
\ /
\ /
A
A = = A ^ 0
B = A ^ = A ^ 1 = A〜1
C = A ^ 2 = A ^ 2
D = A ^^ = A ^ 1 ^ 1 = A〜2
E = B ^ 2 = A ^^ 2
F = B ^ 3 = A ^^ 3
G = A ^^^ = A ^ 1 ^ 1 ^ 1 = A〜3
H = D ^ 2 = B ^^ 2 = A ^^ ^ 2 = A〜2 ^ 2
I = F ^ = B ^ 3 ^ = A ^^ 3 ^
J = F ^ 2 = B ^ 3 ^ 2 = A ^^ 3 ^ 2
要了解有关git修订记法的更多信息,请参阅:
有关 git blame
的更多帮助,请参阅 git help blame
I've been using Fugitive's Gblame recently but don't quite understand what "reblame" does.
Can someone describe a little more clearly what these options do:
- reblame at commit
~ reblame at [count]th first grandparent
P reblame at [count]th parent (like HEAD^[count])
解决方案 Think of reblame as navigating to a commit and then running blame on your file or git blame <commit> -- <file>
For the common case, i.e. no [count]
, ~
and P
are the equivalent. (Note that [count]
defaults to 1)
Quick revision tutorial taken from git help gitrevisions
:
Here is an illustration, by Jon Loeliger.
Both commit nodes B and C are parents of commit node A.
Parent commits are ordered left-to-right.
G H I J
\ / \ /
D E F
\ | / \
\ | / |
\|/ |
B C
\ /
\ /
A
A = = A^0
B = A^ = A^1 = A~1
C = A^2 = A^2
D = A^^ = A^1^1 = A~2
E = B^2 = A^^2
F = B^3 = A^^3
G = A^^^ = A^1^1^1 = A~3
H = D^2 = B^^2 = A^^^2 = A~2^2
I = F^ = B^3^ = A^^3^
J = F^2 = B^3^2 = A^^3^2
To understand more about git revision notation see:
For more help with git blame
see git help blame
这篇关于Vim逃犯:Gblame reblame选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!