Re: run pgindent on a regular basis / scripted manner
Robert Haas <robertmhaas@gmail.com>
On Tue, Oct 17, 2023 at 12:18 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Robert Haas <robertmhaas@gmail.com> writes: > > One potential problem with a server-side hook is that if you back-port > > a commit to older branches and then push the commits all together > > (which is my workflow) then you might get failure to push on some > > branches but not others. I don't know if there's any way to avoid > > that, but it seems not great. You could think of enforcing the policy > > only on master to try to avoid this, but that still leaves a risk that > > you manage to push to all the back-branches and not to master. > > Is that actually possible? I had the idea that "git push" is an > atomic operation, ie 100% or nothing. Is it only atomic per-branch? I believe so. For instance: [rhaas pgsql]$ git push rhaas Enumerating objects: 2980, done. Counting objects: 100% (2980/2980), done. Delta compression using up to 16 threads Compressing objects: 100% (940/940), done. Writing objects: 100% (2382/2382), 454.52 KiB | 7.70 MiB/s, done. Total 2382 (delta 2024), reused 1652 (delta 1429), pack-reused 0 remote: Resolving deltas: 100% (2024/2024), completed with 579 local objects. To ssh://git.postgresql.org/users/rhaas/postgres.git e434e21e11..2406c4e34c master -> master ! [rejected] walsummarizer2 -> walsummarizer2 (non-fast-forward) error: failed to push some refs to 'ssh://git.postgresql.org/users/rhaas/postgres.git' hint: Updates were rejected because a pushed branch tip is behind its remote hint: counterpart. Check out this branch and integrate the remote changes hint: (e.g. 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. -- Robert Haas EDB: http://www.enterprisedb.com
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix comment from commit 22655aa231.
- 01529c704008 17.0 cited
-
Add a few recent commits to .git-blame-ignore-revs.
- 0df7d1da40e3 17.0 landed
-
Pre-beta2 mechanical code beautification.
- b334612b8aee 16.0 landed
-
Pre-beta mechanical code beautification.
- 0245f8db36f3 16.0 landed
-
Make agreed-on updates in perltidy options.
- df6b19fbbc20 16.0 landed
-
Remove obsolete pgindent options --code-base and --build
- b16259b3c189 16.0 landed
-
Integrate pg_bsd_indent into our build/test infrastructure.
- 156c049beed9 16.0 landed
-
Sync pg_bsd_indent's copyright notices with Postgres practice.
- b44e5fced3e5 16.0 landed
-
Import pg_bsd_indent sources.
- 4e831f4cee14 16.0 landed
-
pgindent: filter files for the --commit option
- dab07e8c6896 16.0 landed
-
pgindent: more ways to find files to indent
- 068a243b7771 16.0 landed
-
Fix pgindent --show-diff option.
- 62e1e28bf769 16.0 cited
-
Add non-destructive modes to pgindent
- b90f0b57474e 16.0 landed
-
Initial pgindent run with pg_bsd_indent version 2.0.
- e3860ffa4dd0 10.0 cited