A settle ask's group begins with a colon, which no branch name holds, so a branch named settle/... still merges on its Approve (review of issue 1280)
This commit is contained in:
+3
-2
@@ -90,8 +90,9 @@ func MergeAskKey(group string, heads []Head) (string, error) {
|
||||
|
||||
// SettleGroupPrefix begins the group of a settle ask (novox/hq ADR 0556 clause 5): a person's ask to settle deliveries held
|
||||
// because their merge reached the trunk without a passing check. It is kept in the gate's asks under MergeAskKey like a merge
|
||||
// ask, so the teller carries it unchanged; its options bind the act AskVerb names for it.
|
||||
const SettleGroupPrefix = "settle/"
|
||||
// ask, so the teller carries it unchanged; its options bind the act AskVerb names for it. Git forbids a colon in a branch
|
||||
// name, so no pull request's group (its branch) ever begins with it.
|
||||
const SettleGroupPrefix = "settle:"
|
||||
|
||||
// SettleGroup is the group of the settle ask of these delivery ids: the prefix and twelve hex digits of the sha256 over the
|
||||
// ids, sorted and joined by a newline, so the same deliveries asked again keep one key.
|
||||
|
||||
@@ -86,8 +86,11 @@ func TestAskID(t *testing.T) { // 1201/AC2
|
||||
if k, err := MergeAskKey(g, gateHeads()); err != nil || !asks.UsableID(AskID(k)) {
|
||||
t.Errorf("the settle ask's key %q: %v", k, err)
|
||||
}
|
||||
if AskVerb(g) != "mesh-delivery.settle" || AskVerb("feat/x") != "mesh-delivery.merge" {
|
||||
t.Errorf("AskVerb = %q, %q", AskVerb(g), AskVerb("feat/x"))
|
||||
for group, want := range map[string]string{g: "mesh-delivery.settle", "feat/x": "mesh-delivery.merge",
|
||||
"settle/foo": "mesh-delivery.merge", "settle": "mesh-delivery.merge"} { // a branch named settle/... is a merge's group
|
||||
if got := AskVerb(group); got != want {
|
||||
t.Errorf("AskVerb(%q) = %q, want %q", group, got, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user