#26977 made current git rev-list -1 HEAD ./depends not working.
This PR fixes this issue with an idea from #26977 (comment).
#26977 made current git rev-list -1 HEAD ./depends not working.
This PR fixes this issue with an idea from #26977 (comment).
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| ACK | MarcoFalke |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
lgtm ACK d66efa30cdd84a11348fd6a3a9f0b3f89a5345ff
Just checking if I get this right: git rev-parse HEAD:foo uses the contents of foo as fingerprint (instead of the revision in which it was touched last)?
Yeah, it is probably even more correct, as it doesn't commit to irrelevant stuff such as the commit message. So the fingerprint hash will be different, however, the important part is that the output should commit to the content of the depends system.
git log -1 ./depends, git rev-list -1 HEAD ./depends, git rev-parse HEAD:depends, and git ls-tree HEAD ./depends should all have this property.
Yeah, it is probably even more correct, as it doesn't commit to irrelevant stuff such as the commit message. So the fingerprint hash will be different, however, the important part is that the output should commit to the content of the depends system.
git log -1 ./depends,git rev-list -1 HEAD ./depends,git rev-parse HEAD:depends, andgit ls-tree HEAD ./dependsshould all have this property.
A shallow repo, which is used in the CI, lacks details. Therefore, only git rev-parse HEAD:depends and git ls-tree HEAD ./depends are suitable as they return the same output for both deep and shallow repos.