Re: run pgindent on a regular basis / scripted manner

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: run pgindent on a regular basis / scripted manner
Дата
Msg-id CA+TgmobWzN_P3WCdDR-sO9EzVWMFice8oViVCFUW+0T0mXiZKg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: run pgindent on a regular basis / scripted manner  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: run pgindent on a regular basis / scripted manner  (Jelte Fennema <postgres@jeltef.nl>)
Список pgsql-hackers
On Tue, Feb 7, 2023 at 8:17 AM Andrew Dunstan <andrew@dunslane.net> wrote:
> My git-fu is probably not all that it should be. I think we could possibly get at this list of files by running
>
>   git status --porcelain --untracked-files=no --ignored=no -- .
>
> And then your --dirty list would be lines beginning with ' M' while your --cached list would be lines beginning with
'A[M]'
 
>
> Does that seem plausible?

I don't know if that works or not, but it does seem plausible, at
least. My idea would have been to use the --name-status option, which
works for both git diff and git show. You just look and see which
lines in the output start with M or A and then take the file names
from those lines.

So to indent files that are dirty, you would look at:

git diff --name-status

For what's cached:

git diff --name-status --cached

For the combination of the two:

git diff --name-status HEAD

For a prior commit:

git show --name-status $COMMITID

-- 
Robert Haas
EDB: http://www.enterprisedb.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Hayato Kuroda (Fujitsu)"
Дата:
Сообщение: RE: Exit walsender before confirming remote flush in logical replication
Следующее
От: Andrey Borodin
Дата:
Сообщение: Re: Too coarse predicate locks granularity for B+ tree indexes