Open epage opened 5 months ago
I can look into this, it sounds like something that could be useful.
Just for my understanding: do you mean that diff.rs should diff a released version of a crate with the commit in git?
One idea I had was to be able to diff a released version of a crate vs a specific branch. As in: compare v0.3.1
vs master
. But that sounds like a slightly different use-case to the one that you are describing.
Just for my understanding: do you mean that diff.rs should diff a released version of a crate with the commit in git?
Yes, particularly the commit used when publishing. On publish, cargo records
So long as the user set their repo in the metadata, we can diff against that commit. Diffing against tags and branches could also be nice; I just don't have as concrete of use cases for doing so.
So, one way to get this done is:
git
https://github.com/$user/$repo/archive/aef66c462abe817e33aad91d97aa782a1e2ad2c7.tar.gz
)Yes and for
when doing the diff, have to account for the fact that the crate might live in a subfolder in the repo (in case of a cargo workspace)
the vcs info contains that path
The information is usually present.
For context for the use case, see https://rust-lang.zulipchat.com/#narrow/stream/318791-t-crates-io/topic/Link.20to.20where.20the.20sources.20of.20a.20crate.20are.20located.20in.20git/near/429819690