blob: fa27c0ad069bdf1ec93223c64f5f48e1b4ec6175 [file] [log] [blame]
mgiuca@chromium.org81937562016-02-03 08:00:53 +00001'\" t
2.\" Title: git-hyper-blame
3.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
Quinten Yearsley442fb642016-12-15 15:38:27 -08005.\" Date: 12/15/2016
mgiuca@chromium.org81937562016-02-03 08:00:53 +00006.\" Manual: Chromium depot_tools Manual
Quinten Yearsley442fb642016-12-15 15:38:27 -08007.\" Source: depot_tools f72f1ad
mgiuca@chromium.org81937562016-02-03 08:00:53 +00008.\" Language: English
9.\"
Quinten Yearsley442fb642016-12-15 15:38:27 -080010.TH "GIT\-HYPER\-BLAME" "1" "12/15/2016" "depot_tools f72f1ad" "Chromium depot_tools Manual"
mgiuca@chromium.org81937562016-02-03 08:00:53 +000011.\" -----------------------------------------------------------------
12.\" * Define some portability stuff
13.\" -----------------------------------------------------------------
14.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15.\" http://bugs.debian.org/507673
16.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18.ie \n(.g .ds Aq \(aq
19.el .ds Aq '
20.\" -----------------------------------------------------------------
21.\" * set default formatting
22.\" -----------------------------------------------------------------
23.\" disable hyphenation
24.nh
25.\" disable justification (adjust text to left margin only)
26.ad l
27.\" -----------------------------------------------------------------
28.\" * MAIN CONTENT STARTS HERE *
29.\" -----------------------------------------------------------------
30.SH "NAME"
31git-hyper-blame \- Like git blame, but with the ability to ignore or bypass certain commits\&.
32.SH "SYNOPSIS"
33.sp
34.nf
mgiuca@chromium.orgcd0a1cf2016-02-22 00:40:33 +000035\fIgit hyper\-blame\fR [\-i <rev> [\-i <rev> \&...]] [\-\-ignore\-file=<file>]
36 [\-\-no\-default\-ignores] [<rev>] [\-\-] <file>
mgiuca@chromium.org81937562016-02-03 08:00:53 +000037.fi
38.sp
39.SH "DESCRIPTION"
40.sp
41git hyper\-blame is like git blame but it can ignore or "look through" a given set of commits, to find the real culprit\&.
42.sp
43This is useful if you have a commit that makes sweeping changes that are unlikely to be what you are looking for in a blame, such as mass reformatting or renaming\&. By adding these commits to the hyper\-blame ignore list, git hyper\-blame will look past these commits to find the previous commit that touched a given line\&.
44.sp
45Follows the normal blame syntax: annotates <file> with the revision that last modified each line\&. Optional <rev> specifies the revision of <file> to start from\&.
mgiuca@chromium.orgcd0a1cf2016-02-22 00:40:33 +000046.sp
47Automatically looks for a file called \&.git\-blame\-ignore\-revs in the repository root directory\&. This file has the same syntax as the \-\-ignore\-file argument, and any commits mentioned in this file are added to the ignore list\&.
mgiuca@chromium.org81937562016-02-03 08:00:53 +000048.SH "OPTIONS"
49.PP
50\-i <rev>
51.RS 4
52A revision to ignore\&. Can be specified as many times as needed\&.
53.RE
mgiuca@chromium.orgcd0a1cf2016-02-22 00:40:33 +000054.PP
55\-\-ignore\-file=<file>
56.RS 4
57A file containing a list of revisions to ignore\&. Can have comments beginning with
58#\&.
59.RE
60.PP
61\-\-no\-default\-ignores
62.RS 4
63Do not ignore commits from the
64\&.git\-blame\-ignore\-revs
65file\&.
66.RE
mgiuca@chromium.org81937562016-02-03 08:00:53 +000067.SH "EXAMPLE"
68.sp
69Let\(cqs run git blame on a file:
70.sp
71
72.sp
73.if n \{\
74.RS 4
75.\}
76.nf
77\fB$ git blame ipsum\&.txt\fR
78c6eb3bfa (lorem 2014\-08\-11 23:15:57 +0000 1) LOREM IPSUM DOLOR SIT AMET, CONSECTETUR
793ddda43c (auto\-uppercaser 2014\-07\-05 02:05:18 +0000 2) ADIPISCING ELIT, SED DO EIUSMOD TEMPOR
803ddda43c (auto\-uppercaser 2014\-07\-05 02:05:18 +0000 3) INCIDIDUNT UT LABORE ET DOLORE MAGNA
813ddda43c (auto\-uppercaser 2014\-07\-05 02:05:18 +0000 4) ALIQUA\&. UT ENIM AD MINIM VENIAM, QUIS
82c6eb3bfa (lorem 2014\-08\-11 23:15:57 +0000 5) NOSTRUD EXERCITATION ULLAMCO LABORIS
833ddda43c (auto\-uppercaser 2014\-07\-05 02:05:18 +0000 6) NISI UT ALIQUIP EX EA COMMODO CONSEQUAT\&.
84.fi
85.if n \{\
86.RE
87.\}
88.sp
89.sp
90Notice that almost the entire file has been blamed on a formatting change? You aren\(cqt interested in the uppercasing of the file\&. You want to know who wrote/modified those lines in the first place\&. Just tell hyper\-blame to ignore that commit:
91.sp
92
93.sp
94.if n \{\
95.RS 4
96.\}
97.nf
98\fB$ git hyper\-blame \-i 3ddda43c ipsum\&.txt\fR
99c6eb3bfa (lorem 2014\-08\-11 23:15:57 +0000 1) LOREM IPSUM DOLOR SIT AMET, CONSECTETUR
100134200d1 (lorem 2014\-04\-10 08:54:46 +0000 2*) ADIPISCING ELIT, SED DO EIUSMOD TEMPOR
101a34a1d0d (ipsum 2014\-04\-11 11:25:04 +0000 3*) INCIDIDUNT UT LABORE ET DOLORE MAGNA
102134200d1 (lorem 2014\-04\-10 08:54:46 +0000 4*) ALIQUA\&. UT ENIM AD MINIM VENIAM, QUIS
103c6eb3bfa (lorem 2014\-08\-11 23:15:57 +0000 5) NOSTRUD EXERCITATION ULLAMCO LABORIS
1040f0d17bd (dolor 2014\-06\-02 11:31:48 +0000 6*) NISI UT ALIQUIP EX EA COMMODO CONSEQUAT\&.
105.fi
106.if n \{\
107.RE
108.\}
109.sp
110.sp
111hyper\-blame places a * next to any line where it has skipped over an ignored commit, so you know that the line in question has been changed (by an ignored commit) since the given person wrote it\&.
mgiuca@chromium.org01d2cde2016-02-05 03:25:41 +0000112.SH "CAVEATS"
mgiuca@chromium.org81937562016-02-03 08:00:53 +0000113.sp
mgiuca@chromium.org01d2cde2016-02-05 03:25:41 +0000114When a line skips over an ignored commit, a guess is made as to which commit previously modified that line, but it is not always clear where the line came from\&. If the ignored commit makes lots of changes in close proximity, in particular adding/removing/reordering lines, then the wrong authors may be blamed for nearby edits\&.
115.sp
116For this reason, hyper\-blame works best when the ignored commits are be limited to minor changes such as formatting and renaming, not refactoring or other more invasive changes\&.
mgiuca@chromium.org81937562016-02-03 08:00:53 +0000117.SH "SEE ALSO"
118.sp
119\fBgit-blame\fR(1)
120.SH "CHROMIUM DEPOT_TOOLS"
121.sp
122Part of the chromium \fBdepot_tools\fR(7) suite\&. These tools are meant to assist with the development of chromium and related projects\&. Download the tools from \m[blue]\fBhere\fR\m[]\&\s-2\u[1]\d\s+2\&.
123.SH "NOTES"
124.IP " 1." 4
125here
126.RS 4
Quinten Yearsley442fb642016-12-15 15:38:27 -0800127\%https://chromium.googlesource.com/chromium/tools/depot_tools.git
mgiuca@chromium.org81937562016-02-03 08:00:53 +0000128.RE