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

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