aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2020-12-29 11:24:44 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2020-12-29 11:25:31 +0000
commit4a1e1ce6241a8510080f3b4e10317234497e6dae (patch)
tree0912ac170c85898db0bf19710075686f9b7dbc31
parent03936658b31159393d18aee35b9a7f8879a87eb2 (diff)
downloadaports-4a1e1ce6241a8510080f3b4e10317234497e6dae.tar.gz
aports-4a1e1ce6241a8510080f3b4e10317234497e6dae.tar.bz2
aports-4a1e1ce6241a8510080f3b4e10317234497e6dae.tar.xz
community/gitg: backport test fix
upstream: https://gitlab.gnome.org/GNOME/gitg/-/merge_requests/159/
-rw-r--r--community/gitg/APKBUILD7
-rw-r--r--community/gitg/Allow-nullable-head-parameter-in-stash_if_needed.patch34
2 files changed, 39 insertions, 2 deletions
diff --git a/community/gitg/APKBUILD b/community/gitg/APKBUILD
index eced37144a..9524fe19a1 100644
--- a/community/gitg/APKBUILD
+++ b/community/gitg/APKBUILD
@@ -12,7 +12,9 @@ makedepends="meson libsoup-dev libgee-dev glib-dev gobject-introspection-dev val
gsettings-desktop-schemas-dev libpeas-dev libgit2-glib-dev gtk+3.0-dev libsecret-dev
libxml2-dev libdazzle-dev gtkspell3-dev gtksourceview-dev"
subpackages="$pkgname-doc $pkgname-lang"
-source="https://download.gnome.org/sources/gitg/${pkgver%.*}/gitg-$pkgver.tar.xz"
+source="https://download.gnome.org/sources/gitg/${pkgver%.*}/gitg-$pkgver.tar.xz
+ Allow-nullable-head-parameter-in-stash_if_needed.patch
+ "
build() {
abuild-meson . output
@@ -27,4 +29,5 @@ package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C output
}
-sha512sums="243e630b3e5bb1919dc307e6b3fed1b1b0e3884d2a2507e4526b4af61e86f1cd7004a3dbb96001ffb0280cefe7cdb9b109c39996718913c7410224830c0145a4 gitg-3.32.1.tar.xz"
+sha512sums="243e630b3e5bb1919dc307e6b3fed1b1b0e3884d2a2507e4526b4af61e86f1cd7004a3dbb96001ffb0280cefe7cdb9b109c39996718913c7410224830c0145a4 gitg-3.32.1.tar.xz
+99360bafd08c54470ed8f437ba9e49c2a08671e2ac0134c64ddc08c23e6217681b97c2d7408bfcdfacd6c1e8d02d60b2726bb313421ad8935fe1cbb5937aaba4 Allow-nullable-head-parameter-in-stash_if_needed.patch"
diff --git a/community/gitg/Allow-nullable-head-parameter-in-stash_if_needed.patch b/community/gitg/Allow-nullable-head-parameter-in-stash_if_needed.patch
new file mode 100644
index 0000000000..0ef36d851c
--- /dev/null
+++ b/community/gitg/Allow-nullable-head-parameter-in-stash_if_needed.patch
@@ -0,0 +1,34 @@
+From eddcb2a5cd9579e3b70b6aad56f1d5e89612f83a Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras <evangelos@foutrelis.com>
+Date: Fri, 20 Nov 2020 14:11:04 +0200
+Subject: [PATCH] Allow nullable head parameter in stash_if_needed()
+
+Newer versions of Vala perform parameter checks in async methods, so
+Gitg.ActionSupport.stash_if_needed's head param should be Gitg.Ref?.
+
+Related Vala issue: https://gitlab.gnome.org/GNOME/vala/-/issues/299
+
+Fixes the following assertion failure:
+
+ (tests/gitg/tests-gitg:2977): gitg-CRITICAL **: 07:44:32.083:
+ gitg_action_support_stash_if_needed: assertion 'head != NULL' failed
+---
+ gitg/gitg-action-support.vala | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gitg/gitg-action-support.vala b/gitg/gitg-action-support.vala
+index 6eb7ad8d..d864fffc 100644
+--- a/gitg/gitg-action-support.vala
++++ b/gitg/gitg-action-support.vala
+@@ -122,7 +122,7 @@ public class ActionSupport : Object
+ return head != null;
+ }
+
+- public async bool stash_if_needed(SimpleNotification notification, Gitg.Ref head)
++ public async bool stash_if_needed(SimpleNotification notification, Gitg.Ref? head)
+ {
+ // Offer to stash if there are any local changes
+ if ((yield working_directory_dirty()))
+--
+GitLab
+