HomePhorge

Validate all fields in differential.parsecommitmessage

Description

Validate all fields in differential.parsecommitmessage

Summary:

  • We currently run parseValueFromCommitMessage() on all fields present in

the message, but not validateField().

  • This detects value errors (e.g., an invalid reviewer) but not higher-level

errors (e.g., a missing field).

  • This can break the stacked-commits Git mutable history workflow by

recognizing too many commit messages as valid ("multiple valid commit messages,
this is ambiguous").

  • This also gives you some errors ("Missing test plan") too late in "arc diff

--create" (after the diff has been built).

Test Plan:

  • Grepped for validateField() calls, removed a couple of calls that had the

same implementation as the base class.

  • Grepped for other calls to this to make sure I'm not stumbling into

unintended side effects, but it only runs from the diff workflow.

  • Ran "arc diff --create" with an invalid test plan, got a good error early in

the process.

  • Ran "arc diff master" with stacked local commits, got a correct selection of

the intended message.

Reviewers: cpiro, btrahan, jungejason

Reviewed By: cpiro

CC: aran, cpiro

Differential Revision: https://secure.phabricator.com/D1373

Details

Provenance
epriestleyAuthored on Jan 11 2012, 7:55 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP02fb5fea89e6: Allow configuration of a minimum password length, unify password reset
Branches
Unknown
Tags
Unknown

Event Timeline