Closed Bug 1509369 Opened 6 years ago Closed 6 years ago

[git] Add method to ignore reformat commits during blame

Categories

(Developer Infrastructure :: Lint and Formatting, enhancement)

enhancement
Not set
normal

Tracking

(firefox65 fixed)

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: jya, Assigned: jya)

References

Details

Attachments

(1 file, 1 obsolete file)

From moz-dev: Hi On 21 Nov 2018, at 3:54 am, Ehsan Akhgari <ehsan.akhgari@gmail.com> wrote: You will break the blame on VCS with this change Yes and no. Of course, just like many tree-wide mass changes in the past (e.g. the MPL2 header update), this will remain in the log. Mercurial and Git both support a -w argument to ignore whitespace with annotate/blame. In addition, modern versions of Mercurial have `hg annotate --skip <revset>` which allows you to specify a revset used to select revisions to skip over when annotating. Last but not least, we will tag the changeset’s commit message with “skip-blame” so that Mercurial would automatically ignore the reformat changeset for blame operations. I’ve found the Google’s depot_tools hyper-blame particularly useful here. It takes a .git-blame-ignore-revs file containing the list of commits to ignore. $ cat .git-blame-ignore-revs abd6d77c618998827e5ffc3dab12f1a34d6ed03d That’s with Sylvestre single commit changing dom/media (hg SHA1: 0ceae9db9ec0be18daa1a279511ad305723185d4) $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $ export PATH=$PATH:$PWD/depot_tools now git hyper-blame will behave in the same fashion as git blame, but ignore that particular commit. I’m guessing we could make this .git-blame-ignore-revs part of the tree, assuming though everyone must use git-cinnabar.
This file allows to ignore specific commits when using Google's hyper-blame utility For now just contains mercurial commit 0ceae9db9ec0be18daa1a279511ad305723185d4 "Bug 1204606 - Reformat of dom/media r=jya" abd6d77c618998827e5ffc3dab12f1a34d6ed03d is the cinnabar's SHA1 804b8b8883ba2a6795b0fcf65ebcb18306b6416b is the gecko-dev one.
Assignee: nobody → jyavenard
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
See Also: → 1511887
Attachment #9029340 - Attachment is obsolete: true
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: