File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 4242# Used on Git's side to reflect empty edit messages on the wiki
4343use constant EMPTY_MESSAGE => ' *Empty MediaWiki Message*' ;
4444
45+ if (@ARGV != 2) {
46+ exit_error_usage();
47+ }
48+
4549my $remotename = $ARGV [0];
4650my $url = $ARGV [1];
4751
157161
158162# ######################### Functions ##############################
159163
164+ # # error handling
165+ sub exit_error_usage {
166+ die " ERROR: git-remote-mediawiki module was not called with a correct number of\n " .
167+ " parameters\n " .
168+ " You may obtain this error because you attempted to run the git-remote-mediawiki\n " .
169+ " module directly.\n " .
170+ " This module can be used the following way:\n " .
171+ " \t git clone mediawiki://<address of a mediawiki>\n " .
172+ " Then, use git commit, push and pull as with every normal git repository.\n " ;
173+ }
174+
160175# MediaWiki API instance, created lazily.
161176my $mediawiki ;
162177
You can’t perform that action at this time.
0 commit comments