shithub: furgit

Download patch

ref: 6197b7aac0a5737d026ffa4e1cfc35ba5411b2a5
parent: 96cbced7067d881ebc96adf54b14c0e82f146f4a
author: Runxi Yu <me@runxiyu.org>
date: Fri Feb 20 23:15:01 EST 2026

objectstore/loose: We don't need this nil check either, I think

--- a/objectstore/loose/store.go
+++ b/objectstore/loose/store.go
@@ -2,7 +2,6 @@
 package loose
 
 import (
-	"errors"
 	"os"
 
 	"codeberg.org/lindenii/furgit/objectid"
@@ -21,9 +20,6 @@
 
 // New creates a loose-object store rooted at root for algo.
 func New(root *os.Root, algo objectid.Algorithm) (*Store, error) {
-	if root == nil {
-		return nil, errors.New("objectstore/loose: nil root")
-	}
 	if algo.Size() == 0 {
 		return nil, objectid.ErrInvalidAlgorithm
 	}
--