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 }}
This repository was archived by the owner on Dec 2, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 2, 2026. It is now read-only.
it looks like Repository.createCommitOnHead ignores the first argument filesToAdd. it is not using it at all, and instead adds all the files!
and that is why this function to create empty commits doesn't work as expected when there are (unstaged) files with changes:
functioncreateEmptyCommit(repo,message,sig){varfiles=[];// <--sig=sig||createSignature();varauthor=sig;varcommitter=sig;returnunstageAll(repo)// make sure commit is in fact empty. (does a mixed reset).then(function(){returnrepo.createCommitOnHead(files,author,committer,message);}).catch(function(err){handleError(err);});}
Activity
freder commentedon Jul 31, 2015
using this for now
tbranyen commentedon Jul 31, 2015
Can you PR that?
rcjsuen commentedon Jan 6, 2017
Can this be closed? #656 was closed but the corresponding #670 has been merged into
master.