Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package lefthook for openSUSE:Factory checked in at 2026-11-25 16:13:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lefthook (Old) and /work/SRC/openSUSE:Factory/.lefthook.new.1340718 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lefthook" Wed Nov 25 16:13:35 2026 rev:3 rq:1400477 version:2.2.3 Changes: -------- --- /work/SRC/openSUSE:Factory/lefthook/lefthook.changes 2026-10-14 18:40:52.633438082 +0200 +++ /work/SRC/openSUSE:Factory/.lefthook.new.1340718/lefthook.changes 2026-11-25 16:15:44.381472400 +0100 @@ -1,0 +2,20 @@ +Wed Nov 25 05:46:35 UTC 2026 - Johannes Kastl <[email protected]> + +- Update to version 2.2.3: + * 2.2.3: better handling for signals + * deps: November 2026 (#1650) + * docs: update supported versions in security policy (#1649) + * chore: update JSON schema with title and description (#1608) + * fix: give each stdin consumer an independent reader (#1622) + * fix: stop hooks on SIGTERM and SIGHUP like on SIGINT (#1615) + * deps: November 2026 (#1636) + * deps: bump Go to 1.27.4 (#1634) + * feat: add LEFTHOOK_NO_AUTO_INSTALL env (#1592) + * fix(filter): do not duplicate files matched by several glob + patterns (#1630) + * pkg(pypi): tag linux wheels as musllinux compatible (#1605) + * refactor(config): migrate to + github.com/go-viper/mapstructure/v2 (#1546) + * packaging: publish npm packages in different actions (#1598) + +------------------------------------------------------------------- Old: ---- lefthook-2.2.2.obscpio New: ---- lefthook-2.2.3.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lefthook.spec ++++++ --- /var/tmp/diff_new_pack.MJDdbW/_old 2026-11-25 16:15:45.368514250 +0100 +++ /var/tmp/diff_new_pack.MJDdbW/_new 2026-11-25 16:15:45.369514292 +0100 @@ -17,7 +17,7 @@ Name: lefthook -Version: 2.2.2 +Version: 2.2.3 Release: 0 Summary: Fast and powerful Git hooks manager License: Apache-2.0 @@ -26,7 +26,7 @@ Source1: vendor.tar.gz BuildRequires: bash-completion BuildRequires: fish -BuildRequires: go1.27 >= 1.27.0 +BuildRequires: go1.27 >= 1.27.4 BuildRequires: zsh %description ++++++ _service ++++++ --- /var/tmp/diff_new_pack.MJDdbW/_old 2026-11-25 16:15:45.415516243 +0100 +++ /var/tmp/diff_new_pack.MJDdbW/_new 2026-11-25 16:15:45.421516497 +0100 @@ -3,7 +3,7 @@ <param name="url">https://github.com/evilmartians/lefthook.git</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">refs/tags/v2.2.2</param> + <param name="revision">refs/tags/v2.2.3</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.MJDdbW/_old 2026-11-25 16:15:45.458518066 +0100 +++ /var/tmp/diff_new_pack.MJDdbW/_new 2026-11-25 16:15:45.463518278 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/evilmartians/lefthook.git</param> - <param name="changesrevision">eb4e504b7c1d1ea6cb1fd29542431cb6d1a93a03</param></service></servicedata> + <param name="changesrevision">71fefa103aad28177d10d3f4a6cdc5f441557584</param></service></servicedata> (No newline at EOF) ++++++ lefthook-2.2.2.obscpio -> lefthook-2.2.3.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/CHANGELOG.md new/lefthook-2.2.3/CHANGELOG.md --- old/lefthook-2.2.2/CHANGELOG.md 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/CHANGELOG.md 2026-11-24 11:26:06.000000000 +0100 @@ -1,5 +1,20 @@ # Change log +## 2.2.3 + +- deps: November 2026 ([#1650](https://github.com/evilmartians/lefthook/pull/1650)) by [@mrexox](https://github.com/mrexox) +- docs: update supported versions in security policy ([#1649](https://github.com/evilmartians/lefthook/pull/1649)) by [@dirgaydtm](https://github.com/dirgaydtm) +- chore: update JSON schema with title and description ([#1608](https://github.com/evilmartians/lefthook/pull/1608)) by [@uzosrc](https://github.com/uzosrc) +- fix: give each stdin consumer an independent reader ([#1622](https://github.com/evilmartians/lefthook/pull/1622)) by [@chiliec](https://github.com/chiliec) +- fix: stop hooks on SIGTERM and SIGHUP like on SIGINT ([#1615](https://github.com/evilmartians/lefthook/pull/1615)) by [@vulragrag-star](https://github.com/vulragrag-star) +- deps: November 2026 ([#1636](https://github.com/evilmartians/lefthook/pull/1636)) by [@mrexox](https://github.com/mrexox) +- deps: bump Go to 1.27.4 ([#1634](https://github.com/evilmartians/lefthook/pull/1634)) by [@EduCosta85](https://github.com/EduCosta85) +- feat: add LEFTHOOK_NO_AUTO_INSTALL env ([#1592](https://github.com/evilmartians/lefthook/pull/1592)) by [@dirgaydtm](https://github.com/dirgaydtm) +- fix: do not duplicate files matched by several glob patterns ([#1630](https://github.com/evilmartians/lefthook/pull/1630)) by [@pcbeingused333](https://github.com/pcbeingused333) +- pkg: tag linux wheels as musllinux compatible ([#1605](https://github.com/evilmartians/lefthook/pull/1605)) by [@delliottxyz](https://github.com/delliottxyz) +- refactor: migrate to github.com/go-viper/mapstructure/v2 ([#1546](https://github.com/evilmartians/lefthook/pull/1546)) by [@scop](https://github.com/scop) +- packaging: publish npm packages in different actions ([#1598](https://github.com/evilmartians/lefthook/pull/1598)) by [@mrexox](https://github.com/mrexox) + ## 2.2.2 - fix: cleanup only current stash hash ([#1597](https://github.com/evilmartians/lefthook/pull/1597)) by [@mrexox](https://github.com/mrexox) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/README.md new/lefthook-2.2.3/README.md --- old/lefthook-2.2.2/README.md 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/README.md 2026-11-24 11:26:06.000000000 +0100 @@ -21,13 +21,13 @@ With **Go** (>= 1.27): ```bash -go install github.com/evilmartians/lefthook/[email protected] +go install github.com/evilmartians/lefthook/[email protected] ``` * or as a go tool ```bash -go get -tool github.com/evilmartians/lefthook/[email protected] +go get -tool github.com/evilmartians/lefthook/[email protected] ``` With **NPM**: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/SECURITY.md new/lefthook-2.2.3/SECURITY.md --- old/lefthook-2.2.2/SECURITY.md 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/SECURITY.md 2026-11-24 11:26:06.000000000 +0100 @@ -6,8 +6,8 @@ | Version | Supported | | ------- | ------------------ | -| 1.x | :white_check_mark: | -| 0.x | :x: | +| 2.x | :white_check_mark: | +| < 2.0 | :x: | ## Reporting a Vulnerability diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/cmd/lefthook.go new/lefthook-2.2.3/cmd/lefthook.go --- old/lefthook-2.2.2/cmd/lefthook.go 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/cmd/lefthook.go 2026-11-24 11:26:06.000000000 +0100 @@ -16,6 +16,8 @@ LEFTHOOK set to '0' or 'false' to disable lefthook execution LEFTHOOK_CONFIG override main config path +LEFTHOOK_NO_AUTO_INSTALL + set to '1' or 'true' to disable hooks synchronization LEFTHOOK_OUTPUT control printed sections (see config option 'output') LEFTHOOK_VERBOSE enable debug logs`, EnableShellCompletion: true, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/docmd.config.js new/lefthook-2.2.3/docmd.config.js --- old/lefthook-2.2.2/docmd.config.js 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/docmd.config.js 2026-11-24 11:26:06.000000000 +0100 @@ -573,6 +573,10 @@ path: "/usage/envs/LEFTHOOK_EXCLUDE" }, { + title: "LEFTHOOK_NO_AUTO_INSTALL", + path: "/usage/envs/LEFTHOOK_NO_AUTO_INSTALL" + }, + { title: "CLICOLOR_FORCE", path: "/usage/envs/CLICOLOR_FORCE" }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/docs/configuration/no_auto_install.md new/lefthook-2.2.3/docs/configuration/no_auto_install.md --- old/lefthook-2.2.2/docs/configuration/no_auto_install.md 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/docs/configuration/no_auto_install.md 2026-11-24 11:26:06.000000000 +0100 @@ -8,7 +8,7 @@ Disable automatic installation and synchronization of git hooks when running lefthook. By default, lefthook automatically installs and updates hooks when you run `lefthook run` if the configuration has changed. Setting this to `true` disables that behavior. -This can also be controlled with the `--no-auto-install` option for the `lefthook run` command. +This can also be controlled with the `--no-auto-install` option for the `lefthook run` command or with the [`LEFTHOOK_NO_AUTO_INSTALL`](../usage/envs/LEFTHOOK_NO_AUTO_INSTALL.md) environment variable to turn the synchronization off only for some processes. #### Example diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/docs/installation/go.md new/lefthook-2.2.3/docs/installation/go.md --- old/lefthook-2.2.2/docs/installation/go.md 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/docs/installation/go.md 2026-11-24 11:26:06.000000000 +0100 @@ -5,7 +5,7 @@ - as global package ```bash -go install github.com/evilmartians/lefthook/[email protected] +go install github.com/evilmartians/lefthook/[email protected] ``` - or as a go tool in your project diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/docs/installation/swift.md new/lefthook-2.2.3/docs/installation/swift.md --- old/lefthook-2.2.2/docs/installation/swift.md 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/docs/installation/swift.md 2026-11-24 11:26:06.000000000 +0100 @@ -5,7 +5,7 @@ Utilize lefthook in your Swift project using Swift Package Manager: ```swift -.package(url: "https://github.com/csjones/lefthook-plugin.git", exact: "2.2.2"), +.package(url: "https://github.com/csjones/lefthook-plugin.git", exact: "2.2.3"), ``` Or, with [mint](https://github.com/yonaskolb/Mint): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/docs/usage/envs/LEFTHOOK_NO_AUTO_INSTALL.md new/lefthook-2.2.3/docs/usage/envs/LEFTHOOK_NO_AUTO_INSTALL.md --- old/lefthook-2.2.2/docs/usage/envs/LEFTHOOK_NO_AUTO_INSTALL.md 1970-01-01 01:00:00.000000000 +0100 +++ new/lefthook-2.2.3/docs/usage/envs/LEFTHOOK_NO_AUTO_INSTALL.md 2026-11-24 11:26:06.000000000 +0100 @@ -0,0 +1,15 @@ +--- +title: "LEFTHOOK_NO_AUTO_INSTALL" +--- + +## `LEFTHOOK_NO_AUTO_INSTALL` + +Use `LEFTHOOK_NO_AUTO_INSTALL=1 git ...` or `LEFTHOOK_NO_AUTO_INSTALL=true git ...` to keep lefthook from updating git hooks when running git commands. Unlike the [`no_auto_install`](../../configuration/no_auto_install.md) configuration option, it applies only to the commands that have it set. + +Useful for tools that run git on someone else's behalf (wrappers, dev containers, CI helpers) and must not change installed hooks. + +#### Example + +```bash +LEFTHOOK_NO_AUTO_INSTALL=1 git commit -m "Hooks not synchronized" +``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/gen/jsonschema.go new/lefthook-2.2.3/gen/jsonschema.go --- old/lefthook-2.2.2/gen/jsonschema.go 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/gen/jsonschema.go 2026-11-24 11:26:06.000000000 +0100 @@ -59,6 +59,8 @@ } schema.ID = "https://json.schemastore.org/lefthook.json" schema.Comments = "Last updated on " + time.Now().Format("2006.01.02") + "." + schema.Title = "Lefthook" + schema.Description = "Configuration for Lefthook Git hooks manager." dumped, err := json.MarshalIndent(schema, "", " ") if err != nil { _, _ = fmt.Fprintf(os.Stderr, "failed to generate json: %s", err) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/go.mod new/lefthook-2.2.3/go.mod --- old/lefthook-2.2.2/go.mod 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/go.mod 2026-11-24 11:26:06.000000000 +0100 @@ -1,19 +1,20 @@ module github.com/evilmartians/lefthook/v2 -go 1.27.0 +go 1.27.4 require ( al.essio.dev/pkg/shellescape v1.6.1 - charm.land/lipgloss/v2 v2.0.6 - github.com/bmatcuk/doublestar/v4 v4.10.2 + charm.land/lipgloss/v2 v2.1.0 + github.com/bmatcuk/doublestar/v4 v4.10.4 github.com/briandowns/spinner v1.23.2 github.com/charmbracelet/colorprofile v0.4.3 github.com/charmbracelet/x/term v0.2.2 github.com/creack/pty v1.1.24 - github.com/gabriel-vasile/mimetype v1.4.15 + github.com/gabriel-vasile/mimetype v1.4.16 + github.com/go-viper/mapstructure/v2 v2.5.0 github.com/gobwas/glob v0.2.3 github.com/goccy/go-yaml v1.19.2 - github.com/google/go-cmp v0.6.0 + github.com/google/go-cmp v0.7.0 github.com/invopop/jsonschema v0.14.0 github.com/kaptinlin/jsonschema v0.9.10 github.com/knadh/koanf/maps v0.1.3 @@ -22,20 +23,19 @@ github.com/knadh/koanf/parsers/yaml v1.1.1 github.com/knadh/koanf/providers/fs v1.0.1 github.com/knadh/koanf/providers/rawbytes v1.0.1 - github.com/knadh/koanf/v2 v2.3.7 + github.com/knadh/koanf/v2 v2.4.1 github.com/mattn/go-isatty v0.0.24 - github.com/mattn/go-runewidth v0.0.30 + github.com/mattn/go-runewidth v0.0.31 github.com/mattn/go-tty v0.0.8 - github.com/mitchellh/mapstructure v1.5.0 github.com/pelletier/go-toml/v2 v2.4.3 github.com/rogpeppe/go-internal v1.16.0 github.com/schollz/progressbar/v3 v3.19.1 github.com/spf13/afero v1.15.0 github.com/stretchr/testify v1.12.1 - github.com/tidwall/jsonc v0.3.3 + github.com/tidwall/jsonc v0.3.4 github.com/urfave/cli/v3 v3.14.0 - go.yaml.in/yaml/v3 v3.0.5 - golang.org/x/mod v0.41.0 + go.yaml.in/yaml/v3 v3.0.6 + golang.org/x/mod v0.43.0 ) require ( @@ -48,7 +48,6 @@ github.com/clipperhouse/displaywidth v0.11.0 // indirect github.com/clipperhouse/uax29/v2 v2.7.0 // indirect github.com/fatih/color v1.18.0 // indirect - github.com/go-viper/mapstructure/v2 v2.4.0 // indirect github.com/kaptinlin/jsonpointer v0.4.28 // indirect github.com/lucasb-eyer/go-colorful v1.4.1 // indirect github.com/mattn/go-colorable v0.1.13 // indirect @@ -61,10 +60,10 @@ github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect github.com/yosida95/uritemplate/v3 v3.0.2 // indirect go.yaml.in/yaml/v4 v4.0.0-rc.2 // indirect - golang.org/x/net v0.59.0 // indirect - golang.org/x/sync v0.23.0 // indirect - golang.org/x/sys v0.48.0 // indirect - golang.org/x/term v0.46.0 // indirect - golang.org/x/text v0.42.0 // indirect - golang.org/x/tools v0.51.0 // indirect + golang.org/x/net v0.61.0 // indirect + golang.org/x/sync v0.24.0 // indirect + golang.org/x/sys v0.49.0 // indirect + golang.org/x/term v0.47.0 // indirect + golang.org/x/text v0.43.0 // indirect + golang.org/x/tools v0.52.0 // indirect ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/go.sum new/lefthook-2.2.3/go.sum --- old/lefthook-2.2.2/go.sum 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/go.sum 2026-11-24 11:26:06.000000000 +0100 @@ -1,11 +1,11 @@ al.essio.dev/pkg/shellescape v1.6.1 h1:ki/kUs/D3dDbZpyKbNRhwY/ajgAEIJFagVKDWKnofQ8= al.essio.dev/pkg/shellescape v1.6.1/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWtls1U8I890= -charm.land/lipgloss/v2 v2.0.6 h1:EaGKeuA8FvF+v2BT5VmZd2LoYLaMZJXA5n34th8nCIQ= -charm.land/lipgloss/v2 v2.0.6/go.mod h1:ipDDJNSGa1hlwDtSfW1s2/xR8Vdhbut4PXh2zEKZd0Q= +charm.land/lipgloss/v2 v2.1.0 h1:RLCNLhSQST+NPOmvUSbRWZ3UFOXsf3ZXFmJ5E/2tHEU= +charm.land/lipgloss/v2 v2.1.0/go.mod h1:wwfOgrNqUA9yjL8nmG6BIO0qQnmkEgJ8ISptbme83gI= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= -github.com/bmatcuk/doublestar/v4 v4.10.2 h1:eF7W7HWKg3z9NrWV9pTLnNeoXaqq3Tq9DNKXVMfoCnw= -github.com/bmatcuk/doublestar/v4 v4.10.2/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/bmatcuk/doublestar/v4 v4.10.4 h1:oTKkRmRuOsKMqFe1AQazd9gGBFNEpOmgKp/xzB97dnA= +github.com/bmatcuk/doublestar/v4 v4.10.4/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/briandowns/spinner v1.23.2 h1:Zc6ecUnI+YzLmJniCfDNaMbW0Wid1d5+qcTq4L2FW8w= github.com/briandowns/spinner v1.23.2/go.mod h1:LaZeM4wm2Ywy6vO571mvhQNRcWfRUnXOs0RcKV0wYKM= github.com/buger/jsonparser v1.1.2 h1:frqHqw7otoVbk5M8LlE/L7HTnIq2v9RX6EJ48i9AxJk= @@ -32,16 +32,16 @@ github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= -github.com/gabriel-vasile/mimetype v1.4.15 h1:05iP/CYtZ/w455R/KZM6rZ5ieAdh99UPtd+d3YzLmaI= -github.com/gabriel-vasile/mimetype v1.4.15/go.mod h1:azpTcoLcDZRNgFou5j+APrqQx9HqVPWa6ijYQIIVswQ= -github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= -github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gabriel-vasile/mimetype v1.4.16 h1:5izNFuvA37st1dDRAcA7TtmngBmRgiIPDmTtiEvjx1E= +github.com/gabriel-vasile/mimetype v1.4.16/go.mod h1:3oFFwxX8kTklZwzIl2aQEDZT0lKY8xH92ST88bAwba4= +github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= +github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/invopop/jsonschema v0.14.0 h1:MHQqLhvpNUZfw+hM3AZDYK7jxO8FZoQeQM77g8iyZjg= @@ -62,8 +62,8 @@ github.com/knadh/koanf/providers/fs v1.0.1/go.mod h1:FksHET+xXFNDozvj8ZCdom54OnZ6eGKJtC5FhZJKx/8= github.com/knadh/koanf/providers/rawbytes v1.0.1 h1:JCQoly+djX23Okr8kqtS19R7UXKleTAp62Vib2VrVYs= github.com/knadh/koanf/providers/rawbytes v1.0.1/go.mod h1:KxwYJf1uezTKy6PBtfE+m725NGp4GPVA7XoNTJ/PtLo= -github.com/knadh/koanf/v2 v2.3.7 h1:amceufOeoQcq6VFKjm7/ggJ3t0Dkqaxy5fza4j3YgTA= -github.com/knadh/koanf/v2 v2.3.7/go.mod h1:gRb40VRAbd4iJMYYD5IxZ6hfuopFcXBpc9bbQpZwo28= +github.com/knadh/koanf/v2 v2.4.1 h1:MK2JDkLy4UGzEUkW1CCCKQftd9+M+NX8hAZ2axbf/jo= +github.com/knadh/koanf/v2 v2.4.1/go.mod h1:gRb40VRAbd4iJMYYD5IxZ6hfuopFcXBpc9bbQpZwo28= github.com/lucasb-eyer/go-colorful v1.4.1 h1:1EO+WB73+EH8EVbzlrG3KLAfEypQWVHIBqlTf+2hNss= github.com/lucasb-eyer/go-colorful v1.4.1/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -71,16 +71,14 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI= github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= -github.com/mattn/go-runewidth v0.0.30 h1:+KUuiDA4fF0R1p5FeueHefjDm+GIM+kWfFnDjybOPgk= -github.com/mattn/go-runewidth v0.0.30/go.mod h1:3qAiGCV4Koz/yuveO58qUefmUTRm8r0IGEXZ9jeHp/8= +github.com/mattn/go-runewidth v0.0.31 h1:1oCV4ReTlosDBc6rYRw5cL8S/4y8iv5oRl4SJ5IBgwo= +github.com/mattn/go-runewidth v0.0.31/go.mod h1:3qAiGCV4Koz/yuveO58qUefmUTRm8r0IGEXZ9jeHp/8= github.com/mattn/go-tty v0.0.8 h1:yxtc0Ye17/1ne/bjy993YUoyP8bJJFa9n5M9XTdwoZQ= github.com/mattn/go-tty v0.0.8/go.mod h1:f2i5ZOvXBU/tCABmLmOfzLz9azMo5wdAaElRNnJKr+k= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= @@ -99,32 +97,32 @@ github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= -github.com/tidwall/jsonc v0.3.3 h1:RVQqL3xFfDkKKXIDsrBiVQiEpBtxoKbmMXONb2H/y2w= -github.com/tidwall/jsonc v0.3.3/go.mod h1:dw+3CIxqHi+t8eFSpzzMlcVYxKp08UP5CD8/uSFCyJE= +github.com/tidwall/jsonc v0.3.4 h1:wAsD0hBbab9bh7smyhaJHdpiZwip1QZ+pn42K4QMlVI= +github.com/tidwall/jsonc v0.3.4/go.mod h1:dw+3CIxqHi+t8eFSpzzMlcVYxKp08UP5CD8/uSFCyJE= github.com/urfave/cli/v3 v3.14.0 h1:a8414NQlHJs0c/iBsulKLzlES0n/lEAskbL2LKpU4/s= github.com/urfave/cli/v3 v3.14.0/go.mod h1:vXn6HxPNccJSzQr2QvwVncOKrgYGIHU0HY5h8B2nQj4= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= -go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= -go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= +go.yaml.in/yaml/v3 v3.0.6 h1:zcDfvjXEqTQmpjniUBLc91xYJMB2c4QOFxEF/LCEckM= +go.yaml.in/yaml/v3 v3.0.6/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= go.yaml.in/yaml/v4 v4.0.0-rc.2 h1:/FrI8D64VSr4HtGIlUtlFMGsm7H7pWTbj6vOLVZcA6s= go.yaml.in/yaml/v4 v4.0.0-rc.2/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= -golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c= -golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o= -golang.org/x/net v0.59.0 h1:5zfYln+w5XCxwrnMMJPufRgNoXEaGxl0wo5GqPXyues= -golang.org/x/net v0.59.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg= -golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk= -golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= +golang.org/x/mod v0.43.0 h1:MFuq5J6s35W9D3IjkwyWc9vHh0nENOrt5K8Iof4ofmg= +golang.org/x/mod v0.43.0/go.mod h1:4ec1JnuyBz5+FIVhg86UsA39YG8BpnrZdJYSNHmGzHY= +golang.org/x/net v0.61.0 h1:RR+6j/BTBCrggOLugxa+66R8FvoN6MHlzDlZIbN9YFw= +golang.org/x/net v0.61.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI= +golang.org/x/sync v0.24.0 h1:iqiDrGoDgyuvAKrhLQthUEzU/R378N78gXbBjxed7oA= +golang.org/x/sync v0.24.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo= -golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= -golang.org/x/term v0.46.0 h1:3+OXuTbaKDgwk8jTi3aSLHRlmWqHEUDUtxnbFigO4YE= -golang.org/x/term v0.46.0/go.mod h1:+K02xbkittuwc0Am4abfA3Fc+XRGXkvBXNO88NCXPoc= -golang.org/x/text v0.42.0 h1:JbOZXgfeCPU9gacVtYliJqOhD+zhrEqK4LfdpmlUZqI= -golang.org/x/text v0.42.0/go.mod h1:ojzP1Z+2QtioaF8DTtO8K5q7JWVVYwZKenzujK0Zd0E= -golang.org/x/tools v0.51.0 h1:k4Xc/1Om9jwkBJBo4NVLMSARBoWtK10mx+W5BnXCeAI= -golang.org/x/tools v0.51.0/go.mod h1:9eEncMayCV6zRMGhR5eZEC2iBx98qWcF1HZ9Z7wJOoA= +golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA= +golang.org/x/sys v0.49.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= +golang.org/x/term v0.47.0 h1:cpyOwQkr2Nzxe2p6KnrTG7Ei2wtzjsuSjhpXXepZ/BM= +golang.org/x/term v0.47.0/go.mod h1:efAfAuG6RKABvg1ArGebRkvX6LXul14SM67o2e4mUCY= +golang.org/x/text v0.43.0 h1:1QivrlhwAsnMOcqgOdl9my7s9OyZl8O5/UGUTJVXoWc= +golang.org/x/text v0.43.0/go.mod h1:hbSIYA/amXcRXTFSZqh8tWHEoqRvvbKPJ2uz/KU+a+s= +golang.org/x/tools v0.52.0 h1:ryxg4U63oaUYk7uOLTF37n43f4qgtGvqV4Ioit1BaEs= +golang.org/x/tools v0.52.0/go.mod h1:ItcP5UNaVGG+Yc4eIYmaFLNJ4soEopkx5Y2d4lcEurs= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/internal/command/run.go new/lefthook-2.2.3/internal/command/run.go --- old/lefthook-2.2.2/internal/command/run.go 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/internal/command/run.go 2026-11-24 11:26:06.000000000 +0100 @@ -9,6 +9,7 @@ "os/signal" "path/filepath" "strings" + "syscall" "time" "github.com/evilmartians/lefthook/v2/internal/config" @@ -20,8 +21,9 @@ ) const ( - envEnabled = "LEFTHOOK" // "0", "false" - envOutput = "LEFTHOOK_OUTPUT" // "meta,success,failure,summary,skips,execution,execution_out,execution_info" + envEnabled = "LEFTHOOK" // "0", "false" + envOutput = "LEFTHOOK_OUTPUT" // "meta,success,failure,summary,skips,execution,execution_out,execution_info" + envNoAutoInstall = "LEFTHOOK_NO_AUTO_INSTALL" // "1", "true"; "0", "false" keep auto-install ) var errPipedAndParallelSet = errors.New("conflicting options 'piped' and 'parallel' are set to 'true', remove one of this option from hook group") @@ -97,7 +99,7 @@ exLogger.LogMeta(args.Hook) } - if !args.NoAutoInstall && !cfg.NoAutoInstall { + if !args.NoAutoInstall && !cfg.NoAutoInstall && !isEnvEnabled(envNoAutoInstall) { // This line controls updating the git hook if config has changed var newCfg *config.Config newCfg, err = l.syncHooks(cfg, !isGhostHook) @@ -260,7 +262,7 @@ exLogger *logger.ExecutionLogger, opts run.Options, ) error { - ctx, stop := signal.NotifyContext(ctx, os.Interrupt) + ctx, stop := signal.NotifyContext(ctx, interruptSignals(signal.Ignored(syscall.SIGHUP))...) defer stop() startTime := time.Now() @@ -287,6 +289,18 @@ return nil } +// interruptSignals returns the signals that cancel a running hook, so jobs get +// stopped and hidden unstaged changes get restored. SIGHUP is skipped when it +// is ignored (e.g. under nohup) because subscribing to it would unignore it. +func interruptSignals(hupIgnored bool) []os.Signal { + signals := []os.Signal{os.Interrupt, syscall.SIGTERM} + if !hupIgnored { + signals = append(signals, syscall.SIGHUP) + } + + return signals +} + func (l *Lefthook) logSummary( exLogger *logger.ExecutionLogger, duration time.Duration, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/internal/command/run_test.go new/lefthook-2.2.3/internal/command/run_test.go --- old/lefthook-2.2.2/internal/command/run_test.go 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/internal/command/run_test.go 2026-11-24 11:26:06.000000000 +0100 @@ -2,7 +2,9 @@ import ( "fmt" + "os" "path/filepath" + "syscall" "testing" "github.com/google/go-cmp/cmp" @@ -197,4 +199,27 @@ } }) } +} + +func Test_interruptSignals(t *testing.T) { + for name, tt := range map[string]struct { + hupIgnored bool + want []os.Signal + }{ + "hup-handled": { + want: []os.Signal{os.Interrupt, syscall.SIGTERM, syscall.SIGHUP}, + }, + "hup-ignored": { + hupIgnored: true, + want: []os.Signal{os.Interrupt, syscall.SIGTERM}, + }, + } { + t.Run(name, func(t *testing.T) { + result := interruptSignals(tt.hupIgnored) + + if !cmp.Equal(result, tt.want) { + t.Errorf("interruptSignals() = %v, want %v", result, tt.want) + } + }) + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/internal/config/config.go new/lefthook-2.2.3/internal/config/config.go --- old/lefthook-2.2.2/internal/config/config.go 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/internal/config/config.go 2026-11-24 11:26:06.000000000 +0100 @@ -9,7 +9,7 @@ "fmt" "io" - "github.com/mitchellh/mapstructure" + "github.com/go-viper/mapstructure/v2" "github.com/pelletier/go-toml/v2" "go.yaml.in/yaml/v3" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/internal/config/jsonschema.json new/lefthook-2.2.3/internal/config/jsonschema.json --- old/lefthook-2.2.2/internal/config/jsonschema.json 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/internal/config/jsonschema.json 2026-11-24 11:26:06.000000000 +0100 @@ -531,7 +531,7 @@ "type": "object" } }, - "$comment": "Last updated on 2026.07.03.", + "$comment": "Last updated on 2026.11.07.", "properties": { "min_version": { "type": "string", @@ -808,5 +808,7 @@ "additionalProperties": false, "type": "object" }, - "type": "object" + "type": "object", + "title": "Lefthook", + "description": "Configuration for Lefthook Git hooks manager." } \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/internal/run/controller/controller.go new/lefthook-2.2.3/internal/run/controller/controller.go --- old/lefthook-2.2.2/internal/run/controller/controller.go 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/internal/run/controller/controller.go 2026-11-24 11:26:06.000000000 +0100 @@ -5,7 +5,6 @@ import ( "context" "fmt" - "io" "os" "strconv" "strings" @@ -23,7 +22,7 @@ type Controller struct { git *git.Repo logger *logger.ExecutionLogger - cachedStdin io.Reader + cachedStdin *utils.CachedReader executor exec.Executor cmd system.CommandWithContext skipChecker *config.SkipChecker diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/internal/run/controller/filter/filter.go new/lefthook-2.2.3/internal/run/controller/filter/filter.go --- old/lefthook-2.2.2/internal/run/controller/filter/filter.go 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/internal/run/controller/filter/filter.go 2026-11-24 11:26:06.000000000 +0100 @@ -82,13 +82,20 @@ var hasNonEmpty bool vsf := make([]string, 0) + seen := make(map[string]struct{}) for _, matcher := range matchers { if len(matcher) == 0 { continue } hasNonEmpty = true - vsf = append(vsf, matchFiles(vs, matcher, globMatcher)...) + for _, file := range matchFiles(vs, matcher, globMatcher) { + if _, ok := seen[file]; ok { + continue + } + seen[file] = struct{}{} + vsf = append(vsf, file) + } } if !hasNonEmpty { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/internal/run/controller/filter/filter_test.go new/lefthook-2.2.3/internal/run/controller/filter/filter_test.go --- old/lefthook-2.2.2/internal/run/controller/filter/filter_test.go 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/internal/run/controller/filter/filter_test.go 2026-11-24 11:26:06.000000000 +0100 @@ -66,6 +66,12 @@ globMatcher: "", result: []string{"f.a", "f.b", "f.cn"}, }, + { + source: []string{"a.rb", "b.rb", "c.txt"}, + glob: []string{"*.rb", "a.*"}, + globMatcher: "", + result: []string{"a.rb", "b.rb"}, + }, } { t.Run(fmt.Sprintf("%d:", i), func(t *testing.T) { res := byGlob(tt.source, tt.glob, tt.globMatcher) @@ -112,6 +118,12 @@ globMatcher: "doublestar", result: []string{"test.js", "src/app.js", "src/lib/util.js"}, }, + { + source: []string{"a.rb", "b.rb", "c.txt"}, + glob: []string{"*.rb", "a.*"}, + globMatcher: "doublestar", + result: []string{"a.rb", "b.rb"}, + }, } { t.Run(fmt.Sprintf("doublestar-%d:", i), func(t *testing.T) { res := byGlob(tt.source, tt.glob, tt.globMatcher) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/internal/run/controller/lfs.go new/lefthook-2.2.3/internal/run/controller/lfs.go --- old/lefthook-2.2.2/internal/run/controller/lfs.go 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/internal/run/controller/lfs.go 2026-11-24 11:26:06.000000000 +0100 @@ -58,7 +58,7 @@ var stdin io.Reader if hookName == "pre-push" { // Git LFS reads ref updates from stdin for pre-push only. - stdin = c.cachedStdin + stdin = c.cachedStdin.Reader() } err = c.cmd.RunWithContext( ctx, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/internal/run/controller/run.go new/lefthook-2.2.3/internal/run/controller/run.go --- old/lefthook-2.2.2/internal/run/controller/run.go 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/internal/run/controller/run.go 2026-11-24 11:26:06.000000000 +0100 @@ -18,7 +18,7 @@ // If the command does not explicitly `use_stdin` no input will be provided. var in io.Reader = system.NullReader if opts.UseStdin { - in = c.cachedStdin + in = c.cachedStdin.Reader() } if (follow || opts.Interactive) && c.logger.Enabled(logger.LogExecution) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/internal/run/controller/utils/cached_reader.go new/lefthook-2.2.3/internal/run/controller/utils/cached_reader.go --- old/lefthook-2.2.2/internal/run/controller/utils/cached_reader.go 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/internal/run/controller/utils/cached_reader.go 2026-11-24 11:26:06.000000000 +0100 @@ -3,47 +3,31 @@ import ( "bytes" "io" + "sync" ) -// CachedReader reads from the provided `io.Reader` until `io.EOF` and saves -// the read content into the inner buffer. -// -// After `io.EOF` it will be providing the read data again and again. +// CachedReader reads from the provided `io.Reader` to `io.EOF` once and caches +// the content. Each call to `Reader` returns an independent reader over the +// cached bytes, so concurrent consumers each receive the full input. type CachedReader struct { - in io.Reader - useBuffer bool - buf []byte - reader *bytes.Reader + mu sync.Mutex + in io.Reader + cached bool + buf []byte } func NewCachedReader(in io.Reader) *CachedReader { - return &CachedReader{ - in: in, - buf: []byte{}, - reader: bytes.NewReader([]byte{}), - } + return &CachedReader{in: in} } -func (r *CachedReader) Read(p []byte) (int, error) { - if r.useBuffer { - n, err := r.reader.Read(p) - if err == io.EOF { - _, seekErr := r.reader.Seek(0, io.SeekStart) - if seekErr != nil { - panic(seekErr) - } - - return n, err - } - - return n, err +func (r *CachedReader) Reader() io.Reader { + r.mu.Lock() + defer r.mu.Unlock() + + if !r.cached { + r.buf, _ = io.ReadAll(r.in) + r.cached = true } - n, err := r.in.Read(p) - r.buf = append(r.buf, p[:n]...) - if err == io.EOF { - r.useBuffer = true - r.reader = bytes.NewReader(r.buf) - } - return n, err + return bytes.NewReader(r.buf) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/internal/run/controller/utils/cached_reader_test.go new/lefthook-2.2.3/internal/run/controller/utils/cached_reader_test.go --- old/lefthook-2.2.2/internal/run/controller/utils/cached_reader_test.go 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/internal/run/controller/utils/cached_reader_test.go 2026-11-24 11:26:06.000000000 +0100 @@ -3,6 +3,7 @@ import ( "bytes" "io" + "sync" "testing" ) @@ -12,7 +13,7 @@ cachedReader := NewCachedReader(bytes.NewReader(testSlice)) for range 5 { - res, err := io.ReadAll(cachedReader) + res, err := io.ReadAll(cachedReader.Reader()) if err != nil { t.Errorf("unexpected err: %s", err) } @@ -22,3 +23,31 @@ } } } + +func TestCachedReaderConcurrent(t *testing.T) { + testSlice := []byte("refs/heads/main 0000 refs/heads/main 1111\n") + + cachedReader := NewCachedReader(bytes.NewReader(testSlice)) + + const consumers = 16 + var wg sync.WaitGroup + results := make([][]byte, consumers) + for i := range consumers { + wg.Add(1) + go func(i int) { + defer wg.Done() + res, err := io.ReadAll(cachedReader.Reader()) + if err != nil { + t.Errorf("unexpected err: %s", err) + } + results[i] = res + }(i) + } + wg.Wait() + + for i, res := range results { + if !bytes.Equal(res, testSlice) { + t.Errorf("consumer %d: expected %v to be equal to %v", i, res, testSlice) + } + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/internal/version/version.go new/lefthook-2.2.3/internal/version/version.go --- old/lefthook-2.2.2/internal/version/version.go 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/internal/version/version.go 2026-11-24 11:26:06.000000000 +0100 @@ -8,7 +8,7 @@ "golang.org/x/mod/semver" ) -const version = "2.2.2" +const version = "2.2.3" var ( // Is set via -X github.com/evilmartians/lefthook/v2/internal/version.commit={commit}. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/aur/lefthook/PKGBUILD new/lefthook-2.2.3/packaging/registries/aur/lefthook/PKGBUILD --- old/lefthook-2.2.2/packaging/registries/aur/lefthook/PKGBUILD 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/aur/lefthook/PKGBUILD 2026-11-24 11:26:06.000000000 +0100 @@ -2,7 +2,7 @@ pkgname=lefthook pkgdesc="Git hooks manager" -pkgver=2.2.2 +pkgver=2.2.3 pkgrel=1 arch=('x86_64' 'aarch64') url="https://github.com/evilmartians/lefthook" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/aur/lefthook-bin/PKGBUILD new/lefthook-2.2.3/packaging/registries/aur/lefthook-bin/PKGBUILD --- old/lefthook-2.2.2/packaging/registries/aur/lefthook-bin/PKGBUILD 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/aur/lefthook-bin/PKGBUILD 2026-11-24 11:26:06.000000000 +0100 @@ -2,7 +2,7 @@ pkgname=lefthook-bin pkgdesc="Git hooks manager" -pkgver=2.2.2 +pkgver=2.2.3 pkgrel=1 arch=('x86_64' 'aarch64') url="https://github.com/evilmartians/lefthook" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/npm/lefthook/package.json new/lefthook-2.2.3/packaging/registries/npm/lefthook/package.json --- old/lefthook-2.2.2/packaging/registries/npm/lefthook/package.json 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/npm/lefthook/package.json 2026-11-24 11:26:06.000000000 +0100 @@ -1,6 +1,6 @@ { "name": "lefthook", - "version": "2.2.2", + "version": "2.2.3", "description": "Simple git hooks manager", "repository": { "type": "git", @@ -28,17 +28,17 @@ }, "homepage": "https://github.com/evilmartians/lefthook#readme", "optionalDependencies": { - "lefthook-darwin-arm64": "2.2.2", - "lefthook-darwin-x64": "2.2.2", - "lefthook-linux-arm64": "2.2.2", - "lefthook-linux-x64": "2.2.2", - "lefthook-freebsd-arm64": "2.2.2", - "lefthook-freebsd-x64": "2.2.2", - "lefthook-openbsd-arm64": "2.2.2", - "lefthook-openbsd-x64": "2.2.2", - "lefthook-windows-arm64": "2.2.2", - "lefthook-windows-x64": "2.2.2", - "lefthook-android-arm64": "2.2.2" + "lefthook-darwin-arm64": "2.2.3", + "lefthook-darwin-x64": "2.2.3", + "lefthook-linux-arm64": "2.2.3", + "lefthook-linux-x64": "2.2.3", + "lefthook-freebsd-arm64": "2.2.3", + "lefthook-freebsd-x64": "2.2.3", + "lefthook-openbsd-arm64": "2.2.3", + "lefthook-openbsd-x64": "2.2.3", + "lefthook-windows-arm64": "2.2.3", + "lefthook-windows-x64": "2.2.3", + "lefthook-android-arm64": "2.2.3" }, "scripts": { "postinstall": "node postinstall.js" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/npm/lefthook-android-arm64/package.json new/lefthook-2.2.3/packaging/registries/npm/lefthook-android-arm64/package.json --- old/lefthook-2.2.2/packaging/registries/npm/lefthook-android-arm64/package.json 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/npm/lefthook-android-arm64/package.json 2026-11-24 11:26:06.000000000 +0100 @@ -1,6 +1,6 @@ { "name": "lefthook-android-arm64", - "version": "2.2.2", + "version": "2.2.3", "description": "The Android ARM64-bit binary for lefthook, git hooks manager.", "preferUnplugged": false, "repository": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/npm/lefthook-darwin-arm64/package.json new/lefthook-2.2.3/packaging/registries/npm/lefthook-darwin-arm64/package.json --- old/lefthook-2.2.2/packaging/registries/npm/lefthook-darwin-arm64/package.json 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/npm/lefthook-darwin-arm64/package.json 2026-11-24 11:26:06.000000000 +0100 @@ -1,6 +1,6 @@ { "name": "lefthook-darwin-arm64", - "version": "2.2.2", + "version": "2.2.3", "description": "The macOS ARM 64-bit binary for lefthook, git hooks manager.", "preferUnplugged": false, "repository": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/npm/lefthook-darwin-x64/package.json new/lefthook-2.2.3/packaging/registries/npm/lefthook-darwin-x64/package.json --- old/lefthook-2.2.2/packaging/registries/npm/lefthook-darwin-x64/package.json 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/npm/lefthook-darwin-x64/package.json 2026-11-24 11:26:06.000000000 +0100 @@ -1,6 +1,6 @@ { "name": "lefthook-darwin-x64", - "version": "2.2.2", + "version": "2.2.3", "description": "The macOS 64-bit binary for lefthook, git hooks manager.", "preferUnplugged": false, "repository": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/npm/lefthook-freebsd-arm64/package.json new/lefthook-2.2.3/packaging/registries/npm/lefthook-freebsd-arm64/package.json --- old/lefthook-2.2.2/packaging/registries/npm/lefthook-freebsd-arm64/package.json 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/npm/lefthook-freebsd-arm64/package.json 2026-11-24 11:26:06.000000000 +0100 @@ -1,6 +1,6 @@ { "name": "lefthook-freebsd-arm64", - "version": "2.2.2", + "version": "2.2.3", "description": "The FreeBSD ARM 64-bit binary for lefthook, git hooks manager.", "preferUnplugged": false, "repository": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/npm/lefthook-freebsd-x64/package.json new/lefthook-2.2.3/packaging/registries/npm/lefthook-freebsd-x64/package.json --- old/lefthook-2.2.2/packaging/registries/npm/lefthook-freebsd-x64/package.json 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/npm/lefthook-freebsd-x64/package.json 2026-11-24 11:26:06.000000000 +0100 @@ -1,6 +1,6 @@ { "name": "lefthook-freebsd-x64", - "version": "2.2.2", + "version": "2.2.3", "description": "The FreeBSD 64-bit binary for lefthook, git hooks manager.", "preferUnplugged": false, "repository": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/npm/lefthook-linux-arm64/package.json new/lefthook-2.2.3/packaging/registries/npm/lefthook-linux-arm64/package.json --- old/lefthook-2.2.2/packaging/registries/npm/lefthook-linux-arm64/package.json 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/npm/lefthook-linux-arm64/package.json 2026-11-24 11:26:06.000000000 +0100 @@ -1,6 +1,6 @@ { "name": "lefthook-linux-arm64", - "version": "2.2.2", + "version": "2.2.3", "description": "The Linux ARM 64-bit binary for lefthook, git hooks manager.", "preferUnplugged": false, "repository": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/npm/lefthook-linux-x64/package.json new/lefthook-2.2.3/packaging/registries/npm/lefthook-linux-x64/package.json --- old/lefthook-2.2.2/packaging/registries/npm/lefthook-linux-x64/package.json 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/npm/lefthook-linux-x64/package.json 2026-11-24 11:26:06.000000000 +0100 @@ -1,6 +1,6 @@ { "name": "lefthook-linux-x64", - "version": "2.2.2", + "version": "2.2.3", "description": "The Linux 64-bit binary for lefthook, git hooks manager.", "preferUnplugged": false, "repository": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/npm/lefthook-openbsd-arm64/package.json new/lefthook-2.2.3/packaging/registries/npm/lefthook-openbsd-arm64/package.json --- old/lefthook-2.2.2/packaging/registries/npm/lefthook-openbsd-arm64/package.json 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/npm/lefthook-openbsd-arm64/package.json 2026-11-24 11:26:06.000000000 +0100 @@ -1,6 +1,6 @@ { "name": "lefthook-openbsd-arm64", - "version": "2.2.2", + "version": "2.2.3", "description": "The OpenBSD ARM 64-bit binary for lefthook, git hooks manager.", "preferUnplugged": false, "repository": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/npm/lefthook-openbsd-x64/package.json new/lefthook-2.2.3/packaging/registries/npm/lefthook-openbsd-x64/package.json --- old/lefthook-2.2.2/packaging/registries/npm/lefthook-openbsd-x64/package.json 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/npm/lefthook-openbsd-x64/package.json 2026-11-24 11:26:06.000000000 +0100 @@ -1,6 +1,6 @@ { "name": "lefthook-openbsd-x64", - "version": "2.2.2", + "version": "2.2.3", "description": "The OpenBSD 64-bit binary for lefthook, git hooks manager.", "preferUnplugged": false, "repository": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/npm/lefthook-windows-arm64/package.json new/lefthook-2.2.3/packaging/registries/npm/lefthook-windows-arm64/package.json --- old/lefthook-2.2.2/packaging/registries/npm/lefthook-windows-arm64/package.json 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/npm/lefthook-windows-arm64/package.json 2026-11-24 11:26:06.000000000 +0100 @@ -1,6 +1,6 @@ { "name": "lefthook-windows-arm64", - "version": "2.2.2", + "version": "2.2.3", "description": "The Windows ARM 64-bit binary for lefthook, git hooks manager.", "preferUnplugged": false, "repository": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/npm/lefthook-windows-x64/package.json new/lefthook-2.2.3/packaging/registries/npm/lefthook-windows-x64/package.json --- old/lefthook-2.2.2/packaging/registries/npm/lefthook-windows-x64/package.json 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/npm/lefthook-windows-x64/package.json 2026-11-24 11:26:06.000000000 +0100 @@ -1,6 +1,6 @@ { "name": "lefthook-windows-x64", - "version": "2.2.2", + "version": "2.2.3", "description": "The Windows 64-bit binary for lefthook, git hooks manager.", "preferUnplugged": false, "repository": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/npm-bundled/package.json new/lefthook-2.2.3/packaging/registries/npm-bundled/package.json --- old/lefthook-2.2.2/packaging/registries/npm-bundled/package.json 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/npm-bundled/package.json 2026-11-24 11:26:06.000000000 +0100 @@ -1,6 +1,6 @@ { "name": "@evilmartians/lefthook", - "version": "2.2.2", + "version": "2.2.3", "description": "Simple git hooks manager", "main": "bin/index.js", "files": [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/npm-installer/package.json new/lefthook-2.2.3/packaging/registries/npm-installer/package.json --- old/lefthook-2.2.2/packaging/registries/npm-installer/package.json 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/npm-installer/package.json 2026-11-24 11:26:06.000000000 +0100 @@ -1,6 +1,6 @@ { "name": "@evilmartians/lefthook-installer", - "version": "2.2.2", + "version": "2.2.3", "description": "Simple git hooks manager", "main": "bin/index.js", "files": [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/php/bin/lefthook new/lefthook-2.2.3/packaging/registries/php/bin/lefthook --- old/lefthook-2.2.2/packaging/registries/php/bin/lefthook 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/php/bin/lefthook 2026-11-24 11:26:06.000000000 +0100 @@ -1,7 +1,7 @@ #!/usr/bin/env php <?php -const LEFTHOOK_VERSION = '2.2.2'; +const LEFTHOOK_VERSION = '2.2.3'; $os = match (PHP_OS_FAMILY) { 'Linux' => 'Linux', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/pypi/hatch_build.py new/lefthook-2.2.3/packaging/registries/pypi/hatch_build.py --- old/lefthook-2.2.2/packaging/registries/pypi/hatch_build.py 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/pypi/hatch_build.py 2026-11-24 11:26:06.000000000 +0100 @@ -28,8 +28,8 @@ PEP425_TAGS = { - ("linux", "x86_64"): "py3-none-manylinux_2_17_x86_64", - ("linux", "arm64"): "py3-none-manylinux_2_17_aarch64", + ("linux", "x86_64"): "py3-none-manylinux_2_17_x86_64.musllinux_1_1_x86_64", + ("linux", "arm64"): "py3-none-manylinux_2_17_aarch64.musllinux_1_1_aarch64", ("darwin", "x86_64"): "py3-none-macosx_10_15_x86_64", ("darwin", "arm64"): "py3-none-macosx_11_0_arm64", ("windows", "x86_64"): "py3-none-win_amd64", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/pypi/pyproject.toml new/lefthook-2.2.3/packaging/registries/pypi/pyproject.toml --- old/lefthook-2.2.2/packaging/registries/pypi/pyproject.toml 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/pypi/pyproject.toml 2026-11-24 11:26:06.000000000 +0100 @@ -1,6 +1,6 @@ [project] name = "lefthook" -version = "2.2.2" +version = "2.2.3" description = "Git hooks manager. Fast, powerful, simple." readme = "README.md" license = "MIT" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/registries/rubygems/lefthook.gemspec new/lefthook-2.2.3/packaging/registries/rubygems/lefthook.gemspec --- old/lefthook-2.2.2/packaging/registries/rubygems/lefthook.gemspec 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/registries/rubygems/lefthook.gemspec 2026-11-24 11:26:06.000000000 +0100 @@ -1,6 +1,6 @@ Gem::Specification.new do |spec| spec.name = "lefthook" - spec.version = "2.2.2" + spec.version = "2.2.3" spec.authors = ["A.A.Abroskin", "Evil Martians"] spec.email = ["[email protected]"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/scripts/lib/globals.sh new/lefthook-2.2.3/packaging/scripts/lib/globals.sh --- old/lefthook-2.2.2/packaging/scripts/lib/globals.sh 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/scripts/lib/globals.sh 2026-11-24 11:26:06.000000000 +0100 @@ -3,7 +3,7 @@ [[ -n "${_GLOBALS_SH:-}" ]] && return _GLOBALS_SH=1 -VERSION="2.2.2" +VERSION="2.2.3" lib="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/scripts/lib/npm.sh new/lefthook-2.2.3/packaging/scripts/lib/npm.sh --- old/lefthook-2.2.2/packaging/scripts/lib/npm.sh 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/scripts/lib/npm.sh 2026-11-24 11:26:06.000000000 +0100 @@ -12,6 +12,7 @@ NPM_INSTALLER="$REGISTRIES_ROOT/npm-installer" declare -ra PACKAGES=( + "${NPM}/lefthook-android-arm64" "${NPM}/lefthook-darwin-arm64" "${NPM}/lefthook-darwin-x64" "${NPM}/lefthook-linux-arm64" @@ -22,8 +23,11 @@ "${NPM}/lefthook-freebsd-x64" "${NPM}/lefthook-openbsd-arm64" "${NPM}/lefthook-openbsd-x64" - "${NPM}/lefthook-android-arm64" "${NPM}/lefthook" +) + +declare -ra ALL_PACKAGES=( + "${PACKAGES[@]}" "${NPM_BUNDLED}" "${NPM_INSTALLER}" ) @@ -57,7 +61,7 @@ ) set_version_npm() { - for package in "${PACKAGES[@]}" + for package in "${ALL_PACKAGES[@]}" do replace "$package/package.json" '"version":\s*"[\d\w.]+"' "\"version\": \"${VERSION}\"" done @@ -69,7 +73,7 @@ } prepare_npm() { - for package in "${PACKAGES[@]}" + for package in "${ALL_PACKAGES[@]}" do copy "$REPO_ROOT/README.md" "$package/README.md" done @@ -104,7 +108,35 @@ pushd "$package" echo "Publishing $(basename "$package")" - npm publish --access public + if ! npm view "$(basename "$package")@${VERSION}" 2>&1 >/dev/null + then + npm publish --access public + fi + popd done } + +publish_npm_bundled() { + pushd "${NPM_BUNDLED}" + echo "Publishing @evilmartians/lefthook" + + if ! npm view "@evilmartians/lefthook@${VERSION}" 2>&1 >/dev/null + then + npm publish --access public + fi + + popd +} + +publish_npm_installer() { + pushd "${NPM_INSTALLER}" + echo "Publishing @evilmartians/lefthook-installer" + + if ! npm view "@evilmartians/lefthook-installer@${VERSION}" 2>&1 >/dev/null + then + npm publish --access public + fi + + popd +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/scripts/prepare new/lefthook-2.2.3/packaging/scripts/prepare --- old/lefthook-2.2.2/packaging/scripts/prepare 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/scripts/prepare 2026-11-24 11:26:06.000000000 +0100 @@ -4,7 +4,7 @@ lib="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/lib" case $1 in - npm) + npm|npm-bundled|npm-installer) source "$lib/npm.sh" prepare_npm ;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/packaging/scripts/publish new/lefthook-2.2.3/packaging/scripts/publish --- old/lefthook-2.2.2/packaging/scripts/publish 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/packaging/scripts/publish 2026-11-24 11:26:06.000000000 +0100 @@ -8,6 +8,14 @@ source "$lib/npm.sh" publish_npm ;; + npm-bundled) + source "$lib/npm.sh" + publish_npm_bundled + ;; + npm-installer) + source "$lib/npm.sh" + publish_npm_installer + ;; rubygem) source "$lib/rubygem.sh" publish_rubygem diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/schema.json new/lefthook-2.2.3/schema.json --- old/lefthook-2.2.2/schema.json 2026-10-13 11:14:21.000000000 +0200 +++ new/lefthook-2.2.3/schema.json 2026-11-24 11:26:06.000000000 +0100 @@ -531,7 +531,7 @@ "type": "object" } }, - "$comment": "Last updated on 2026.07.03.", + "$comment": "Last updated on 2026.11.07.", "properties": { "min_version": { "type": "string", @@ -808,5 +808,7 @@ "additionalProperties": false, "type": "object" }, - "type": "object" + "type": "object", + "title": "Lefthook", + "description": "Configuration for Lefthook Git hooks manager." } \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lefthook-2.2.2/tests/integration/no_auto_install_env.txt new/lefthook-2.2.3/tests/integration/no_auto_install_env.txt --- old/lefthook-2.2.2/tests/integration/no_auto_install_env.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/lefthook-2.2.3/tests/integration/no_auto_install_env.txt 2026-11-24 11:26:06.000000000 +0100 @@ -0,0 +1,19 @@ +exec git init + +env LEFTHOOK_NO_AUTO_INSTALL=1 +exec lefthook run pre-commit --no-tty +! exists .git/hooks/pre-commit + +env LEFTHOOK_NO_AUTO_INSTALL=true +exec lefthook run pre-commit --no-tty +! exists .git/hooks/pre-commit + +env LEFTHOOK_NO_AUTO_INSTALL=0 +exec lefthook run pre-commit --no-tty +exists .git/hooks/pre-commit + +-- lefthook.yml -- +pre-commit: + commands: + echo: + run: echo ok ++++++ lefthook.obsinfo ++++++ --- /var/tmp/diff_new_pack.MJDdbW/_old 2026-11-25 16:15:45.723529302 +0100 +++ /var/tmp/diff_new_pack.MJDdbW/_new 2026-11-25 16:15:45.729529556 +0100 @@ -1,5 +1,5 @@ name: lefthook -version: 2.2.2 -mtime: 1791882861 -commit: eb4e504b7c1d1ea6cb1fd29542431cb6d1a93a03 +version: 2.2.3 +mtime: 1795515966 +commit: 71fefa103aad28177d10d3f4a6cdc5f441557584 ++++++ vendor.tar.gz ++++++ ++++ 9539 lines of diff (skipped)
