Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CommitOptions: AllowEmptyCommits, return error instead of creating empty commits #623

Merged
merged 1 commit into from Dec 11, 2022

Conversation

pjbgf
Copy link
Member

@pjbgf pjbgf commented Nov 30, 2022

BuildTree now returns an ErrEmptyCommit error, when there are no changes to be committed, which can be opted-out via CommitOptions.AllowEmptyCommits.

This is a breaking change which enables applications to detect when empty commits are to be created.

Some instances in which this can occur is when the fs (e.g. billy/osfs) make changes to the underlying files, causing a conflict between what the previous Git worktree state was, and the current state. Changes to the fs implementations are orthogonal to this, and will be dealt with separately.

The new behaviour aligns with the Git CLI, in which empty commits returns the error message: nothing to commit, working tree clean.

@mcuadros
Copy link
Member

mcuadros commented Dec 1, 2022

Ok, but make a way to opt out of this feature by adding CommitOptions.AllowEmptyCommits or something like this.

BuildTree now returns an ErrEmptyCommit error, when there are no
changes to be committed. This can be opted-out via
CommitOptions.AllowEmptyCommits.

This is a breaking change which enables applications to detect when
empty commits are to be created.

Some instances in which this can occur is when the fs (e.g. `billy/osfs`)
make changes to the underlying files, causing a conflict between what
the previous Git worktree state was, and the current state. Changes to
the fs implementations are orthogonal to this, and will be dealt with
separately.

The new behaviour aligns with the Git CLI, in which empty commits
returns the error message: 'nothing to commit, working tree clean'.

Signed-off-by: Paulo Gomes <pjbgf@linux.com>
@mcuadros mcuadros changed the title Return error instead of creating empty commits CommitOptions: AllowEmptyCommits, return error instead of creating empty commits Dec 11, 2022
@mcuadros mcuadros merged commit c7050e7 into go-git:master Dec 11, 2022
@pjbgf pjbgf deleted the empty-commit branch December 12, 2022 10:32
andrewpollock pushed a commit to google/osv.dev that referenced this pull request Jan 5, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[cloud.google.com/go/pubsub](https://togithub.com/googleapis/google-cloud-go)
| require | minor | `v1.27.1` -> `v1.28.0` |
| [github.com/go-git/go-git/v5](https://togithub.com/go-git/go-git) |
require | patch | `v5.5.0` -> `v5.5.1` |
|
[google.golang.org/api](https://togithub.com/googleapis/google-api-go-client)
| require | minor | `v0.103.0` -> `v0.106.0` |

---

### Release Notes

<details>
<summary>go-git/go-git</summary>

### [`v5.5.1`](https://togithub.com/go-git/go-git/releases/tag/v5.5.1)

[Compare
Source](https://togithub.com/go-git/go-git/compare/v5.5.0...v5.5.1)

#### What's Changed

- \*: fix error when building with `CGO_ENABLED=0` by
[@&#8203;pjbgf](https://togithub.com/pjbgf) in
[go-git/go-git#625
- plumbing: transport/ssh: fix panic on Windows 10 with paegent as
ssh-agent by [@&#8203;doxsch](https://togithub.com/doxsch) in
[go-git/go-git#617
- CommitOptions: AllowEmptyCommits, return an error instead of creating
empty commits by [@&#8203;pjbgf](https://togithub.com/pjbgf) in
[go-git/go-git#623

**Full Changelog**:
go-git/go-git@v5.5.0...v5.5.1

</details>

<details>
<summary>googleapis/google-api-go-client</summary>

###
[`v0.106.0`](https://togithub.com/googleapis/google-api-go-client/releases/tag/v0.106.0)

[Compare
Source](https://togithub.com/googleapis/google-api-go-client/compare/v0.105.0...v0.106.0)

##### Features

- **all:** Auto-regenerate discovery clients
([#&#8203;1784](https://togithub.com/googleapis/google-api-go-client/issues/1784))
([a7f08e2](https://togithub.com/googleapis/google-api-go-client/commit/a7f08e2d1f5d4590ae0c6d66077f012bd18b5464))
- **all:** Auto-regenerate discovery clients
([#&#8203;1788](https://togithub.com/googleapis/google-api-go-client/issues/1788))
([9fb35f5](https://togithub.com/googleapis/google-api-go-client/commit/9fb35f5f5db837dc8aba5b742b63e1a837621f75))
- **all:** Auto-regenerate discovery clients
([#&#8203;1790](https://togithub.com/googleapis/google-api-go-client/issues/1790))
([7bd17b3](https://togithub.com/googleapis/google-api-go-client/commit/7bd17b38d39db0700ee20e5078cd4b7c8c3d3acb))
- **all:** Auto-regenerate discovery clients
([#&#8203;1794](https://togithub.com/googleapis/google-api-go-client/issues/1794))
([3944e86](https://togithub.com/googleapis/google-api-go-client/commit/3944e86684b39e05e27a17e66ed54873433c6ad4))
- **idtoken:** Add support for impersonated_service_account creds type
([#&#8203;1792](https://togithub.com/googleapis/google-api-go-client/issues/1792))
([f6dec99](https://togithub.com/googleapis/google-api-go-client/commit/f6dec99d014cc508d0374b666f2c325534a30bea)),
refs
[#&#8203;873](https://togithub.com/googleapis/google-api-go-client/issues/873)
- **option/internaloption:** Add new EmbeddableAdapter option
([#&#8203;1787](https://togithub.com/googleapis/google-api-go-client/issues/1787))
([1569e5b](https://togithub.com/googleapis/google-api-go-client/commit/1569e5b294ad150050319c108bfbcade2180351b))

##### Bug Fixes

- **idtoken:** Configure validator constructor to use no authentication
([#&#8203;1789](https://togithub.com/googleapis/google-api-go-client/issues/1789))
([b35900a](https://togithub.com/googleapis/google-api-go-client/commit/b35900aff148bb8446ca7e15ed0beb50d749d6c7)),
refs
[#&#8203;1682](https://togithub.com/googleapis/google-api-go-client/issues/1682)

###
[`v0.105.0`](https://togithub.com/googleapis/google-api-go-client/releases/tag/v0.105.0)

[Compare
Source](https://togithub.com/googleapis/google-api-go-client/compare/v0.104.0...v0.105.0)

##### Features

- **all:** Auto-regenerate discovery clients
([#&#8203;1773](https://togithub.com/googleapis/google-api-go-client/issues/1773))
([37a2e41](https://togithub.com/googleapis/google-api-go-client/commit/37a2e41e92933254a8432f3b74ad1a16eae2c5ac))
- **all:** Auto-regenerate discovery clients
([#&#8203;1777](https://togithub.com/googleapis/google-api-go-client/issues/1777))
([5b02761](https://togithub.com/googleapis/google-api-go-client/commit/5b02761e99fbb41602d107af92a8dec393250321))
- **googleapi:** Add response headers to Error reported by
CheckMediaResponse
([#&#8203;1781](https://togithub.com/googleapis/google-api-go-client/issues/1781))
([e4271df](https://togithub.com/googleapis/google-api-go-client/commit/e4271dfa222fea0fcf61fc5133c66e2e8d8f08b1))
- Support set null map entries for non-simple map values
([#&#8203;1782](https://togithub.com/googleapis/google-api-go-client/issues/1782))
([c58bf4c](https://togithub.com/googleapis/google-api-go-client/commit/c58bf4cfef76fcd9a377452b5c3cb84d5f20ce98))

###
[`v0.104.0`](https://togithub.com/googleapis/google-api-go-client/releases/tag/v0.104.0)

[Compare
Source](https://togithub.com/googleapis/google-api-go-client/compare/v0.103.0...v0.104.0)

##### Features

- **all:** Auto-regenerate discovery clients
([#&#8203;1746](https://togithub.com/googleapis/google-api-go-client/issues/1746))
([292129c](https://togithub.com/googleapis/google-api-go-client/commit/292129c681cb5e8f7dc66e499e477be5aec4a26e))
- **all:** Auto-regenerate discovery clients
([#&#8203;1751](https://togithub.com/googleapis/google-api-go-client/issues/1751))
([a657f19](https://togithub.com/googleapis/google-api-go-client/commit/a657f191681814da2c048118f02e5a85e9c9436b))
- **all:** Auto-regenerate discovery clients
([#&#8203;1752](https://togithub.com/googleapis/google-api-go-client/issues/1752))
([dd565a4](https://togithub.com/googleapis/google-api-go-client/commit/dd565a4a1b3867b4a1fe86ff9d8a633a6f3ba032))
- **all:** Auto-regenerate discovery clients
([#&#8203;1753](https://togithub.com/googleapis/google-api-go-client/issues/1753))
([e18b504](https://togithub.com/googleapis/google-api-go-client/commit/e18b5044ca349e4d5b4a3b1cd807fed7e1e0fd39))
- **all:** Auto-regenerate discovery clients
([#&#8203;1755](https://togithub.com/googleapis/google-api-go-client/issues/1755))
([caf7af0](https://togithub.com/googleapis/google-api-go-client/commit/caf7af030c55a39723c92c3d9ee66b7c6c1e5a04))
- **all:** Auto-regenerate discovery clients
([#&#8203;1760](https://togithub.com/googleapis/google-api-go-client/issues/1760))
([97a9846](https://togithub.com/googleapis/google-api-go-client/commit/97a98461099acaeccf04f64531ef7f06696e64fd))
- **all:** Auto-regenerate discovery clients
([#&#8203;1766](https://togithub.com/googleapis/google-api-go-client/issues/1766))
([3195ce1](https://togithub.com/googleapis/google-api-go-client/commit/3195ce1ad12642c558d76353328a0ad05173e608))
- **all:** Auto-regenerate discovery clients
([#&#8203;1767](https://togithub.com/googleapis/google-api-go-client/issues/1767))
([2b596d9](https://togithub.com/googleapis/google-api-go-client/commit/2b596d9f5bf651ba950d60378880ef98bf9f439f))
- **all:** Auto-regenerate discovery clients
([#&#8203;1771](https://togithub.com/googleapis/google-api-go-client/issues/1771))
([f819644](https://togithub.com/googleapis/google-api-go-client/commit/f8196440cbf05306c6f25dfe490e1a9069d44952))
- **transport:** De-experiment google-c2p resolver
([#&#8203;1757](https://togithub.com/googleapis/google-api-go-client/issues/1757))
([8d8f0a7](https://togithub.com/googleapis/google-api-go-client/commit/8d8f0a70d0bd6ba4daaa08370d1420f759ff7f9d))

##### Bug Fixes

- **idtoken:** Increase MaxIdleConnsPerHost to 100 in NewClient
([#&#8203;1754](https://togithub.com/googleapis/google-api-go-client/issues/1754))
([629e217](https://togithub.com/googleapis/google-api-go-client/commit/629e217f768c719d047c87c7389fbf757a45d0b9)),
refs
[#&#8203;1744](https://togithub.com/googleapis/google-api-go-client/issues/1744)
- **transport/grpc:** Separate resolution of creds and certs
([#&#8203;1759](https://togithub.com/googleapis/google-api-go-client/issues/1759))
([c213153](https://togithub.com/googleapis/google-api-go-client/commit/c213153d17a87e76a4f721076ddaed3ac8cb26c7))

##### Documentation

- Document limitation of WithUserAgent
([#&#8203;1747](https://togithub.com/googleapis/google-api-go-client/issues/1747))
([567070f](https://togithub.com/googleapis/google-api-go-client/commit/567070f3835f9f4039ed121de7319f9cf5a5af6b))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 6am on monday" in timezone
Australia/Sydney, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/google/osv.dev).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4yNC4wIiwidXBkYXRlZEluVmVyIjoiMzQuNzMuMyJ9-->
makkes added a commit to fluxcd/go-git-providers that referenced this pull request May 4, 2023
go-git 5.5.1 shipped a breaking change
(go-git/go-git#623) that we need to take into
account here in setting `AllowEmptyCommits: true` when initializing
a bitbucket repository.

Signed-off-by: Max Jonas Werner <mail@makk.es>
makkes added a commit to fluxcd/go-git-providers that referenced this pull request May 4, 2023
go-git 5.5.1 shipped a breaking change
(go-git/go-git#623) that we need to take into
account here in setting `AllowEmptyCommits: true` when initializing
a bitbucket repository.

Signed-off-by: Max Jonas Werner <mail@makk.es>
zydou pushed a commit to zydou/tea that referenced this pull request Sep 25, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) | require | minor | `v5.4.2` -> `v5.8.1` |

---

### ⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>go-git/go-git (github.com/go-git/go-git/v5)</summary>

### [`v5.8.1`](https://github.com/go-git/go-git/releases/tag/v5.8.1)

[Compare Source](go-git/go-git@v5.8.0...v5.8.1)

#### What's Changed

-   \*: Bump dependencies by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#815

**Full Changelog**: go-git/go-git@v5.8.0...v5.8.1

### [`v5.8.0`](https://github.com/go-git/go-git/releases/tag/v5.8.0)

[Compare Source](go-git/go-git@v5.7.0...v5.8.0)

#### What's Changed

-   git: Fix fetching after shallow clone. Fixes [#&#8203;305](go-git/go-git#305) by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#778
-   git: enable fetch with unqualified references by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#762
-   git: don't add to want if exists, shallow and depth 1 by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#763
-   git: Clone HEAD should not force master. Fixes [#&#8203;363](go-git/go-git#363) by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#758
-   git: fix the issue with submodules having the SCP style URL fail due to the wrong URL parsing by [@&#8203;matejrisek](https://github.com/matejrisek) in go-git/go-git#756
-   git: add a clone option to allow for shallow cloning of submodules by [@&#8203;matejrisek](https://github.com/matejrisek) in go-git/go-git#765
-   worktree: minor speedup for `doAddDirectory` by [@&#8203;ThinkChaos](https://github.com/ThinkChaos) in go-git/go-git#702
-   \_examples: Remove wrong comment by [@&#8203;pascal-hofmann](https://github.com/pascal-hofmann) in go-git/go-git#357
-   \*: Handle paths starting with tilde by [@&#8203;ricci2511](https://github.com/ricci2511) in go-git/go-git#808
-   \*: Handle paths starting with ~Username by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#809
-   storage: filesystem/dotgit, add support for tmp_objdir prefix by [@&#8203;L11R](https://github.com/L11R) in go-git/go-git#812
-   plumbing: gitignore, replace user dir in path by [@&#8203;Jleagle](https://github.com/Jleagle) in go-git/go-git#772
-   plumbing: gitignore, fix incorrect parsing. Fixes [#&#8203;500](go-git/go-git#500) by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#781
-   plumbing: http, Fix empty repos on Git v2.41+ by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#802
-   plumbing: packp, A request is not empty if it contains shallows. Fixes [#&#8203;328](go-git/go-git#328) by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#792
-   plumbing: blame, Complete rewrite. Fixes [#&#8203;603](go-git/go-git#603) by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#789
-   plumbing: gitignore, Allow gitconfig to contain a gitignore relative to any user home. Fixes [#&#8203;578](go-git/go-git#578) by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#785

#### New Contributors

-   [@&#8203;Jleagle](https://github.com/Jleagle) made their first contribution in go-git/go-git#772
-   [@&#8203;pascal-hofmann](https://github.com/pascal-hofmann) made their first contribution in go-git/go-git#357
-   [@&#8203;ricci2511](https://github.com/ricci2511) made their first contribution in go-git/go-git#808
-   [@&#8203;L11R](https://github.com/L11R) made their first contribution in go-git/go-git#812

**Full Changelog**: go-git/go-git@v5.7.0...v5.7.1

### [`v5.7.0`](https://github.com/go-git/go-git/releases/tag/v5.7.0)

[Compare Source](go-git/go-git@v5.6.1...v5.7.0)

#### What's Changed

-   \*: Add support for initializing SHA256 repositories by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#707
-   git: add mirror clone option by [@&#8203;aymanbagabas](https://github.com/aymanbagabas) in go-git/go-git#735
-   git: Add support to ls-remote with peeled references. Fixes [#&#8203;749](go-git/go-git#749) by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#750
-   git: fix cloning with branch name by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#755
-   git: Worktree, add check to see if file already checked in. Fixes [#&#8203;718](go-git/go-git#718) by [@&#8203;cbbm142](https://github.com/cbbm142) in go-git/go-git#719
-   git: Worktree, git grep bare repositories by [@&#8203;aymanbagabas](https://github.com/aymanbagabas) in go-git/go-git#728
-   git: Add Depth to SubmoduleUpdateOptions by [@&#8203;matejrisek](https://github.com/matejrisek) in go-git/go-git#754
-   git: Testing, Fix tests not cleaning temp folders by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#769
-   git: remote, add support for a configurable timeout. by [@&#8203;andrewpollock](https://github.com/andrewpollock) in go-git/go-git#753
-   git: Allow Initial Branch to be configurable by [@&#8203;techknowlogick](https://github.com/techknowlogick) in go-git/go-git#764
-   storage: filesystem/dotgit, Improve load packed-refs by [@&#8203;fcharlie](https://github.com/fcharlie) in go-git/go-git#743
-   storage: filesystem, Populate index before use. Fixes [#&#8203;148](go-git/go-git#148) by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#722
-   plumbing: resolve non-external delta references by [@&#8203;ZauberNerd](https://github.com/ZauberNerd) in go-git/go-git#485
-   plumbing/transport: fix regression in scp-like match by [@&#8203;jotadrilo](https://github.com/jotadrilo) in go-git/go-git#715
-   plumbing/transport: Add support for custom proxy settings by [@&#8203;aryan9600](https://github.com/aryan9600) in go-git/go-git#744
-   \*: small fixes across the codebase by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#770
-   \*: bump github.com/cloudflare/circl from 1.1.0 to 1.3.3 by [@&#8203;dependabot](https://github.com/dependabot) in go-git/go-git#776
-   \*: bump dependencies by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#748
-   \*: bump Go version to 1.18 on go.mod by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#774
-   \*: add Codeql workflow and bump dependencies by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#775
-   ci: fix upstream git build for master branch by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#739

#### New Contributors

-   [@&#8203;ZauberNerd](https://github.com/ZauberNerd) made their first contribution in go-git/go-git#485
-   [@&#8203;jotadrilo](https://github.com/jotadrilo) made their first contribution in go-git/go-git#715
-   [@&#8203;fcharlie](https://github.com/fcharlie) made their first contribution in go-git/go-git#743
-   [@&#8203;AriehSchneier](https://github.com/AriehSchneier) made their first contribution in go-git/go-git#755
-   [@&#8203;cbbm142](https://github.com/cbbm142) made their first contribution in go-git/go-git#719
-   [@&#8203;aryan9600](https://github.com/aryan9600) made their first contribution in go-git/go-git#744
-   [@&#8203;matejrisek](https://github.com/matejrisek) made their first contribution in go-git/go-git#754
-   [@&#8203;andrewpollock](https://github.com/andrewpollock) made their first contribution in go-git/go-git#753
-   [@&#8203;techknowlogick](https://github.com/techknowlogick) made their first contribution in go-git/go-git#764

**Full Changelog**: go-git/go-git@v5.6.1...v5.7.0

### [`v5.6.1`](https://github.com/go-git/go-git/releases/tag/v5.6.1)

[Compare Source](go-git/go-git@v5.6.0...v5.6.1)

#### What's Changed

-   plumbing/transport: don't use the `firstErrLine` when it is empty by [@&#8203;ThinkChaos](https://github.com/ThinkChaos) in go-git/go-git#682
-   plumbing/transport: ssh, unable to pass a custom HostKeyCallback func by [@&#8203;aymanbagabas](https://github.com/aymanbagabas) in go-git/go-git#655
-   storage/filesystem: dotgit: fix a filesystem race in Refs/walkReferencesTree by [@&#8203;MichaelMure](https://github.com/MichaelMure) in go-git/go-git#659
-   \*: bump golang.org/x/net from 0.2.0 to 0.7.0 by [@&#8203;dependabot](https://github.com/dependabot) in go-git/go-git#684
-   \*: bump dependencies by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#697
-   \*: fix panic for empty revisions by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#696
-   ci: bump GitHub actions, enable go test race detection and stop using developer's GPG keys during test execution by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#701

**Full Changelog**: go-git/go-git@v5.6.0...v5.6.1

### [`v5.6.0`](https://github.com/go-git/go-git/releases/tag/v5.6.0)

[Compare Source](go-git/go-git@v5.5.2...v5.6.0)

#### What's Changed

-   Worktree, check for empty parent dirs during Reset (Fixes [#&#8203;670](go-git/go-git#670)) by [@&#8203;mbohy](https://github.com/mbohy) in go-git/go-git#671
-   \*: remove need to build with CGO by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#688
-   plumbing: support SSH/X509 signed tags by [@&#8203;hiddeco](https://github.com/hiddeco) in go-git/go-git#690

**Full Changelog**: go-git/go-git@v5.5.2...v5.6.0

### [`v5.5.2`](https://github.com/go-git/go-git/releases/tag/v5.5.2)

[Compare Source](go-git/go-git@v5.5.1...v5.5.2)

#### What's Changed

-   \*: update go-billy v5.4.0, removes data races. Fixes [#&#8203;629](go-git/go-git#629) by [@&#8203;mcuadros](https://github.com/mcuadros) in go-git/go-git#653
-   Worktree: Add, fix add removed files. Fixes [#&#8203;223](go-git/go-git#223) by [@&#8203;tfujiwar](https://github.com/tfujiwar) in go-git/go-git#652

**Full Changelog**: go-git/go-git@v5.5.1...v5.5.2

### [`v5.5.1`](https://github.com/go-git/go-git/releases/tag/v5.5.1)

[Compare Source](go-git/go-git@v5.5.0...v5.5.1)

#### What's Changed

-   \*: fix error when building with `CGO_ENABLED=0` by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#625
-   plumbing: transport/ssh: fix panic on Windows 10 with paegent as ssh-agent by [@&#8203;doxsch](https://github.com/doxsch) in go-git/go-git#617
-   CommitOptions: AllowEmptyCommits, return an error instead of creating empty commits by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#623

**Full Changelog**: go-git/go-git@v5.5.0...v5.5.1

### [`v5.5.0`](https://github.com/go-git/go-git/releases/tag/v5.5.0)

[Compare Source](go-git/go-git@v5.4.2...v5.5.0)

#### What's Changed

-   \*: add collision resistent SHA1 implementation by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#618
-   \*: replace go-homedir with os.UserHomeDir by [@&#8203;mvdan](https://github.com/mvdan) in go-git/go-git#535
-   Remote: add RemoteURL to {Fetch,Pull,Push}Options by [@&#8203;noerw](https://github.com/noerw) in go-git/go-git#375
-   Remote: Push, add support to push commits per hashes by [@&#8203;tjamet](https://github.com/tjamet) in go-git/go-git#325
-   Remote: Push, add ForceWithLease Push Option by [@&#8203;john-cai](https://github.com/john-cai) in go-git/go-git#404
-   Remote: PushOptions add push-options by [@&#8203;S-Bohn](https://github.com/S-Bohn) in go-git/go-git#399
-   Remote: Push, add atomic to push options by [@&#8203;john-cai](https://github.com/john-cai) in go-git/go-git#406
-   Remote: add FollowTags option for pushes by [@&#8203;john-cai](https://github.com/john-cai) in go-git/go-git#385
-   Worktree: use syscall.Timespec.Unix by [@&#8203;tklauser](https://github.com/tklauser) in go-git/go-git#437
-   Worktree: Checkout, simplified sparse checkout by [@&#8203;john-cai](https://github.com/john-cai) in go-git/go-git#410
-   Repository: don't crash accessing invalid pathinfo by [@&#8203;muesli](https://github.com/muesli) in go-git/go-git#443
-   storage: filesystem, switch from os.SEEK_\* to io.Seek\* by [@&#8203;abhinav](https://github.com/abhinav) in go-git/go-git#421
-   config: add branch description support by [@&#8203;ninedraft](https://github.com/ninedraft) in go-git/go-git#409
-   revision: fix endless looping in revision parser by [@&#8203;michenriksen](https://github.com/michenriksen) in go-git/go-git#475
-   pumbling: optimise zlib reader and consolidate sync.Pools by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#608
-   pumbling: parse optimisations by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#602
-   plumbing: object, rename calculation uses too much memory by [@&#8203;jfontan](https://github.com/jfontan) in go-git/go-git#503
-   plumbing: protocol/pakp and server, include the contents of `GO_GIT_USER_AGENT_EXTRA`. Fixes [#&#8203;529](go-git/go-git#529) by [@&#8203;stewing](https://github.com/stewing) in go-git/go-git#531
-   plumbing: protocol/pakp, avoid duplicate encoding when overriding a Capability value. by [@&#8203;tylerchr](https://github.com/tylerchr) in go-git/go-git#521
-   plumbing: protocol/pakp, update agent by [@&#8203;caarlos0](https://github.com/caarlos0) in go-git/go-git#453
-   plumbing: protocol/pakp: Actions should have type Action by [@&#8203;abhinav](https://github.com/abhinav) in go-git/go-git#420
-   plumbing: protocol/pakp: allow unsupported `multi_ack` capability by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#613
-   plumbing: transport/ssh, auto-populate HostKeyAlgorithms. Fixes [#&#8203;411](go-git/go-git#411) by [@&#8203;evanelias](https://github.com/evanelias) in go-git/go-git#548
-   pumbling: format/packfile, resolve external reference delta by [@&#8203;ga-paul-t](https://github.com/ga-paul-t) in go-git/go-git#392
-   plumbing: format/packfile, prevent large objects from being read into memory completely by [@&#8203;zeripath](https://github.com/zeripath) in go-git/go-git#330
-   plumbing: format/index, support v3 index by [@&#8203;john-cai](https://github.com/john-cai) in go-git/go-git#407
-   plumbing: format/gitignore, Read .git/info/exclude file too. by [@&#8203;enisdenjo](https://github.com/enisdenjo) in go-git/go-git#402
-   plumbing: format/gitattributes, Avoid index out of range  by [@&#8203;To1ne](https://github.com/To1ne) in go-git/go-git#598
-   plumbing: format/config, Branch name with hash can be cloned. Fixes [#&#8203;309](go-git/go-git#309) by [@&#8203;dowy](https://github.com/dowy) in go-git/go-git#354
-   go.mod: update github.com/xanzy/ssh-agent to v0.3.1 by [@&#8203;tklauser](https://github.com/tklauser) in go-git/go-git#403
-   go.mod: update dependencies to remove supply chain CVEs by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#620
-   examples: added "tag find if head is tagged" by [@&#8203;snebel29](https://github.com/snebel29) in go-git/go-git#374
-   examples: remote fix typo by [@&#8203;nep-0](https://github.com/nep-0) in go-git/go-git#408

**Full Changelog**: go-git/go-git@v5.4.2...v5.5.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi43OS4xIiwidXBkYXRlZEluVmVyIjoiMzYuNzkuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Reviewed-on: https://gitea.com/gitea/tea/pulls/578
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
epmd-edp pushed a commit to epam/edp-codebase-operator that referenced this pull request Mar 1, 2024
After updating go-git v5.4.3 -> v5.11.0, an empty commit returns an error.
It is due to change go-git/go-git#623
Added property to commit to allowing empty commit.

Change-Id: I8bd83e42e282dff78976276039159f1f1e647ad5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants