Browse Source

dev: exclude the blackening from blames via .git-blame-ignore-revs (#18028)

josh 5 years ago
parent
commit
f5a834323f
3 changed files with 56 additions and 3 deletions
  1. 7 0
      .envrc
  2. 43 0
      .git-blame-ignore-revs
  3. 6 3
      Makefile

+ 7 - 0
.envrc

@@ -102,6 +102,13 @@ Please install homebrew, and run brew bundle."
 done
 
 
+### Git ###
+
+info "Configuring git..."
+
+make setup-git-config
+
+
 ### Python ###
 
 info "Activating virtualenv..."

+ 43 - 0
.git-blame-ignore-revs

@@ -0,0 +1,43 @@
+# Since version 2.23 (released in August 2019), git-blame has a feature
+# to ignore or bypass certain commits.
+#
+# This file contains a list of commits that are not likely what you
+# are looking for in a blame, such as mass reformatting or renaming.
+
+# chore: blacken take 2 (#14360)
+95767d455b8004ec4b4c5026d84b64b6348e6d37
+
+
+# feat(lint): Update prettier (#16505)
+# Required to properly support nullish coalescence operator and optional chaining.
+# https://github.com/getsentry/sentry/pull/16505
+75bd65eef51a75c7f8db3af9ed71188b89d17fb2
+
+# build(prettier): Upgrade prettier to 1.16.4 #10703
+# https://github.com/getsentry/sentry/pull/10703
+d467e8894478662e0ceee9b5137be4ee6620b60d
+
+# lint: Prettier catalogs.json #11131
+# https://github.com/getsentry/sentry/pull/11131
+69c3284fff26f5db7da7f96bb72b0f3732d4a867
+
+# chore: Run prettier on .eslintrc #10433
+# https://github.com/getsentry/sentry/pull/10433
+a2df8eab9b802966c8af6d0d61e6f97b5fbd3882
+
+
+# build(prettier): Upgrade prettier to 1.7.4 #6459
+# https://github.com/getsentry/sentry/pull/6459
+652a90266d98b1e74f3617c92aa8c1461e76b58d
+
+# Upgrade Prettier to 1.2.2, enable --jsx-bracket-same-line=true #5278
+# https://github.com/getsentry/sentry/pull/5278
+9ca15377ca03d474e2714802fc2b9a37e7b6e174
+
+# Add prettier to lint engine, prettify existing files #5247
+# https://github.com/getsentry/sentry/pull/5247
+49efa19a2fbd37a0b87e0aed234ea8fdae11dd5e
+
+# run prettier over jsx files to make escaping unecessary #5340
+# https://github.com/getsentry/sentry/pull/5340
+f736793749a7e0a120a3d5f8630959864e553adb

+ 6 - 3
Makefile

@@ -52,10 +52,13 @@ ensure-venv:
 ensure-pinned-pip: ensure-venv
 	$(PIP) install --no-cache-dir --upgrade "pip>=20.0.2"
 
-setup-git: ensure-venv
+setup-git-config:
+	@git config --local branch.autosetuprebase always
+	@git config --local core.ignorecase false
+	@git config --local blame.ignoreRevsFile .git-blame-ignore-revs
+
+setup-git: ensure-venv setup-git-config
 	@echo "--> Installing git hooks"
-	git config branch.autosetuprebase always
-	git config core.ignorecase false
 	cd .git/hooks && ln -sf ../../config/hooks/* ./
 	@# XXX(joshuarli): virtualenv >= 20 doesn't work with the version of six we have pinned for sentry.
 	@# Since pre-commit is installed in the venv, it will install virtualenv in the venv as well.