Skip to content

Commit dab4eac

Browse files
committed
When in a bare repo, there is no OID, so don't assume there is.
1 parent ed221ed commit dab4eac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/neogit/lib/git/branch.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ local function update_branch_information(state)
375375
state.head.oid = status.oid
376376
state.head.detached = status.detached
377377

378-
if status.oid ~= INITIAL_COMMIT then
378+
if status.oid and status.oid ~= INITIAL_COMMIT then
379379
state.head.abbrev = git.rev_parse.abbreviate_commit(status.oid)
380380
state.head.commit_message = git.log.message(status.oid)
381381

0 commit comments

Comments
 (0)