# Package versions: see commit hash of dependencies

**URL:** <https://discourse.julialang.org/t/package-versions-see-commit-hash-of-dependencies/100084>\
**Category:** General Usage\
**Created:** [June 9, 2023, 7:01am UTC](https://discourse.julialang.org/t/package-versions-see-commit-hash-of-dependencies/100084 "2023-06-09T07:01:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ignace](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ignace/32/24275_2.png) [@ignace](https://discourse.julialang.org/u/ignace)\
**Post date:** [June 9, 2023, 7:01am UTC](https://discourse.julialang.org/t/package-versions-see-commit-hash-of-dependencies/100084/1 "2023-06-09T07:01:39Z")

</div>

Hello,  
How can this be done:  
to see the commit hash of a dependency?  
Thanks!

---

<div class="post-metadata">

**Author:** ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Post date:** [June 9, 2023, 7:19am UTC](https://discourse.julialang.org/t/package-versions-see-commit-hash-of-dependencies/100084/2 "2023-06-09T07:19:05Z")

</div>

I am not 100% sure this is possible in general.

Pkg doesn’t use git commit hashes.  
It uses tree-hashes of the content.

You can access what info is basically in the Manifest.tom via `Pkg.dependencies`, but if something wasn’t installed through a git then a lot will be blank

```julia
julia> pkg_id = Base.identify_package("Diffractor")
Diffractor [9f5e2b26-1114-432f-b630-d3fe2085c51c]

julia> info = Pkg.dependencies()[pkg_id.uuid]
Pkg.API.PackageInfo("Diffractor", v"0.1.1", "9ef1038c9d567f56e9b6b60116e91adf4539185a", true, false, false, true, false, "main", "https://github.com/JuliaDiff/Diffractor.jl.git", "/home/oxinabox/.julia/packages/Diffractor/vMR8e", Dict{String, Base.UUID}("Combinatorics" => UUID("861a8166-3701-5b0c-9a16-15d98fcdc6aa"), "OffsetArrays" => UUID("6fe1bfb0-de20-5000-8ca7-80f57d26f881"), "StaticArrays" => UUID("90137ffa-7385-5640-81b9-e52037218182"), "StatsBase" => UUID("2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"), "InteractiveUtils" => UUID("b77e0a4c-d291-57a0-90e8-8db25a27a240"), "StructArrays" => UUID("09ab397b-f2b6-538f-b94a-2f83cf4a842a"), "ChainRulesCore" => UUID("d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"), "Cthulhu" => UUID("f68482b8-f384-11e8-15f7-abe071a5a75f"), "ChainRules" => UUID("082447d4-558c-5d27-93f4-14fc19e9eca2")))

julia> info.git_source
"https://github.com/JuliaDiff/Diffractor.jl.git"

julia> info.git_revision
"main"

julia> info.tree_hash
"9ef1038c9d567f56e9b6b60116e91adf4539185a"

```

`tree_hash` will always be filled in (and so will several others)
