mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-11-04 23:34:39 +00:00
Polish push action
- Avoid to connect to repo, that is managed by push operation - Add access to ssh socket for flatpak - Reload repo after push to reflect changes
This commit is contained in:
parent
33ff186841
commit
90e9ea9666
3 changed files with 6 additions and 10 deletions
|
@ -109,6 +109,7 @@ class RefActionPush : GitgExt.UIElement, GitgExt.Action, GitgExt.RefAction, Obje
|
|||
try
|
||||
{
|
||||
yield d_remote.push(branch, null);
|
||||
((Gtk.ApplicationWindow)application).activate_action("reload", null);
|
||||
}
|
||||
catch (Error e)
|
||||
{
|
||||
|
|
|
@ -311,14 +311,6 @@ public class Remote : Ggit.Remote
|
|||
|
||||
private async void push_intern(string branch, Ggit.RemoteCallbacks? callbacks) throws Error
|
||||
{
|
||||
bool dis = false;
|
||||
|
||||
if (!get_connected())
|
||||
{
|
||||
dis = true;
|
||||
yield connect(Ggit.Direction.PUSH, callbacks);
|
||||
}
|
||||
|
||||
state = RemoteState.TRANSFERRING;
|
||||
reset_transfer_progress(false);
|
||||
|
||||
|
@ -326,6 +318,10 @@ public class Remote : Ggit.Remote
|
|||
{
|
||||
yield Async.thread(() => {
|
||||
var options = new Ggit.PushOptions();
|
||||
if (d_callbacks == null) {
|
||||
d_callbacks = new Callbacks(this, callbacks, update_transfer_progress);
|
||||
}
|
||||
|
||||
options.set_remote_callbacks(d_callbacks);
|
||||
|
||||
string [] push_refs = { "refs/heads/%s:refs/heads/%s".printf(branch, branch) };
|
||||
|
@ -336,12 +332,10 @@ public class Remote : Ggit.Remote
|
|||
}
|
||||
catch (Error e)
|
||||
{
|
||||
update_state(dis);
|
||||
reset_transfer_progress(true);
|
||||
throw e;
|
||||
}
|
||||
|
||||
update_state(dis);
|
||||
reset_transfer_progress(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
"--share=network",
|
||||
"--socket=x11",
|
||||
"--socket=wayland",
|
||||
"--socket=ssh-auth",
|
||||
"--filesystem=host",
|
||||
"--filesystem=xdg-run/dconf",
|
||||
"--filesystem=~/.config/dconf:ro",
|
||||
|
|
Loading…
Reference in a new issue