You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Ask] is this support Allow Empty Commit with Message? #189
--allow-empty is an option to prevent accidentally recording an empty commit when using the git command line. go-git is not for interactive use and it does not check this.
In other words, you can considered that --allow-empty is used in every (*git.Worktree).Commit(...).
You can create a test repository to verify this.
Something like:
Activity
kamontat commentedon Apr 18, 2021
Any update @go-git
weakish commentedon Oct 1, 2021
--allow-emptyis an option to prevent accidentally recording an empty commit when using thegitcommand line.go-gitis not for interactive use and it does not check this.In other words, you can considered that
--allow-emptyis used in every(*git.Worktree).Commit(...).You can create a test repository to verify this.
Something like:
The code sample above is untested, so it may contain errors.