summaryrefslogtreecommitdiff
path: root/libraries/libgit2-glib/detect-libgit2-version.patch
blob: 5e285c9cffc4925a9f31b93796c281d525078bf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
diff -Naur libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-clone-options.c libgit2-glib-0.28.0.1/libgit2-glib/ggit-clone-options.c
--- libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-clone-options.c	2019-04-24 04:18:53.000000000 +0000
+++ libgit2-glib-0.28.0.1/libgit2-glib/ggit-clone-options.c	2020-05-02 03:01:42.273450898 +0000
@@ -149,7 +149,7 @@
 
 	if (error != NULL)
 	{
-#if LIBGIT2_SOVERSION >= 28
+#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28)
 		git_error_set_str (GIT_ERROR, error->message);
 #else
 		giterr_set_str (GIT_ERROR, error->message);
@@ -191,7 +191,7 @@
 
 	if (error)
 	{
-#if LIBGIT2_SOVERSION >= 28
+#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28)
 		git_error_set_str (GIT_ERROR, error->message);
 #else
 		giterr_set_str (GIT_ERROR, error->message);
diff -Naur libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-config.c libgit2-glib-0.28.0.1/libgit2-glib/ggit-config.c
--- libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-config.c	2019-04-24 04:18:53.000000000 +0000
+++ libgit2-glib-0.28.0.1/libgit2-glib/ggit-config.c	2020-05-02 03:10:08.034437972 +0000
@@ -191,7 +191,7 @@
 	if (git_config_find_global (&buf) == GIT_OK)
 	{
 		path = g_file_new_for_path (buf.ptr);
-#if LIBGIT2_SOVERSION >= 28
+#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28)
 		git_buf_dispose (&buf);
 #else
 		git_buf_free (&buf);
@@ -224,7 +224,7 @@
 	if (git_config_find_system (&buf) == GIT_OK)
 	{
 		path = g_file_new_for_path (buf.ptr);
-#if LIBGIT2_SOVERSION >= 28
+#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28)
 		git_buf_dispose (&buf);
 #else
 		git_buf_free (&buf);
@@ -303,7 +303,7 @@
 	ret = git_config_add_file_ondisk (_ggit_native_get (config),
 	                                  path,
 	                                  (git_config_level_t)level,
-#if LIBGIT2_SOVERSION >= 27
+#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 27)
 	                                  NULL,
 #endif
 	                                  force);
diff -Naur libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-diff.c libgit2-glib-0.28.0.1/libgit2-glib/ggit-diff.c
--- libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-diff.c	2019-04-24 04:18:53.000000000 +0000
+++ libgit2-glib-0.28.0.1/libgit2-glib/ggit-diff.c	2020-05-02 03:04:17.745446924 +0000
@@ -786,7 +786,7 @@
 
 	if (ret != GIT_OK)
 	{
-#if LIBGIT2_SOVERSION >= 28
+#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28)
 		git_buf_dispose (&buf);
 #else
 		git_buf_free (&buf);
@@ -796,7 +796,7 @@
 	}
 
 	retval = g_strndup (buf.ptr, buf.size);
-#if LIBGIT2_SOVERSION >= 28
+#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28)
 	git_buf_dispose (&buf);
 #else
 	git_buf_free (&buf);
diff -Naur libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-error.c libgit2-glib-0.28.0.1/libgit2-glib/ggit-error.c
--- libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-error.c	2019-04-24 04:18:53.000000000 +0000
+++ libgit2-glib-0.28.0.1/libgit2-glib/ggit-error.c	2020-05-02 03:05:09.952445590 +0000
@@ -51,7 +51,7 @@
 	g_return_if_fail (err < 0);
 
 	/* TODO: add more kind of errors, see git_error_t */
-#if LIBGIT2_SOVERSION >= 28
+#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28)
 	git2_err = git_error_last ();
 #else
 	git2_err = giterr_last ();
diff -Naur libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-message.c libgit2-glib-0.28.0.1/libgit2-glib/ggit-message.c
--- libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-message.c	2019-04-24 04:18:53.000000000 +0000
+++ libgit2-glib-0.28.0.1/libgit2-glib/ggit-message.c	2020-05-02 03:05:44.877444697 +0000
@@ -46,7 +46,7 @@
 	git_message_prettify (&buf, message, strip_comments, comment_char);
 
 	d = g_strdup (buf.ptr);
-#if LIBGIT2_SOVERSION >= 28
+#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28)
 	git_buf_dispose (&buf);
 #else
 	git_buf_free (&buf);
diff -Naur libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-patch.c libgit2-glib-0.28.0.1/libgit2-glib/ggit-patch.c
--- libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-patch.c	2019-04-24 04:18:53.000000000 +0000
+++ libgit2-glib-0.28.0.1/libgit2-glib/ggit-patch.c	2020-05-02 03:06:32.489443481 +0000
@@ -194,7 +194,7 @@
 	if (ret == GIT_OK)
 	{
 		result = g_strdup (buf.ptr);
-#if LIBGIT2_SOVERSION >= 28
+#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28)
 		git_buf_dispose (&buf);
 #else
 		git_buf_free (&buf);
diff -Naur libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-remote-callbacks.c libgit2-glib-0.28.0.1/libgit2-glib/ggit-remote-callbacks.c
--- libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-remote-callbacks.c	2019-04-24 04:18:53.000000000 +0000
+++ libgit2-glib-0.28.0.1/libgit2-glib/ggit-remote-callbacks.c	2020-05-02 03:07:14.164442416 +0000
@@ -160,7 +160,7 @@
 		{
 			if (error)
 			{
-#if LIBGIT2_SOVERSION >= 28
+#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28)
 				git_error_set_str (GIT_ERROR, error->message);
 #else
 				giterr_set_str (GIT_ERROR, error->message);
diff -Naur libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-repository.c libgit2-glib-0.28.0.1/libgit2-glib/ggit-repository.c
--- libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-repository.c	2019-04-24 04:18:53.000000000 +0000
+++ libgit2-glib-0.28.0.1/libgit2-glib/ggit-repository.c	2020-05-02 03:08:08.018441039 +0000
@@ -1013,7 +1013,7 @@
 	if (ret == GIT_OK)
 	{
 		rep = g_file_new_for_path (buf.ptr);
-#if LIBGIT2_SOVERSION >= 28
+#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28)
 		git_buf_dispose (&buf);
 #else
 		git_buf_free (&buf);
@@ -3684,7 +3684,7 @@
 	}
 
 	ref = g_strdup (buf.ptr);
-#if LIBGIT2_SOVERSION >= 28
+#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28)
 	git_buf_dispose (&buf);
 #else
 	git_buf_free (&buf);