Created
December 6, 2014 03:49
-
-
Save icecrime/8f6b4151d22f9ba932df to your computer and use it in GitHub Desktop.
libpack fix for networking extensions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/vendor/src/github.com/docker/libpack/tree.go b/vendor/src/github.com/docker/libpack/tree.go | |
index 89d8a18..3b236c1 100644 | |
--- a/vendor/src/github.com/docker/libpack/tree.go | |
+++ b/vendor/src/github.com/docker/libpack/tree.go | |
@@ -16,6 +16,7 @@ func treeDel(repo *git.Repository, tree *git.Tree, key string) (*git.Tree, error | |
key = TreePath(key) | |
base, leaf := path.Split(key) | |
+ root := tree | |
if tree != nil { | |
if tree, err = TreeScope(repo, tree, base); err != nil { | |
return nil, err | |
@@ -36,12 +37,10 @@ func treeDel(repo *git.Repository, tree *git.Tree, key string) (*git.Tree, error | |
return nil, err | |
} | |
- newTree, err := lookupTree(repo, treeId) | |
- if err != nil { | |
- return nil, err | |
+ if base == "" { | |
+ return lookupTree(repo, treeId) | |
} | |
- | |
- return newTree, err | |
+ return treeAdd(repo, root, key, treeId, false) | |
} | |
// treeAdd creates a new Git tree by adding a new object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment