atom/git-utils

.getHead and .getHeadAsync have different behaviors when called on new repo

leroix opened this issue · 1 comments

On a newly created repo without any commits, .getHead() returns null while .getHeadAsync() results in an exception Error: Git head failed. I think they should be consistent with each other, but I'm not sure what the ideal would be. I'm leaning towards returning/resolving null.

/cc @BinaryMuse @maxbrunsfeld

related atom/atom#15920

I'm leaning towards returning/resolving null.

👍