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 42
42
# Used on Git's side to reflect empty edit messages on the wiki
43
43
use constant EMPTY_MESSAGE => ' *Empty MediaWiki Message*' ;
44
44
45
+ if (@ARGV != 2) {
46
+ exit_error_usage();
47
+ }
48
+
45
49
my $remotename = $ARGV [0];
46
50
my $url = $ARGV [1];
47
51
157
161
158
162
# ######################### Functions ##############################
159
163
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
+
160
175
# MediaWiki API instance, created lazily.
161
176
my $mediawiki ;
162
177
You can’t perform that action at this time.
0 commit comments