-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
New issue
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
Implement VCSDownloadStrategy#last_commit
#460
Implement VCSDownloadStrategy#last_commit
#460
Conversation
Implement: * VCSDownloadStrategy#last_commit Use last modified file timestamp * SubversionDownloadStrategy#last_commit Use `svn info --show-item revision` * GitDownloadStrategy#last_commit Use `git rev-parse HEAD` * MercurialDownloadStrategy#last_commit Use `hg parent --template {node}` * BazaarDownloadStrategy#last_commit Use `bazaar revno` * FossilDownloadStrategy#last_commit Use `fossil info tip`
VCSDownloadStrategy#last_commit
👍 |
👍 |
Thanks everyone. |
FYI, I just fixed a minor problem with this in 32f7e73. It felt innocent enough that I committed it directly. Noticed this because I have a non-standard
|
@UniqMartin I have read git documentation and now understand that I was wrong. Thanks for the fix! So I would probably fix it this way if I wouldn't realise git works pretty different from my expectations: assert "c50c79b9573c9482b9178a1882695fbbcd36fe7d".start_with?(@strategy.last_commit) Thanks again! |
No worries! I also overlooked this detail when reviewing this PR. Your snippet, that would have changed the related test instead of the implementation, is also a perfectly valid fix for the test failure. The reason I decided to make the change in the implementation is because I was of the opinion that these shortened commit hashes will eventually be used for the improved |
Everything is right. I'm OK with your fix, it makes sense for me. |
Closes Homebrew#460. Signed-off-by: Xu Cheng <[email protected]>
Signed-off-by: Bob W. Hogg <[email protected]>
brew tests
with your changes locally?Description
VCSDownloadStrategy#last_commit
GitDownloadStrategyTests
This PR is a part of #274, so merged commits will be removed from #274.
cc @MikeMcQuaid @xu-cheng