![]() ![]() & echo "tree found in commit $chash"įor instance (untested and you'll need to fill in a few variables). Once you have that, you can search for commits that have that as their tree in their commit object, using git rev-parse: git rev-list $start_points | I did not know git-ls-tree, which has the advantage of listing only the files stored in the repository, skipping the. A web application using you can easily find out the current weather conditions and get a detailed forecast for any location worldwide.Weather Buddy is powered by JavaScript to fetch weather data from a weather API and dynamically update the UI. Read through the source to learn the conditions under which it can work. I was hoping that there was an option to get a combined output in a single run of git log, but your answer is better than the one I had in mind using find. But git archive potentially omits, adds, or does substitutions in file contents.įinding the actual tree hash for some set of files is nontrivial, although I have a program that can do it here. In some sense this doesn't matter: if you can obtain a Git tree hash for a source tree, and can find all the commits that have that tree hash, then all of those commits are the commits that would produce that archive. In general, there is no unique mapping from an extracted source tree back to a particular commit. What if you don't have the original archive, or it has no ID? If it's already compressed, decompress it with zcat or gunzip or whatever is appropriate on your system: gunzip < | git get-tar-commit-idįor example. If it's uncompressed: git get-tar-commit-id < archive You will need the original tar or zip file to test for this. ![]() In ZIP files it is stored as a file comment. Additionally the commit ID is stored in a global extended pax header if the tar format is used it can be extracted using git get-tar-commit-id. I believe GitHub stick the raw hash ID into an extended header, as they use git archive to do it: If it has been downloaded as a zip or tar archive, it's not a commit and the hash ID may well be gone. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |