Page MenuHomePhabricator

arc diff causes exception if no reviewers are specified
Closed, ResolvedPublic


When running arc diff the editor appears and allows the user to enter commit text. If the user saves the commit message without specifying any reviewers and then selects 'No' at the continue anyway prompt, the following error appears to occur.

[2015-05-26 13:16:29] ERROR 2: str_repeat() expects parameter 2 to be long, string given at [<<<path>>>/libphutil/src/console/format.php:162]
arcanist(head=master, ref.master=64d03ff68bf2), phutil(head=master, ref.master=672c0f7d5da9)
  #0 str_repeat(string, string) called at [<phutil>/src/console/format.php:162]
  #1 phutil_console_wrap(string, string) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1731]
  #2 ArcanistDiffWorkflow::getCommitMessageFromUser() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1506]
  #3 ArcanistDiffWorkflow::buildCommitMessage() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:457]
  #4 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:382]

Expected behaviour:
arc should return

$ arc diff

You have not specified any reviewers. Continue anyway? [y/N]

(Message saved to commit message.)
Usage Exception: Specify reviewers and retry.