Hello, Ludovic Courtès <l...@gnu.org> writes:
> Hi, > > Jelle Licht <jli...@fsfe.org> skribis: > >> I will work on that. Do we already have a suitable 'bulk change' in the >> repo? Or should we first run `guix style', and subsequently use that >> commit as the first entry in the .git-blame-ignore-revs file? > > The latter I guess. Attached what I was thinking of: I decided to go with integrating the git-blame-ignore-revs file with our existing gitconfig situation. Let me know what you think of the workflow and the documented changes after running `guix style'.
>From 69926c94fb576e503d7838836cfd83066c39abcc Mon Sep 17 00:00:00 2001 From: Jelle Licht <jli...@fsfe.org> Date: Mon, 13 Dec 2021 16:08:22 +0100 Subject: [PATCH] maint: Ignore specified bulk changes in git blame. * etc/git/git-blame-ignore-revs: New file. * etc/git/gitconfig (blame): Add ignoreRevsFile. * doc/guix.texi ("Invoking guix style"): Document git-blame-ignore-revs usage. Signed-off-by: Jelle Licht <jli...@fsfe.org> --- doc/guix.texi | 5 +++++ etc/git/git-blame-ignore-revs | 0 etc/git/gitconfig | 3 +++ 3 files changed, 8 insertions(+) create mode 100644 etc/git/git-blame-ignore-revs diff --git a/doc/guix.texi b/doc/guix.texi index 59651f996b..0c0293cc8e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12769,6 +12769,11 @@ Invoking guix style trigger any package rebuild. @end table +When applying automated changes to many packages, consider adding that +particular commit hash to @file{etc/git/git-blame-ignore-revs} in a +follow-up commit. This will allow @command{git blame} +(@pxref{Configuring Git}) to automatically ignore the specified commits. + @node Invoking guix lint @section Invoking @command{guix lint} diff --git a/etc/git/git-blame-ignore-revs b/etc/git/git-blame-ignore-revs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/git/gitconfig b/etc/git/gitconfig index c9ebdc8fa8..afa598c4e3 100644 --- a/etc/git/gitconfig +++ b/etc/git/gitconfig @@ -1,3 +1,6 @@ +[blame] + ignoreRevsFile = etc/git/git-blame-ignore-revs + [diff "scheme"] xfuncname = "^(\\(define.*)$" base-commit: e765ad091d861c99eae9fdd402214a2e2e90ed4d -- 2.34.0
- Jelle