mgiuca@chromium.org | 8193756 | 2016-02-03 08:00:53 +0000 | [diff] [blame] | 1 | git-hyper-blame(1) |
| 2 | ================== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | git-hyper-blame - |
| 7 | include::_git-hyper-blame_desc.helper.txt[] |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
| 11 | [verse] |
| 12 | 'git hyper-blame' [-i <rev> [-i <rev> ...]] [<rev>] [--] <file> |
| 13 | |
| 14 | DESCRIPTION |
| 15 | ----------- |
| 16 | |
| 17 | `git hyper-blame` is like `git blame` but it can ignore or "look through" a |
| 18 | given set of commits, to find the real culprit. |
| 19 | |
| 20 | This is useful if you have a commit that makes sweeping changes that are |
| 21 | unlikely to be what you are looking for in a blame, such as mass reformatting or |
| 22 | renaming. By adding these commits to the hyper-blame ignore list, `git |
| 23 | hyper-blame` will look past these commits to find the previous commit that |
| 24 | touched a given line. |
| 25 | |
| 26 | Follows the normal `blame` syntax: annotates `<file>` with the revision that |
| 27 | last modified each line. Optional `<rev>` specifies the revision of `<file>` to |
| 28 | start from. |
| 29 | |
| 30 | OPTIONS |
| 31 | ------- |
| 32 | |
| 33 | -i <rev>:: |
| 34 | A revision to ignore. Can be specified as many times as needed. |
| 35 | |
| 36 | EXAMPLE |
| 37 | ------- |
| 38 | |
| 39 | Let's run `git blame` on a file: |
| 40 | |
| 41 | demo:1[] |
| 42 | |
| 43 | Notice that almost the entire file has been blamed on a formatting change? You |
| 44 | aren't interested in the uppercasing of the file. You want to know who |
| 45 | wrote/modified those lines in the first place. Just tell `hyper-blame` to ignore |
| 46 | that commit: |
| 47 | |
| 48 | demo:2[] |
| 49 | |
| 50 | `hyper-blame` places a `*` next to any line where it has skipped over an ignored |
| 51 | commit, so you know that the line in question has been changed (by an ignored |
| 52 | commit) since the given person wrote it. |
| 53 | |
mgiuca@chromium.org | 01d2cde | 2016-02-05 03:25:41 +0000 | [diff] [blame] | 54 | CAVEATS |
| 55 | ------- |
| 56 | |
| 57 | When a line skips over an ignored commit, a guess is made as to which commit |
| 58 | previously modified that line, but it is not always clear where the line came |
| 59 | from. If the ignored commit makes lots of changes in close proximity, in |
| 60 | particular adding/removing/reordering lines, then the wrong authors may be |
| 61 | blamed for nearby edits. |
| 62 | |
| 63 | For this reason, `hyper-blame` works best when the ignored commits are be |
| 64 | limited to minor changes such as formatting and renaming, not refactoring or |
| 65 | other more invasive changes. |
| 66 | |
mgiuca@chromium.org | 8193756 | 2016-02-03 08:00:53 +0000 | [diff] [blame] | 67 | BUGS |
| 68 | ---- |
| 69 | |
mgiuca@chromium.org | 8193756 | 2016-02-03 08:00:53 +0000 | [diff] [blame] | 70 | - There is currently no way to pass the ignore list as a file. |
| 71 | - It should be possible for a git repository to configure an automatic list of |
| 72 | commits to ignore (like `.gitignore`), so that project owners can maintain a |
| 73 | list of "big change" commits that are ignored by hyper-blame by default. |
| 74 | |
| 75 | SEE ALSO |
| 76 | -------- |
| 77 | linkgit:git-blame[1] |
| 78 | |
| 79 | include::_footer.txt[] |
| 80 | |
| 81 | // vim: ft=asciidoc: |