annoyance with .git-blame-ignore-revs
От | Alvaro Herrera |
---|---|
Тема | annoyance with .git-blame-ignore-revs |
Дата | |
Msg-id | 20220711163138.o72evdeus5f5yy5z@alvherre.pgsql обсуждение исходный текст |
Ответы |
Re: annoyance with .git-blame-ignore-revs
Re: annoyance with .git-blame-ignore-revs Re: annoyance with .git-blame-ignore-revs Re: annoyance with .git-blame-ignore-revs |
Список | 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/
В списке pgsql-hackers по дате отправления: