git log over在使用--follow时限制输出? [英] git log over restricts output when using --follow?

查看:110
本文介绍了git log over在使用--follow时限制输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在以下服务器上:

  gsl @ aragorn:〜/ gitTest> uname -a 
Linux aragorn 2.6.31.12-0.2-default#1 SMP 2010-03-16 21:25:39 +0100 i686 i686 i386 GNU / Linux

gsl @ aragorn:〜 / gitTest> cat / etc / SuSE-release

openSUSE 11.2(i586)
VERSION = 11.2

我使用下面的git:

  gsl @ aragorn:〜/ gitTest> git --version 

git version 1.7.2.2

一个bash别名 gitnp ='git --no-pager'):

(1)

  gsl @ aragorn:〜/ gitTest> gitnp log --pretty = oneline junk.txt 
500e8791578c5baf7a139d4997841769a995ac6b mod of junk and junk3
594ceed7a0fb35a860a6e2cb913d5398f09a861f 1st mod junk.txt
df271b2ebd5801bd8d827b0630577cad51c40896 initial junk.txt

(2)

  gsl @ aragorn:〜 / gitTest> gitnp日志的垃圾和junk3 
--follow --pretty = ONELINE junk.txt
500e8791578c5baf7a139d4997841769a995ac6b MOD 594ceed7a0fb35a860a6e2cb913d5398f09a861f第一模junk.txt
df271b2ebd5801bd8d827b0630577cad51c40896初始junk.txt


$ 3
$ b $ $ $ $ $ $ $ $ $ gsl @阿拉贡:〜/ gitTest> gitnp log 2 --follow --pretty = oneline junk.txt
500e8791578c5baf7a139d4997841769a995ac6b mod of junk and junk3

(4)

  gsl @ aragorn:〜/ gitTest> gitnp log 2 --pretty = oneline junk.txt 
500e8791578c5baf7a139d4997841769a995ac6b mod of junk and junk3
594ceed7a0fb35a860a6e2cb913d5398f09a861f 1st mod junk.txt

为什么我没有看到上面第(3)项的2个输出行?

- => Gregg <= -




我升级到了最新和最棒的,但仍然有同样的问题:


gsl @ aragorn:〜/ gitTest> git --version

git 1.7.2.3版



gsl @ aragorn:〜/ gitTest> gitnp log -2 --follow --pretty = oneline junk.txt
500e8791578c5baf7a139d4997841769a995ac6b垃圾和垃圾3的模式

gsl @ aragorn:〜/ gitTest> gitnp log --follow --pretty = oneline junk.txt
500e8791578c5baf7a139d4997841769a995ac6b mod of junk and junk3
594ceed7a0fb35a860a6e2cb913d5398f09a861f 1st mod junk.txt
df271b2ebd5801bd8d827b0630577cad51c40896 initial junk.txt

那么是否有另一种非图形可靠的git方式来获取这些信息?解析方案

with git1.7.2.3
$ b



  • git log --follow -M -p 在1.7.2中被严重破坏,报告
    声明失败。

  • 运行 git日志,然而,
    强制用户解雇它。 blockquote>

    我不确定为什么' - 跟着-2 '的组合会限制输出只有一行。

    然而阅读 Linux有什么说明何时引入关注


    - 关注完全是黑客,只是为了满足前SVN用户,他们从来不知道任何有关父母或修改图的信息。

    这不完全根本,但是 - 遵循的当前实现实际上是一个快速预处理事物,它被固定在修订行走逻辑上,而不是任何真正的整数。



    它的字面意思是被设计成SVN noob,而不是真正的git功能的东西。

    这个想法是,你会远离破碎)思维的思维方式,重新命名重要事项。



    On the following server:

    gsl@aragorn:~/gitTest> uname -a
    Linux aragorn 2.6.31.12-0.2-default #1 SMP 2010-03-16 21:25:39 +0100 i686 i686 i386 GNU/Linux
    
    gsl@aragorn:~/gitTest> cat /etc/SuSE-release
    
    openSUSE 11.2 (i586)
    VERSION = 11.2
    

    I use the following git:

    gsl@aragorn:~/gitTest> git --version
    
    git version 1.7.2.2
    

    I get (with a bash alias of gitnp='git --no-pager'):

    (1)

    gsl@aragorn:~/gitTest> gitnp log --pretty=oneline junk.txt
    500e8791578c5baf7a139d4997841769a995ac6b mod of junk and junk3
    594ceed7a0fb35a860a6e2cb913d5398f09a861f 1st mod junk.txt
    df271b2ebd5801bd8d827b0630577cad51c40896 initial junk.txt
    

    (2)

    gsl@aragorn:~/gitTest> gitnp log --follow --pretty=oneline junk.txt
    500e8791578c5baf7a139d4997841769a995ac6b mod of junk and junk3
    594ceed7a0fb35a860a6e2cb913d5398f09a861f 1st mod junk.txt
    df271b2ebd5801bd8d827b0630577cad51c40896 initial junk.txt
    

    (3)

    gsl@aragorn:~/gitTest> gitnp log -2 --follow --pretty=oneline junk.txt
    500e8791578c5baf7a139d4997841769a995ac6b mod of junk and junk3
    

    (4)

    gsl@aragorn:~/gitTest> gitnp log -2 --pretty=oneline junk.txt
    500e8791578c5baf7a139d4997841769a995ac6b mod of junk and junk3
    594ceed7a0fb35a860a6e2cb913d5398f09a861f 1st mod junk.txt
    

    Why don't I see 2 output lines for item (3) above?

    -=> Gregg <=-


    I upgraded to the latest and greatest, but still have the same problem:

    gsl@aragorn:~/gitTest> git --version

    git version 1.7.2.3

    gsl@aragorn:~/gitTest> gitnp log -2 --follow --pretty=oneline junk.txt 500e8791578c5baf7a139d4997841769a995ac6b mod of junk and junk3

    gsl@aragorn:~/gitTest> gitnp log --follow --pretty=oneline junk.txt 500e8791578c5baf7a139d4997841769a995ac6b mod of junk and junk3 594ceed7a0fb35a860a6e2cb913d5398f09a861f 1st mod junk.txt df271b2ebd5801bd8d827b0630577cad51c40896 initial junk.txt

    So is there another non-graphical reliable git way to obtain this information?

    解决方案

    Did you try with git1.7.2.3?

    • "git log --follow -M -p" was seriously broken in 1.7.2, reporting assertion failure.

    • Running "git log" with an incorrect option started pager nevertheless, forcing the user to dismiss it.

    I am not sure why the combination of '--follow -2' would limit the output to only one line.
    It is however interesting to read what Linux has to say when --follow was introduced:

    --follow is a total hack, meant to just satisfy ex-SVN users who never knew anything about things like parenthood or nice revision graphs anyway.

    It's not totally fundamental, but the current implementation of "--follow" is really a quick preprocessing thing bolted onto the revision walking logic, rather than being anything really integral.

    It literally was designed as a "SVN noob" pleaser, not as a "real git functionality" thing.
    The idea was that you'd get away from the (broken) mindset of thinking that renames matter in the big picture.

    这篇关于git log over在使用--follow时限制输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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