This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=bcb37baf8ebdfa6c70310ec0a82517fe9ee1153d

commit bcb37baf8ebdfa6c70310ec0a82517fe9ee1153d
Author: Guillem Jover <[email protected]>
AuthorDate: Thu Apr 20 00:41:43 2023 +0200

    build: Add support for .git-blame-ignore-revs file
    
    The current codebase contains a mix of styles, which is confusing when
    reading, or when contributing code. The main reason the code has been
    switched to the new style incrementally has been because mass changes
    create «git blame» barriers, at which point git blame becomes unusable.
    
    But with the recent-ish support for the «git blame» ignore-revs-file
    we can now track these commits and let git ignore them when doing blame,
    which removes the main reason for avoiding these mass changes.
---
 .git-blame-ignore-revs | 2 ++
 Makefile.am            | 2 +-
 autogen                | 4 ++++
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
new file mode 100644
index 000000000..80b147dcb
--- /dev/null
+++ b/.git-blame-ignore-revs
@@ -0,0 +1,2 @@
+# This file tracks commit IDs that have changed coding style or performed
+# mechanical changes that should not constitute a blame barrier.
diff --git a/Makefile.am b/Makefile.am
index 0ba843cb7..daafc44cf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -244,7 +244,7 @@ dist-hook:
            echo "$$file is a symlink packed as a file on the dist tar" >&2 ; \
            exit 1 ; \
          done ; \
-         for file in `git ls-files | grep -v .gitignore`; do \
+         for file in `git ls-files | grep -vE '\.git(ignore|-blame)'`; do \
            if [ ! -e "$(distdir)/$$file" ]; then \
              echo "$$file is missing in $(distdir)" >&2 ; \
              exit 1 ; \
diff --git a/autogen b/autogen
index f0262f3d6..aea823e21 100755
--- a/autogen
+++ b/autogen
@@ -2,4 +2,8 @@
 
 set -e
 
+if [ -e .git ] && command -v git >/dev/null 2>&1; then
+  git config blame.ignoreRevsFile .git-blame-ignore-revs
+fi
+
 autoreconf --force --install

-- 
Dpkg.Org's dpkg

Reply via email to