Questions tagged [blame]

Blame is the annotation of source code showing who last edited each section or line.

Blame is the annotation of source code in a revision control system with metadata indicating the most recent commit that changed a particular section or line of code. The information typically includes a commit id, the identify of the user who made the change, and the timestamp of the change.

Commands for various revision control systems include:

  • RCS: (no such command is available)
  • CVS: cvs annotate
  • Subversion: svn blame (aliases are svn praise, svn annotate, svn ann)
  • Git: git blame (git annotate is similar but uses a slightly different output format)
  • Mercurial: hg blame (alias hg annotate)
125 questions
10
votes
2 answers

How does git blame determine who edited a line of a file?

Using git blame file will show all info about each line, for example who add this line in which commit, and when, but as far as I know, Git will add a completely new object every time you change a file. So where does Git store such info about each…
William Herry
  • 1,430
  • 14
  • 26
10
votes
1 answer

git: blame the previous version of each line changed in a given commit

For a given commit, I need to run blame on the previous version of each line changed but said commit. Having a commit that changes lines 2 and 3 on file a, I want a way to see the output of git blame commit^ limited to the preamble and the lines 2…
giorgian
  • 3,795
  • 1
  • 30
  • 48
9
votes
4 answers

style cleanup that doesn't trample svn blame?

I'd like to use Eclipse's formatter to fix some poorly styled code, but there's a huge downside to killing all the metadata in the repository about who is responsible for what. Any thoughts on ways to get around this? Perhaps it is just completely…
Jacob
  • 1,671
  • 4
  • 23
  • 26
9
votes
2 answers

Word-by-word blame/annotate in version control?

Is it possible to reconstruct a word-by-word history in version control? Ideally, I'd like to do is something like 1) I indicate the range of lines of interest, 2) have the program figure out the corresponding line numbers in previous versions, as…
ceiling cat
  • 5,501
  • 9
  • 38
  • 51
8
votes
3 answers

Is there a Diff library for java that supports Annotate/Blame?

I'm digging through Google's results for free (open source) Java diff libaries, and there seem quite a bunch of those (some of them even working with generic Objects and not only with Strings). Before I'm digging through tons of search results and…
mihi
  • 6,507
  • 1
  • 38
  • 48
7
votes
3 answers

How do you find out which commit a file mode change came from?

I'm familiar with using git blame on the commandline to show which commit changed a particular line of a file. Is there a similar function to show which commit last changed the file "mode"/flags? E.g. setting or unsetting the executable flag.
Armand
  • 23,463
  • 20
  • 90
  • 119
7
votes
2 answers

ignore whitespace/identation in annotate mode with Intelliji and git

git blame , on a file , give for each line which was the last commit who have update the line.(like the annotate action on the IDE) git blame -w do the same , but only if the commit do more than indentatation or whitespace. My issue is, how can I…
sab
  • 4,352
  • 7
  • 36
  • 60
7
votes
0 answers

Committing in git without changing the blame/author

First off I'll just start with a very similar problem, and flag this as not a duplicate: Git commit that doesn't override original authors in git blame It's incredibly similar to what I'd like to do, but doesn't quite tell me what I need to…
Max Colledge
  • 287
  • 1
  • 3
  • 9
7
votes
2 answers

Programmatically get TFS blame (annotation) data

I'm trying to implement a plugin for Team Foundation Server 2010 that will create reports about users in a team project. Conceptually, all I need in order to properly implement this plugin is access to the same data that you get when you use the…
MaxML
  • 320
  • 2
  • 10
7
votes
1 answer

Github: "This email will not be used for commit blame"

How can I use a fake email address with Github? Following Github's since-changed instructions, I had a fake email like user@server.fake configured with git (git config --global user.email "user@server.fake") and registered on my email settings…
Hugo
  • 27,885
  • 8
  • 82
  • 98
7
votes
0 answers

Is there any way to merge in a visual merge tool on windows that simultaneously shows annotations?

I am using Mercurial, but I imagine that any merge tool that is aware of the version control system below it could do several things that a merge tool which is not aware of the version control system and only sees two "files" in two different…
Warren P
  • 65,725
  • 40
  • 181
  • 316
6
votes
0 answers

Wrong result when using JGit blame

When I run the following sample code: public static void main(String[] args) throws IOException, GitAPIException { Git git = new Git(new FileRepository(PATH_TO_REPO); BlameCommand blameCommand = git.blame(); …
Moaz
  • 63
  • 1
  • 5
6
votes
2 answers

Tortoise SVN blame displays non-sense

I have a versioned .cpp file and I want to see who wrote a certain line of code so I used the Tortoise SVN blame option. But when it open the file, this what it displayed: Has anyone ever encountered this problem? P.S. I'm using Tortoise SVN 1.8.1
conectionist
  • 2,694
  • 6
  • 28
  • 50
5
votes
3 answers

How to `git blame --ignore-revs-file` on a bare git repository

The command git blame --ignore-revs-file .git-blame-ignore-revs add.txt works on a non-bare repository locally on my machine but when I get the bare repository for the same repository locally and try the same command, the following happens: git…
5
votes
3 answers

Git: Find last edits from a specific user in a specific file

I have a project which sources are controlled with help of git. Right now I want to find out when my teammate made last edits in a specific file. I want to find out SHA1 of commit or to see his edits as diff. I guess I can use git log --stat…
Konstantin
  • 24,271
  • 5
  • 48
  • 65
1 2
3
8 9