Commit 4a0c506
committed
ceph-source-dist: derive canonical BRANCH from SHA1
When SHA1 is provided, the checkout prefers it over BRANCH, but
dist/branch echoed the BRANCH parameter verbatim. If the two
disagreed, downstream consumers of dist/branch (ceph-dev-pipeline and,
through it, chacra/shaman) would record the build under the wrong ref.
Ask the remote which branch tips the built commit and reset BRANCH
accordingly. The given BRANCH is kept when it already tips the commit
(including when several branches share the tip) and, with a warning,
when the commit is not the tip of any branch, since older commits are
contained by many branches and there is no unambiguous answer.
Fixes: https://tracker.ceph.com/issues/73658
Signed-off-by: David Galloway <david.galloway@ibm.com>1 parent b2d1263 commit 4a0c506
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
110 | 130 | | |
111 | 131 | | |
112 | 132 | | |
| |||
0 commit comments