FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Should Repository#createCommitOnHead create a new head if tree is empty? · Issue #852 · nodegit/nodegit · GitHub

Repository navigation

Should Repository#createCommitOnHead create a new head if tree is empty? #852

Description

Using this function on a repository with no commits currently yields with "Error: Oid id is required." The function is quite helpful but i have to write the long way if the there is no HEAD. Which makes the shorter version irrelevant once i took the effort to write the longer one. So should the option be included to also support the initial commit if none is available?

Activity

  1. johnhaley81 commented on Jan 5, 2016

    Collaborator

    So you're making an initial commit in the repo? I feel like that function should be able to handle it. I'd check to see what parent is set to here. That should be null. If it's passing something other than that then that might be killing the call to Repository#createCommit.

    FWIW I've used Repository#createCommit to make an initial commit before so I know that works.

  2. aldialimucaj commented on Jan 6, 2016

    Author

    Thanks john for the quick reply.

  3. added 2 commits that reference this issue on Feb 29, 2016
    a717468
    1973dfb
  4. added a commit that references this issue on Feb 29, 2016
    77287fe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL