Vim逃犯:Gblame reblame选项 [英] Vim Fugitive: Gblame reblame options

查看:185
本文介绍了Vim逃犯:Gblame reblame选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近一直在使用逃亡者的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>



  • <对于常见情况,即没有 [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>

    • - the simplest case. Use the commit in question under your cursor and reblame the file.
    • ~ Is equivalent to running git blame <rev>~[count] -- <file>
    • P Is equivalent to running git blame <rev>^[count] -- <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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆