-
Notifications
You must be signed in to change notification settings - Fork 812
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Hello,
First, thank you for this incredible package!
I get the following error when I try to remove the latest file in a repository and commit:
cannot create empty commit: clean working tree
I think the issue is due to the index entries being empty when the tree is built here:
Line 156 in 3f1cfde
if len(idx.Entries) == 0 && (opts == nil || !opts.AllowEmptyCommits) { |
Here is a screenshot of my debugging session:
You can see that the index entries are empty, but I have a change staged and ready to be committed.
Here is the code that you can use to reproduce my issue: https://gist.github.com/Erouan50/e2c8ec8d8ad21c7f3761b5f193ab6171#file-main-go
I'll create a pull request if you agree it is a bug.
Thank you!
yabberyabber, laforge-tech, clavinjune, Diaphteiros and GeorgeMac
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working