blob: b1d2fec8098b142ab8c1ef210f31678a5ddc1e98 [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/>
5.\" Date: 01/28/2016
6.\" Manual: Chromium depot_tools Manual
7.\" Source: depot_tools 7143379
8.\" Language: English
9.\"
10.TH "GIT\-HYPER\-BLAME" "1" "01/28/2016" "depot_tools 7143379" "Chromium depot_tools Manual"
11.\" -----------------------------------------------------------------
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
35\fIgit hyper\-blame\fR [\-i <rev> [\-i <rev> \&...]] [<rev>] [\-\-] <file>
36.fi
37.sp
38.SH "DESCRIPTION"
39.sp
40git hyper\-blame is like git blame but it can ignore or "look through" a given set of commits, to find the real culprit\&.
41.sp
42This 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\&.
43.sp
44Follows the normal blame syntax: annotates <file> with the revision that last modified each line\&. Optional <rev> specifies the revision of <file> to start from\&.
45.SH "OPTIONS"
46.PP
47\-i <rev>
48.RS 4
49A revision to ignore\&. Can be specified as many times as needed\&.
50.RE
51.SH "EXAMPLE"
52.sp
53Let\(cqs run git blame on a file:
54.sp
55
56.sp
57.if n \{\
58.RS 4
59.\}
60.nf
61\fB$ git blame ipsum\&.txt\fR
62c6eb3bfa (lorem 2014\-08\-11 23:15:57 +0000 1) LOREM IPSUM DOLOR SIT AMET, CONSECTETUR
633ddda43c (auto\-uppercaser 2014\-07\-05 02:05:18 +0000 2) ADIPISCING ELIT, SED DO EIUSMOD TEMPOR
643ddda43c (auto\-uppercaser 2014\-07\-05 02:05:18 +0000 3) INCIDIDUNT UT LABORE ET DOLORE MAGNA
653ddda43c (auto\-uppercaser 2014\-07\-05 02:05:18 +0000 4) ALIQUA\&. UT ENIM AD MINIM VENIAM, QUIS
66c6eb3bfa (lorem 2014\-08\-11 23:15:57 +0000 5) NOSTRUD EXERCITATION ULLAMCO LABORIS
673ddda43c (auto\-uppercaser 2014\-07\-05 02:05:18 +0000 6) NISI UT ALIQUIP EX EA COMMODO CONSEQUAT\&.
68.fi
69.if n \{\
70.RE
71.\}
72.sp
73.sp
74Notice 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:
75.sp
76
77.sp
78.if n \{\
79.RS 4
80.\}
81.nf
82\fB$ git hyper\-blame \-i 3ddda43c ipsum\&.txt\fR
83c6eb3bfa (lorem 2014\-08\-11 23:15:57 +0000 1) LOREM IPSUM DOLOR SIT AMET, CONSECTETUR
84134200d1 (lorem 2014\-04\-10 08:54:46 +0000 2*) ADIPISCING ELIT, SED DO EIUSMOD TEMPOR
85a34a1d0d (ipsum 2014\-04\-11 11:25:04 +0000 3*) INCIDIDUNT UT LABORE ET DOLORE MAGNA
86134200d1 (lorem 2014\-04\-10 08:54:46 +0000 4*) ALIQUA\&. UT ENIM AD MINIM VENIAM, QUIS
87c6eb3bfa (lorem 2014\-08\-11 23:15:57 +0000 5) NOSTRUD EXERCITATION ULLAMCO LABORIS
880f0d17bd (dolor 2014\-06\-02 11:31:48 +0000 6*) NISI UT ALIQUIP EX EA COMMODO CONSEQUAT\&.
89.fi
90.if n \{\
91.RE
92.\}
93.sp
94.sp
95hyper\-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\&.
96.SH "BUGS"
97.sp
98.RS 4
99.ie n \{\
100\h'-04'\(bu\h'+03'\c
101.\}
102.el \{\
103.sp -1
104.IP \(bu 2.3
105.\}
106When a commit is ignored, hyper\-blame currently just blames the same line in the previous version of the file\&. This can be wildly inaccurate if the ignored commit adds or removes lines, resulting in a completely wrong commit being blamed\&.
107.RE
108.sp
109.RS 4
110.ie n \{\
111\h'-04'\(bu\h'+03'\c
112.\}
113.el \{\
114.sp -1
115.IP \(bu 2.3
116.\}
117There is currently no way to pass the ignore list as a file\&.
118.RE
119.sp
120.RS 4
121.ie n \{\
122\h'-04'\(bu\h'+03'\c
123.\}
124.el \{\
125.sp -1
126.IP \(bu 2.3
127.\}
128It should be possible for a git repository to configure an automatic list of commits to ignore (like
129\&.gitignore), so that project owners can maintain a list of "big change" commits that are ignored by hyper\-blame by default\&.
130.RE
131.SH "SEE ALSO"
132.sp
133\fBgit-blame\fR(1)
134.SH "CHROMIUM DEPOT_TOOLS"
135.sp
136Part 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\&.
137.SH "NOTES"
138.IP " 1." 4
139here
140.RS 4
141\%https://chromium.googlesource.com/chromium/tools/depot_tools.git
142.RE