gc/repack: release packs when needed
[gitweb.git] / submodule.c
index 4a5212bdfb4ab9ce5aac4a4c4460fbc9c9ecff38..f27f14e86817607f7d11e376431d1b2864939aab 100644 (file)
@@ -1879,7 +1879,7 @@ const char *get_superproject_working_tree(void)
                 * We're only interested in the name after the tab.
                 */
                super_sub = strchr(sb.buf, '\t') + 1;
-               super_sub_len = sb.buf + sb.len - super_sub - 1;
+               super_sub_len = strlen(super_sub);
 
                if (super_sub_len > cwd_len ||
                    strcmp(&cwd[cwd_len - super_sub_len], super_sub))