aboutsummaryrefslogtreecommitdiffstats
path: root/utils/merkletrie/iter.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-07-13 17:28:00 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2017-07-13 17:28:00 +0200
commitaa74b3ab06c260c2160dcb6110edad888ae1cc25 (patch)
tree795d180fb9ad3f9822c2a68f9d9f4b171c1de061 /utils/merkletrie/iter.go
parent6b3a6df29920d39b8308924b3b84178226b56224 (diff)
downloadgo-git-aa74b3ab06c260c2160dcb6110edad888ae1cc25.tar.gz
remote: fix Worktree.Status on empty repository
Diffstat (limited to 'utils/merkletrie/iter.go')
-rw-r--r--utils/merkletrie/iter.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/merkletrie/iter.go b/utils/merkletrie/iter.go
index c84f6fc..e3f3055 100644
--- a/utils/merkletrie/iter.go
+++ b/utils/merkletrie/iter.go
@@ -83,6 +83,10 @@ func newIter(root noder.Noder, base noder.Path) (*Iter, error) {
base: base,
}
+ if root == nil {
+ return ret, nil
+ }
+
frame, err := frame.New(root)
if err != nil {
return nil, err