From: epriestley Date: Wed, 15 Jun 2011 05:01:17 +0000 (-0700) Subject: Include a link to documentation when throwing an error from arcanist about a bad X-Git-Tag: conduit-4~314 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=660dd744136bf335851fcbfd834fb147ab6d2890;p=arcanist.git Include a link to documentation when throwing an error from arcanist about a bad commit template Summary: When users run into this, point them at the documentation explicitly. Test Plan: Tried to "arc diff" with a commit message of 'derp', got a live link to documentation instead of a vague set of general instructions. Reviewed By: aran Reviewers: moskov, aran, jungejason, tuomaspelkonen CC: aran Differential Revision: 468 --- diff --git a/src/workflow/diff/ArcanistDiffWorkflow.php b/src/workflow/diff/ArcanistDiffWorkflow.php index 25ff3d33..f4dc2bba 100644 --- a/src/workflow/diff/ArcanistDiffWorkflow.php +++ b/src/workflow/diff/ArcanistDiffWorkflow.php @@ -915,11 +915,15 @@ EOTEXT "problems:\n\n".$desc."\n\nIf you only want to create a diff ". "(not a revision), use --preview to ignore commit messages."); } else if (count($problems) == 1) { + $user_guide = 'http://phabricator.com/docs/phabricator/'. + 'article/Arcanist_User_Guide.html'; throw new ArcanistUsageException( "Commit message is not properly formatted:\n\n".$desc."\n\n". "You should use the standard git commit template to provide a ". "commit message. If you only want to create a diff (not a ". - "revision), use --preview to ignore commit messages."); + "revision), use --preview to ignore commit messages.\n\n". + "See this document for instructions on configuring the commit ". + "template:\n\n {$user_guide}\n"); } }