[Bug]: editing last line results in commit message inaccurate about the change

Author: kaovilaiCreated Nov 6, 2024Updated Aug 20, 2026
Labelsbug

Opencommit Version

3.2.2

Node Version

N/A

NPM Version

N/A

What OS are you seeing the problem on?

Mac

What happened?

See commit message and diff https://github.com/kaovilai/dotfiles/commit/223f940bb0d04c0dfad3f06ddd3ab274a1848ecc

Expected Behavior

Diff is about

alias restart-displaylink='osascript -e "quit app \"DisplayLink Manager\""; while pgrep DisplayLinkUserAgent > /dev/null; do sleep 0.1; done; open -a DisplayLink\ Manager'

Current Behavior

Diff is about

alias velero-makecontainer-velero-restore-helper-cluster-arch='make container IMAGE=$(ghcr_notag) VERSION=velero-restore-helper-$(current-branch)-$(rev-sha-short)-$(cluster-arch-only) && docker push $(ghcr_notag):velero-restore-helper-$(current-branch)-$(rev-sha-short)-$(cluster-arch-only) && echo $(ghcr_notag):velero-restore-helper-$(current-branch)-$(rev-sha-short)-$(cluster-arch-only)'

Possible Solution

maybe if last line change is detected have the model (or another pre-processing) ignore second last line.

Steps to Reproduce

No response

Relevant log output

No response