-
Notifications
You must be signed in to change notification settings - Fork 182
Error Occured / Clone failed / Inflater has been closed #714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
same here |
same error for a large git repository |
This issue was resolved by me using sparse checkout; the operation works normally after restricting the checkout to files larger than 50MB. In fact, it was during debugging that an error occurred when checking out a file of 73.3MB. That's why I limited the checkout to files over 50MB. |
However, a new problem has arisen: jgit does not support sparse checkout, so while the repository can be cloned normally, the filtered-out files are considered deleted by git because they do not exist in the working directory. I am currently unable to solve the problem of ignoring this filtered file that has been staged as deleted. |
I have genuinely and completely solved this problem; perhaps, during my multiple tests, the issue vanished and has not reappeared since. I tried cloning jgit and opening the project in Eclipse, then patching the InflaterCache.java file, and now it is working properly. This is mainly due to rtyley's solution approach. Thank you very much. I have applied it here: https://github.com/Zacharia2/Android-Compatible-JGit |
@Zacharia2 thanks for letting me know about your work. I'll try to make some time test with your patched version of jgit. |
@maks Hi, hello. My device is a OnePlus Ace3 Pro, running Android 15. I cloned jgit and imported the Maven project into Eclipse. Then, I removed the projects unrelated to jgit. After that, I right-clicked on the project and selected "Run as" > "Maven install" to wait for all dependencies to be installed. Next, I applied a patch to the inflatercache and ran "Maven install" again. After that, I could find the built jar package in a folder similar to the output build in jgit. This jar package can be imported into Android Studio (AS) to complete the patching work. |
Perhaps you could directly try the version I built myself: https://github.com/Zacharia2/MGit/releases |
@Zacharia2 thanks for the explanation. I see what you mean now, you used Eclipse to build the newer version of jgit that you patched and then used that for your fork of MGit. \ The main problem with this approach is that I have been trying to keep MGit compatible with older versions of Android and by using jgit version 6 that is no longer that case as it uses file system APIs that are not available on older versions of Android but will work fine for you on Android 15. I guess I need to consider if its worth maintaining compatibility with older versions of Android or to just draw a line and stop supporting them to be able to use a much newer version of jgit. |
Correct, that is the situation. You can use a divide-and-conquer approach, keeping the old version while continuing to support the new version. For any version of jgit, the inflatercache file needs to be patched. This is inevitable. To skip the step of patching jgit, you would need to submit a patch to jgit just once. |
It seems that every version of jgit on Android requires revision (unfortunately). How about this: directly adapt jgit6 or any chosen version to manually fit the target Android version. This would also solve the problem. Treat this version of jgit as a dedicated branch version for mgit. Although this adds some workload, it is feasible. |
@Zacharia2 unfortunately modifying jgit6 for older versions of Android is not an option I have time to pursue as last time I looked into it, it would be alot of work to modifying jgit to not use the newer filesystem APIs that are missing in older versions of Android, but I would be happy to make use of such a modified version of jgit6 if thats something you want to work on. |
Cloning a (private) git repo that has site of about 360M (including the .git directory).
The progress indicator shows that the download and some other processing works, but then I get an error popup showing the message:
Not sure if this still is what has been reported in #54
The text was updated successfully, but these errors were encountered: