Movatterモバイル変換


[0]ホーム

URL:


Quick Links

annoyance with .git-blame-ignore-revs

From:Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To:Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject:annoyance with .git-blame-ignore-revs
Date:2022-07-11 16:31:38
Message-ID:20220711163138.o72evdeus5f5yy5z@alvherre.pgsql
Views:Whole Thread |Raw Message |Download mbox |Resend email
Thread:
Lists:pgsql-hackers

I like the ignore-revs file, but I run into a problem with my setup:
because I keep checkouts of all branches as worktrees, then all branches
share the same .git/config file. So if I put the recommended stanza for
[blame] in it, then 'git blame' complains in branches older than 13,
since those don't have the file:

$ git blame configure
fatal: could not open object name list: .git-blame-ignore-revs

My first workaround was to add empty .git-blame-ignore-revs in all
checkouts. This was moderately ok (shrug), until after a recent `tig`
upgrade the empty file started to show up in the history as an untracked
file.

So I'm now by the second workaround, which is to move the [blame]
section of config to a separate file, and use a [includeIf] sections
like this:

[includeIf "onbranch:master"]
path=config.blame.inc
[includeIf "onbranch:REL_1{4,5,6,7,8,9}_STABLE"]
path=config.blame.inc
[includeIf "onbranch:REL_2*_STABLE"]
path=config.blame.inc

This is quite ugly, and it doesn't work at all if I run `git blame` in a
worktree that I create for development purposes (I don't name those
after the upstream PG branch they're based on).

Anybody has any idea how to handle this better?

A viable option would be to backpatch the addition of
.git-blame-ignore-revs to all live branches. Would that bother anyone?

--
Álvaro Herrera Breisgau, Deutschland —https://www.EnterpriseDB.com/

Responses

Browse pgsql-hackers by date

 FromDateSubject
Next MessageRobert Haas2022-07-11 16:34:39Re: AIX support - alignment issues
Previous MessageRobert Haas2022-07-11 16:25:44Re: doc: Clarify what "excluded" represents for INSERT ON CONFLICT

[8]ページ先頭

©2009-2025 Movatter.jp