Skip to content

repo.workdir() crashes (SIGSEGV) on a bare repo #128

@tlbtlbtlb

Description

@tlbtlbtlb

It should probably return null instead.

$ node gitrepo/badtest_git.js
Created repo /tmp/dummyrepo
Segmentation fault: 11

var git                 = require('nodegit');

git.Repo.init('/tmp/dummyrepo', true, function(err, repo) {
  if (err) throw err;
  console.log('Created repo');
  var workdir = repo.workdir();
  console.log('Got workdir', workdir);
});

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