8000 CommitOptions.AllowEmptyCommits does nothing · Issue #1058 · go-git/go-git · GitHub
[go: up one dir, main page]

Skip to content
CommitOptions.AllowEmptyCommits does nothing #1058
@akamensky

Description

@akamensky

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0