[
https://issues.apache.org/jira/browse/ACCUMULO-4540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15765370#comment-15765370
]
Christopher Tubbs commented on ACCUMULO-4540:
---------------------------------------------
This is just one of many possible error conditions. Presumably, the developer
is already aware of what a successful execution of the post-commit hook does,
as well as its prerequisites... they were the ones who copied (or symlink'd)
it, after all. It could get quite tedious to try to add verbose error messages
on each possible error condition.
How about: "fatal: asf-site is not a branch; this script can only update
branches named asf-site (try: git checkout -t origin/asf-site)" ?
I think this is too long for an error message, but I think it covers all the
bases. But, it's not quite accurate enough... checking out the asf-site branch
isn't good enough. You have to re-run the script manually after doing that. We
also can't assume they're using this script as a post-commit hook. It works
just as well with a manual execution, and the message shouldn't be tailored
towards the post-commit hook case, excluding others.
> '_devtools/git-hooks/post-commit' does not fail gracefully on missing the
> local branch 'asf-site'
> -------------------------------------------------------------------------------------------------
>
> Key: ACCUMULO-4540
> URL: https://issues.apache.org/jira/browse/ACCUMULO-4540
> Project: Accumulo
> Issue Type: Bug
> Components: website
> Reporter: Josh Elser
> Assignee: Christopher Tubbs
> Priority: Trivial
>
> I did a fresh clone of the accumulo-website.git repository and copied the
> post-commit hook into {{.git/hooks}}. Upon making my first commit, it failed:
> {{fatal: asf-site is not a branch}}
> Would be nice if we caught it when asf-site doesn't exist locally and give a
> better error message.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)