-
Notifications
You must be signed in to change notification settings - Fork 0
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
Migrate source code archive metadata from Python-only to C API #48
Comments
The archival would basically be the same as the hashing here: tirex-tracker/c/src/measure/stats/gitstats.cpp Lines 121 to 141 in abfc54c
but an archive is created instead of a hash. As such, the tree walk may not even be necessary. It would probably work as well but would look less pretty since git_tree_walk takes the payload as the last element.Though it may be possible to use std::bind with placeholders and to pass this and point to a reference of the operator() similar to whattirex-tracker/c/src/measure/stats/gitstats.cpp Lines 80 to 84 in abfc54c
is used for for the tags. This should also be C++17 compatible though there it is not constexpr below C++20. But I would say that this would be a refactoring for the tag code and we should avoid the tree walk unless we notice that the status list is too inefficient. Regarding the number of dependencies: we additionally need a library for creating zip archives and for compression. This would otherwise be simple to write ourselves but I would advise against it. How should the native API be modified to instruct it to create the archive and how would the archive be passed back to the caller? |
As the matter appeared again in #65, I would like to get to discussion again:
The latter can then be used to determine relative paths inside the Git repository, such as the tirex-tracker/python/tirex_tracker/__init__.py Lines 348 to 372 in 5613bd9
Ideally, each definition should describe exactly what the expected output would be, for example:
|
I began work on this here: #67. And also the obligatory comment that |
In the discussion of #46, we had the idea to migrate the feature of a "code archive" (i.e., a ZIP of the Git repo, if in a Git context) from the Python API to the generic C API.
I believe this should be possible without new dependencies, as we already link libgit2.
A potential workflow could look like:
The text was updated successfully, but these errors were encountered: