-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add annotated tag support #109
Conversation
Signed-off-by: Alex Goodman <[email protected]>
…port Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
// the plumbing reference is to the tag. For a lightweight tag, the tag object points directly to the commit | ||
// with the code blob. For an annotated tag, the tag object has a commit for the tag itself, but resolves to | ||
// the commit with the code blob. It's important to use the timestamp from the tag object when available | ||
// for annotated tags and to use the commit timestamp for lightweight tags. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this comment! It's really helpful.
internal/git/test-fixtures/Makefile
Outdated
|
||
repos/remote-repo: | ||
repos/remote-repo: create-remote-repo.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makefile question: What's the point of depending on the file create-remote-repo.sh
if nothing is going to create it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case create-remote-repo.sh content changes, then the target will be run again (it's based on a mod timestamp comparison)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh fun! I won't do this though, seems to cause issues in CI where a cache is restored (thus the timestamps could be off)... there is a failure in CI showing this. I'll delete the cache and remove the dependency here.
The other oversight I had: the fixture scripts wont delete existing fixtures. I could update them to do this, but for the meantime I'll just remove the source dependency.
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
Adds support for using annotated tags (e.g.
git tag -a ...
). This means that timestamps used as the "end" of the scope of changes will use the time which the tag action was performed, not the timestamp of the underlying commit (code change). This is useful given the issues described in #96 (comment) .While making this change I tried to make apparent in the logging what values were being used for what operations since there were additional input parameters that could be used (e.g. timestamp from an annotated tag vs underlying commit). Surrounding logging changes were done to keep the output consistent and useful.
Closes #35
Fixes #96