File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1313void set_diffopt_flags_from_submodule_config (struct diff_options * diffopt ,
1414 const char * path );
1515int submodule_config (const char * var , const char * value , void * cb );
16- void gitmodules_config ();
16+ void gitmodules_config (void );
1717int parse_submodule_config_option (const char * var , const char * value );
1818void handle_ignore_submodules_arg (struct diff_options * diffopt , const char * );
1919int parse_fetch_recurse_submodules_arg (const char * opt , const char * arg );
Original file line number Diff line number Diff line change 11#include "cache.h"
22#include "run-command.h"
33
4- int main (int argc , char * * argv )
4+ int main (int argc , const char * * argv )
55{
66 struct child_process cp ;
77 int nogit = 0 ;
88
99 setup_git_directory_gently (& nogit );
1010 if (nogit )
1111 die ("No git repo found" );
12- if (!strcmp (argv [1 ], "--setup-work-tree" )) {
12+ if (argc > 1 && !strcmp (argv [1 ], "--setup-work-tree" )) {
1313 setup_work_tree ();
1414 argv ++ ;
1515 }
1616 memset (& cp , 0 , sizeof (cp ));
1717 cp .git_cmd = 1 ;
18- cp .argv = ( const char * * ) argv + 1 ;
18+ cp .argv = argv + 1 ;
1919 return run_command (& cp );
2020}
You can’t perform that action at this time.
0 commit comments