Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

repo.getHeadBlob() returns null #74

Open
stewartlord opened this issue Aug 16, 2016 · 1 comment
Open

repo.getHeadBlob() returns null #74

stewartlord opened this issue Aug 16, 2016 · 1 comment

Comments

@stewartlord
Copy link

stewartlord commented Aug 16, 2016

From the context of an Atom package:

var editor = atom.workspace.getActiveEditor();
var dir = new Directory(editor.getPath());
atom.project.repositoryForDirectory(dir).then(
  (repo) => {
    var path = editor.getPath();
    var repo = repo.getRepo();
    var blob = repo.getHeadBlob(path);
    console.log(blob);
  }
);

The above produces null, but other methods, such as getHead() work fine.

@stewartlord
Copy link
Author

Chatted with @kevinsawicki and this method works if you give it a path that is relative to the repository root!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant