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
2
votes
1 answer

See who last changed a specific line in a Git repo

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.
irm
  • 4,073
  • 6
  • 28
  • 32
2
votes
1 answer

Determine when a line was modified in a file

In a git repository used by many people, I found some code code I'm interested in, but it's not fully fleshed out. I have no way of knowing whether this is a recent or old change, so I hesitate to just browse back through all commits on the file. Is…
Ben Jacobs
  • 2,526
  • 4
  • 24
  • 34
2
votes
1 answer

Hg pager extension doesn't work for 'blame'

I am using Merucrial with the pager extension, and I am trying to configure out to use the pager for blame, but it's not working. I have in my .hgrc file: [extensions] pager = [pager] pager = less -FRX attend = diff, status, help, log, blame The…
HighCommander4
  • 50,428
  • 24
  • 122
  • 194
2
votes
1 answer

Git blame -M: unexpected behavior

When using git blame -M in order to detect code movements inside one file, I get results which I cannot explain to myself. First I commit the following file(file.cpp): void func1(){return;}[CR][LF] int func2(){return 23;}[CR][LF] Then I modify…
ksok
  • 21
  • 3
2
votes
1 answer

How to use mercurial source control blame (annotate) functionality on IntelliJ IDEA project?

I just want to see who what the last who modified a specific line of code from inside IntelliJ IDEA (mercurial scm).
sorin
  • 161,544
  • 178
  • 535
  • 806
1
vote
1 answer

How does git create a file blame?

I recently learned about git blame and what it does. I want to know how git finds when each line was changed in a file, even across file renames. In other words, I want to know how the blame algorithm works.
Rak Laptudirm
  • 174
  • 2
  • 13
1
vote
0 answers

git blame for a file which has been renamed many times

When I use git blame, a very time-spending situation is that the file has been renamed for many times, the blame will point me to the SHA of the recent rename commit. I then need to blame on the rename version, if the file has been renamed multiple…
Eric Sun
  • 777
  • 6
  • 20
1
vote
0 answers

How to run "git blame" on a given set of files using Octokit

I'm pretty new to the Ruby world and I'm working on a legacy ruby script that uses Octokit to which I need to add the support for running "git blame" command on a bunch of files to figure out the developers involved in causing conflicts. I went…
Enigma40
  • 11
  • 3
1
vote
1 answer

JGit BlameCommand keeps returning null

For my current project I need to find out which users have last modified a range of lines in a given file. For this, and other tasks I have been using JGit and I wrote my code in Kotlin. So good so far, I have realised that when I try to use JGit…
1
vote
1 answer

How to get information on who deleted an s3 resource

I have a bucket that had some files in it. One of them is now gone. How can I get information about who deleted it or when it was deleted--can I get any information at all about this deleted item?
yalpsid eman
  • 3,064
  • 6
  • 45
  • 71
1
vote
2 answers

How to get all commit hashes from a merge? Merged commits aligned by timestamp

I'm trying to get all the commit hashes that are coming in from a merge. My ultimate goal is to grab the emails of these commiters and email them if the merge breaks a build. However, I'm not sure how to approach this problem. This needs to be done…
Fua
  • 55
  • 9
1
vote
1 answer

I'm looking for a command to find all commits which fix my commits

I'm working on a project with the following git naming convention : For a feature, we name our commit by starting with feat like that : feat(myFeature): my feature description For a fix, its the same but we use the keyword fix like this:…
Leasye
  • 261
  • 1
  • 8
  • 19
1
vote
2 answers

Find which developers' code was changed by a commit?

Is there a way using git to find out which developers' code was changed by a particular commit? The process would look something like: Take a commit SHA, get each changed line in the parent commit git diff SHA^!, group them by the author of the line…
Damon
  • 10,493
  • 16
  • 86
  • 144
1
vote
1 answer

SonarQube 5.6 using Jazz RTC plugin 1.1 missing blame information

When running the SonarQube 5.6 using Jazz RTC plugin 1.1 in a maven build to get blame information from an RTC project I am hitting the following and no blame information is being collected: [INFO] 11:46:26.782 Sensor SCM Sensor (wrapped) [INFO]…
Carl
  • 43
  • 4
1
vote
0 answers

git blame when a line comes from two branches

How does git-blame blame a line that is coming from 2 different revisions on 2 branches that were merged? Context I'm working with git-svn and I'm sick of seeing lines on blame that only point to a "merge" revision where there was no, say, real…
eftshift0
  • 26,375
  • 3
  • 36
  • 60
1 2 3
8 9