Commit bf1616d1 by Dmitry Lobanov

submodule: git submodule dup implementation has been reverted. Assert has been added.

parent 11aa20b0
......@@ -1856,7 +1856,13 @@ static void submodule_release(git_submodule *sm)
int git_submodule_dup(git_submodule **out, git_submodule *source)
{
return git_object_dup((git_object **)out, (git_object *)source);
GIT_ASSERT_ARG(out);
if (source != NULL)
GIT_REFCOUNT_INC(source);
*out = source;
return 0;
}
void git_submodule_free(git_submodule *sm)
......
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