mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-11-04 23:34:39 +00:00
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
This commit is contained in:
parent
a19e2186ac
commit
5b195d645f
1 changed files with 4 additions and 3 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue