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 does nothing #1058

Open
akamensky opened this issue Mar 18, 2024 · 2 comments
Open

CommitOptions.AllowEmptyCommits does nothing #1058

akamensky opened this issue Mar 18, 2024 · 2 comments

Comments

@akamensky
Copy link

My code sets

	&git.CommitOptions{
		AllowEmptyCommits: false,
		Author: &object.Signature{
			Name:  author,
			Email: email,
			When:  time.Now(),
		},
	}

That however still allows completely empty commits through even if nothing was written. I am cloning to in-memory storage and modify files only if the contents is different (so I read files, on the same note, why is the billy.Filesystem does not implement fs.FS?).

I still have to do state.IsClean() check, which will actually check if there are any changes.

@durvalcarvalho
Copy link

Yep! Same thing here.

@onee-only
Copy link
Contributor

I think this is the same problem as #723.

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

No branches or pull requests

3 participants