File tree Expand file tree Collapse file tree 2 files changed +22
-21
lines changed Expand file tree Collapse file tree 2 files changed +22
-21
lines changed Original file line number Diff line number Diff line change @@ -181,27 +181,6 @@ git2r_arg_check_credentials(
181181 return 0 ;
182182}
183183
184- /**
185- * Check proxy argument
186- *
187- * proxy may be NULL, TRUE or a string
188- *
189- * @param arg the arg to check
190- * @return 0 if OK, else -1
191- */
192- int attribute_hidden
193- git2r_arg_check_proxy (
194- SEXP arg )
195- {
196- if (Rf_isNull (arg ))
197- return 0 ;
198- if (Rf_isLogical (arg ) && 1 == Rf_length (arg ) && NA_LOGICAL != LOGICAL (arg )[0 ])
199- return 0 ;
200- if (Rf_isString (arg ) && 1 == Rf_length (arg ) && NA_STRING != STRING_ELT (arg , 0 ))
201- return 0 ;
202- return -1 ;
203- }
204-
205184/**
206185 * Check fetch_heads argument
207186 *
@@ -398,6 +377,27 @@ git2r_arg_check_real(
398377 return 0 ;
399378}
400379
380+ /**
381+ * Check proxy argument
382+ *
383+ * proxy may be NULL, TRUE or a string
384+ *
385+ * @param arg the arg to check
386+ * @return 0 if OK, else -1
387+ */
388+ int attribute_hidden
389+ git2r_arg_check_proxy (
390+ SEXP arg )
391+ {
392+ if (Rf_isNull (arg ))
393+ return 0 ;
394+ if (Rf_isLogical (arg ) && 1 == Rf_length (arg ) && NA_LOGICAL != LOGICAL (arg )[0 ])
395+ return 0 ;
396+ if (Rf_isString (arg ) && 1 == Rf_length (arg ) && NA_STRING != STRING_ELT (arg , 0 ))
397+ return 0 ;
398+ return -1 ;
399+ }
400+
401401/**
402402 * Check repository argument
403403 *
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ int git2r_arg_check_integer_gte_zero(SEXP arg);
3838int git2r_arg_check_list (SEXP arg );
3939int git2r_arg_check_logical (SEXP arg );
4040int git2r_arg_check_note (SEXP arg );
41+ int git2r_arg_check_proxy (SEXP arg );
4142int git2r_arg_check_repository (SEXP arg );
4243int git2r_arg_check_same_repo (SEXP arg1 , SEXP arg2 );
4344int git2r_arg_check_signature (SEXP arg );
You can’t perform that action at this time.
0 commit comments