blame

Is there a way to customize the output of git blame?

£可爱£侵袭症+ 提交于 2019-12-03 06:28:30
问题 git log has a nice --format option to specify how the output should be formatted. But git blame doesn't seem to have an equivalent, although default output of blame is not quite human-friendly. I would like to see much less. For example, instead of: 5600cab7 js/sidebar/VehicleGrid.js (Rene Saarsoo 2009-10-08 18:55:24 +0000 127) if (x > y) { b5f1040c js/map/monitoring/VehicleGrid.js (Mihkel Muhkel 2010-05-31 07:20:13 +0000 128) return x; I would like to have: 5600cab7 Rene Saarsoo (1 year ago)

Any svn blame equivalent for clearcase?

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Are there any cleartool command line or tools equivalent to SVN's blame in Rational Clearcase? 回答1: The closest one would be with cleartool annotate : The annotate command lists the contents of a version, annotating each line to indicate when, and in which version, the line was added. You can customize the annotations using the option, which is described in the fmt_ccase reference page . By default, annotate writes its output to a file whose file-name extension is .ann . 回答2: If you want to send command output to stdout. cleartool annotate

See who last changed a specific line in a Git repo [duplicate]

那年仲夏 提交于 2019-12-02 11:43:28
问题 This question already has answers here : Retrieve the commit log for a specific line in a file? (10 answers) Closed 6 years ago . I have use git blame and git log file.py to find changes, but is there a way to see the changes on a specific line on a file? For example: Line 84 on file index.html. 回答1: Very simple: git blame -L 84,84 index.html 来源: https://stackoverflow.com/questions/19352303/see-who-last-changed-a-specific-line-in-a-git-repo

Where is line based SCM blame information stored?

故事扮演 提交于 2019-12-02 08:14:20
I can see line based SCM blame information in UI, but where is it stored and how can I retrieve through web API? I am using Perforce plugin. The issue is that the Perforce plugin finds the blame information from history, and because of that if a user has created a debt in a past branch, it still shows on his name in the current branch analysis. The Perforce plugin does not have any such way to disable looking into history beyond the current branch. I need to find another way to find out, if the debt is really introduced in this branch or not. The real question here is how to find out this: I

Merge/diff tool that can show authors (supports blame or annotate) in files under version control

◇◆丶佛笑我妖孽 提交于 2019-12-01 16:03:58
When merging files it will be helpful (as for me) to show an author of each line. Is there any diff or merge tool supporting that? The bundled gitk tool is not really a merge tool, but it shows conflicted lines with red and blue and "+"'s in front, and you can Rightclick->"Show origin of this line" on any of them, to go to the commit which introduced the line: You can run your mergetool, or just a text editor with diffmarks in parallel So what you really want is a tool that can easily identify your changes relative to other's changes in a merge conflict, rather actually identify the author of

How to 'git blame' on the remote-side repository?

痞子三分冷 提交于 2019-11-30 08:49:59
on my server I host my personal git remote-side projects (with gitosis), and I have built a web interface to browse the repositories (something like Github). On the remote-side, you are not allowed to do a lot of stuff, because a working tree is missing, and this is correct: btw, for a repository explorer, with few commands I can do almost everything. Except for git blame . I'm not able to find out how to blame a file without a working tree, within the remote-side repository. Got you some ideas? The following should work even in bare repositories: git blame <rev> -- <path> E.g. git blame

Using git to find first introduction of token on a specific line of a file

纵然是瞬间 提交于 2019-11-30 01:22:56
问题 Let's say I have a file A.cpp, and I notice an error on line 15 of the file. Let's say the error is a "const" on a function that returns a pointer to a member variable, meaning using const on the function is technically correct but semantically wrong. I would like to discuss the semantics with the author who made the change. Using git, is there a way to find out which revision introduced the "const" token? More specifically, I'd like to know who introduced the token. "git blame" shows who

Git: discover which commits ever touched a range of lines

自闭症网瘾萝莉.ら 提交于 2019-11-27 10:47:20
I'm having trouble figuring out how to use git blame for getting the set of commits that ever touched a given range of lines. There are similar questions like this one but the accepted answer doesn't bring me much further. Let's say I have a definition that starts on line 1000 of foo.rb . It's only only 5 lines long, but the number of commits that ever changed those lines is enormous. If I do git blame foo.rb -L 1000,+5 I get references to (at most) five distinct commits that changed these lines, but I'm also interested in the commits "behind them". Similarly, git rev-list HEAD -- foo.rb |

Git blame — prior commits?

浪尽此生 提交于 2019-11-27 05:44:28
Is it possible to see who edited a specific line before the commit reported by git blame , like a history of commits for a given line? For example, I run the following (on the superb uncrustify project): $ git blame -L10,+1 src/options.cpp ^fe25b6d (Ben Gardner 2009-10-17 13:13:55 -0500 10) #include "prototypes.h" How can I find out who edited that line before commit fe25b6d ? And who edited it before that commit? git blame -L10,+1 fe25b6d^ -- src/options.cpp You can specify a revision for git blame to look back starting from (instead of the default of HEAD ); fe25b6d^ is the parent of fe25b6d

Git: discover which commits ever touched a range of lines

余生长醉 提交于 2019-11-26 17:58:23
问题 I'm having trouble figuring out how to use git blame for getting the set of commits that ever touched a given range of lines. There are similar questions like this one but the accepted answer doesn't bring me much further. Let's say I have a definition that starts on line 1000 of foo.rb . It's only only 5 lines long, but the number of commits that ever changed those lines is enormous. If I do git blame foo.rb -L 1000,+5 I get references to (at most) five distinct commits that changed these