-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correctly identify empty repository when commiting
The `is_empty` function exposed by libgit2 requires the default branch to be "master". If a repository is created with a default branch not named master `is_empty` will return false even when the repository is empty. The fix is simply to try and access the HEAD of the repository. If the head cant be accessed it means that the repository is still empty. Closes #145
- Loading branch information
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters