Skip to content

createBranch API params #1549

Description

@vritant24

The API in the documentation for Repository.createBranch is written as : repository.createBranch(name, commit, force)

But in the example over here: https://github.com/nodegit/nodegit/blob/master/examples/create-branch.js, it is used as:

return repo.createBranch(
  "new-branch",
  commit,
  0,
  repo.defaultSignature(),
  "Created new-branch on HEAD");

What are the 4th and 5th parameters given to the function? Am I missing something / looking at the wrong documentation or example?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions