mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.