Commit 6ee08d2c by Carlos Martín Nieto

tree: use the basename for the entry removal

When we want to remove the file, use the basename as the name of the
entry to remove, instead of the full one, which includes the directories
we've inserted into the stack.
parent 92249656
......@@ -1230,7 +1230,7 @@ int git_tree_create_updated(git_oid *out, git_repository *repo, git_tree *baseli
break;
}
case GIT_TREE_UPDATE_REMOVE:
error = git_treebuilder_remove(git_array_last(stack)->bld, update->path);
error = git_treebuilder_remove(git_array_last(stack)->bld, git_path_basename(update->path));
break;
default:
giterr_set(GITERR_TREE, "unkown action for update");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment