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 13
13
void set_diffopt_flags_from_submodule_config (struct diff_options * diffopt ,
14
14
const char * path );
15
15
int submodule_config (const char * var , const char * value , void * cb );
16
- void gitmodules_config ();
16
+ void gitmodules_config (void );
17
17
int parse_submodule_config_option (const char * var , const char * value );
18
18
void handle_ignore_submodules_arg (struct diff_options * diffopt , const char * );
19
19
int parse_fetch_recurse_submodules_arg (const char * opt , const char * arg );
Original file line number Diff line number Diff line change 1
1
#include "cache.h"
2
2
#include "run-command.h"
3
3
4
- int main (int argc , char * * argv )
4
+ int main (int argc , const char * * argv )
5
5
{
6
6
struct child_process cp ;
7
7
int nogit = 0 ;
8
8
9
9
setup_git_directory_gently (& nogit );
10
10
if (nogit )
11
11
die ("No git repo found" );
12
- if (!strcmp (argv [1 ], "--setup-work-tree" )) {
12
+ if (argc > 1 && !strcmp (argv [1 ], "--setup-work-tree" )) {
13
13
setup_work_tree ();
14
14
argv ++ ;
15
15
}
16
16
memset (& cp , 0 , sizeof (cp ));
17
17
cp .git_cmd = 1 ;
18
- cp .argv = ( const char * * ) argv + 1 ;
18
+ cp .argv = argv + 1 ;
19
19
return run_command (& cp );
20
20
}
You can’t perform that action at this time.
0 commit comments