Merge pull request #165 from mattn/fix/git-pull-nil-state

git: fix nil dereference in pull when the repository has no published state
This commit is contained in:
mattn
2026-07-15 04:52:55 +00:00
committed by GitHub

2
git.go
View File

@@ -853,7 +853,7 @@ aside from those, there is also:
}
// get the commit from state for the remote branch
if state.Event.ID == nostr.ZeroID {
if state == nil || state.Event.ID == nostr.ZeroID {
return fmt.Errorf("no repository state found")
}