x/tools/go/vcs: package could provide an id of current working index #10159
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Something like:
The
GetId()
function prototype could befunc (v *Cmd) GetId() (string, error)
and getting an id means:git
-git rev-parse HEAD
hg
-hg id -i
bzr
-bzr revno
svn
-svnversion
The subversion here is an odd man out, which might be troublesome as the code in
vcs
package assumes that a command stored inCmd
member can provide all info.My use case is creating container images from given project, so the created image could have a vcs info in its (JSON) metadata, for example
git: 66199afb25487fd75bf870c72bc3cea33d95f89e
The text was updated successfully, but these errors were encountered: