Skip to content

Fix non-existent / dangling refs cause Repository.prototype.createCommitWithSignature to fail#1624

Merged
implausible merged 5 commits into
nodegit:masterfrom
emmax86:feature/sign-init-commit-on-bare-repo
Feb 8, 2019
Merged

Fix non-existent / dangling refs cause Repository.prototype.createCommitWithSignature to fail#1624
implausible merged 5 commits into
nodegit:masterfrom
emmax86:feature/sign-init-commit-on-bare-repo

Conversation

@emmax86

@emmax86 emmax86 commented Feb 7, 2019

Copy link
Copy Markdown
Collaborator

Repository.prototype.createCommit is able to handle updates to refs which do not exist because of the internal implementation of git_commit_create in libgit2. This PR exposes a reimplementation of this functionality so that Repository.prototype.createCommitWithSignature exhibits the same functionality.

@implausible implausible left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Can you adjust the documentation in these 2 spots, please?

Comment thread lib/repository.js
}

return result;
return NodeGit.Signature.default(this)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the JSDoc above this to be @async

Comment thread lib/reference.js
.catch(() => NodeGit.Signature.now("unknown", "unknown"));
};

Reference.updateTerminal = function (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you JSDoc this?

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

Successfully merging this pull request may close these issues.

2 participants