Commit 5b195d64 authored by Rico Tzschichholz's avatar Rico Tzschichholz

commit: Fix invalid assignment from owned expression to unowned variable

commit is an unowned parameter of stage_submodule() and be used to keep
an owned reference returned by repo.lookup().

https://bugzilla.gnome.org/show_bug.cgi?id=780314
parent a19e2186
......@@ -251,11 +251,12 @@ namespace GitgCommit
return false;
}
if (commit == null)
Ggit.Commit sub_commit = commit;
if (sub_commit == null)
{
try
{
commit = repo.lookup<Gitg.Commit>(sub.submodule.get_workdir_id());
sub_commit = repo.lookup<Gitg.Commit>(sub.submodule.get_workdir_id());
}
catch (Error e)
{
......@@ -268,7 +269,7 @@ namespace GitgCommit
try
{
yield stage.stage_commit(sub.path, commit);
yield stage.stage_commit(sub.path, sub_commit);
}
catch (Error e)
{
......
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