File 0021-fix-slash-in-index-for-git_index_add.patch of Package libgit2.34826

--- a/src/index.c.smb	2024-07-17 15:29:03.628819028 -0400
+++ b/src/index.c	2024-07-17 15:31:52.884990276 -0400
@@ -1114,10 +1114,13 @@
 		size_t len, pos;
 
 		for (;;) {
-			if (*--slash == '/')
-				break;
+			slash--;
+
 			if (slash <= entry->path)
 				return retval;
+
+			if (*slash == '/')
+				break;
 		}
 		len = slash - name;
 
openSUSE Build Service is sponsored by