Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: man/src/git-hyper-blame.txt

Issue 1697423004: git hyper-blame: Added automatically ignoring revs from a file. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Avoid too-long line. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « man/man1/git-hyper-blame.1 ('k') | tests/git_hyper_blame_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 git-hyper-blame(1) 1 git-hyper-blame(1)
2 ================== 2 ==================
3 3
4 NAME 4 NAME
5 ---- 5 ----
6 git-hyper-blame - 6 git-hyper-blame -
7 include::_git-hyper-blame_desc.helper.txt[] 7 include::_git-hyper-blame_desc.helper.txt[]
8 8
9 SYNOPSIS 9 SYNOPSIS
10 -------- 10 --------
11 [verse] 11 [verse]
12 'git hyper-blame' [-i <rev> [-i <rev> ...]] [<rev>] [--] <file> 12 'git hyper-blame' [-i <rev> [-i <rev> ...]] [--ignore-file=<file>]
13 [--no-default-ignores] [<rev>] [--] <file>
13 14
14 DESCRIPTION 15 DESCRIPTION
15 ----------- 16 -----------
16 17
17 `git hyper-blame` is like `git blame` but it can ignore or "look through" a 18 `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 given set of commits, to find the real culprit.
19 20
20 This is useful if you have a commit that makes sweeping changes that are 21 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 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 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 hyper-blame` will look past these commits to find the previous commit that
24 touched a given line. 25 touched a given line.
25 26
26 Follows the normal `blame` syntax: annotates `<file>` with the revision that 27 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 last modified each line. Optional `<rev>` specifies the revision of `<file>` to
28 start from. 29 start from.
29 30
31 Automatically looks for a file called `.git-blame-ignore-revs` in the repository
32 root directory. This file has the same syntax as the `--ignore-file` argument,
33 and any commits mentioned in this file are added to the ignore list.
34
30 OPTIONS 35 OPTIONS
31 ------- 36 -------
32 37
33 -i <rev>:: 38 -i <rev>::
34 A revision to ignore. Can be specified as many times as needed. 39 A revision to ignore. Can be specified as many times as needed.
35 40
41 --ignore-file=<file>::
42 A file containing a list of revisions to ignore. Can have comments beginning
43 with `#`.
44
45 --no-default-ignores::
46 Do not ignore commits from the `.git-blame-ignore-revs` file.
47
36 EXAMPLE 48 EXAMPLE
37 ------- 49 -------
38 50
39 Let's run `git blame` on a file: 51 Let's run `git blame` on a file:
40 52
41 demo:1[] 53 demo:1[]
42 54
43 Notice that almost the entire file has been blamed on a formatting change? You 55 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 56 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 57 wrote/modified those lines in the first place. Just tell `hyper-blame` to ignore
(...skipping 11 matching lines...) Expand all
57 When a line skips over an ignored commit, a guess is made as to which commit 69 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 70 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 71 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 72 particular adding/removing/reordering lines, then the wrong authors may be
61 blamed for nearby edits. 73 blamed for nearby edits.
62 74
63 For this reason, `hyper-blame` works best when the ignored commits are be 75 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 76 limited to minor changes such as formatting and renaming, not refactoring or
65 other more invasive changes. 77 other more invasive changes.
66 78
67 BUGS
68 ----
69
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 79 SEE ALSO
76 -------- 80 --------
77 linkgit:git-blame[1] 81 linkgit:git-blame[1]
78 82
79 include::_footer.txt[] 83 include::_footer.txt[]
80 84
81 // vim: ft=asciidoc: 85 // vim: ft=asciidoc:
OLDNEW
« no previous file with comments | « man/man1/git-hyper-blame.1 ('k') | tests/git_hyper_blame_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698