Skip to content

[update-checkout] Gracefully degrade timestamp matching. #81654

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

Merged

Conversation

nate-chandler
Copy link
Contributor

Previously, when invoking the script with match-timestamp, if the refspec was absent, the find_rev_by_timestamp function would throw an exception and the script would hang forever.

Here, it is first checked via git rev-parse --verify $REFSPEC that the refspec actually exists in the target repo. If it does not, the refspec is just omitted from the command, giving the latest commit before the currently checked out one.

Previously, when invoking the script with match-timestamp, if the
refspec was absent, the find_rev_by_timestamp function would throw an
exception and the script would hang forever.

Here, it is first checked via `git rev-parse --verify $REFSPEC` that the
refspec actually exists in the target repo.  If it does not, the refspec
is just omitted from the command, giving the latest commit before the
currently checked out one.
@nate-chandler nate-chandler marked this pull request as ready for review May 20, 2025 23:00
@nate-chandler
Copy link
Contributor Author

@swift-ci please smoke test

@nate-chandler nate-chandler enabled auto-merge May 20, 2025 23:07
@nate-chandler
Copy link
Contributor Author

@swift-ci please smoke test macos platform

@nate-chandler nate-chandler merged commit bbe9f65 into swiftlang:main May 21, 2025
3 checks passed
@nate-chandler nate-chandler deleted the update-checkout/20250520/1 branch May 21, 2025 18:04
hamishknight added a commit to hamishknight/swift that referenced this pull request May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants