Commit 77376b6
committed
[update-checkout] Gracefully degrade time match.
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.1 parent bb67d1e commit 77376b6
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
103 | 108 | | |
104 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
105 | 112 | | |
106 | 113 | | |
107 | 114 | | |
| |||
0 commit comments