File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,13 @@ GIT_EXTERN(int) git_submodule_lookup(
223223 git_repository * repo ,
224224 const char * name );
225225
226+ /**
227+ * Dup (retain) a submodule
228+ *
229+ * @param submodule Submodule object
230+ */
231+ GIT_EXTERN (git_submodule * ) git_submodule_dup (git_submodule * submodule );
232+
226233/**
227234 * Release a submodule
228235 *
Original file line number Diff line number Diff line change @@ -1854,6 +1854,14 @@ static void submodule_release(git_submodule *sm)
18541854 git__free (sm );
18551855}
18561856
1857+ git_submodule * git_submodule_dup (git_submodule * sm )
1858+ {
1859+ if (!sm )
1860+ return ;
1861+ GIT_REFCOUNT_INC (sm );
1862+ return sm ;
1863+ }
1864+
18571865void git_submodule_free (git_submodule * sm )
18581866{
18591867 if (!sm )
You can’t perform that action at this time.
0 commit comments