We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm not entirely sure this belongs in gohack, but given the -vcs flag gohack makes answering it possible. So raising here for discussion at least.
gohack
-vcs
I'm trying to answer the following question:
Given commit $commit, are we currently using a version of module $m that that has $commit as an ancestor?
$commit
$m
The answer is in effect given by this sequence of commands:
GOHACK=$(mktemp -d) gohack get -vcs golang.org/x/tools pushd $(go list -m -f {{.Replace.Dir}} golang.org/x/tools) answer=$(git merge-base --is-ancestor $commit HEAD && echo "yes" || echo "no") popd gohack undo golang.org/x/tools
Does it make sense to provide a gohack command that answers this question?
cc @rogpeppe @mvdan
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm not entirely sure this belongs in
gohack
, but given the-vcs
flaggohack
makes answering it possible. So raising here for discussion at least.I'm trying to answer the following question:
The answer is in effect given by this sequence of commands:
Does it make sense to provide a
gohack
command that answers this question?cc @rogpeppe @mvdan
The text was updated successfully, but these errors were encountered: