Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  test-subprocess: fix segfault without arguments
  submodule: fix prototype of gitmodules_config
  • Loading branch information
Junio C Hamano committed Apr 10, 2012
2 parents 926b1ec + fdec2eb commit 7945c7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion submodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ enum {
void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt,
const char *path);
int submodule_config(const char *var, const char *value, void *cb);
void gitmodules_config();
void gitmodules_config(void);
int parse_submodule_config_option(const char *var, const char *value);
void handle_ignore_submodules_arg(struct diff_options *diffopt, const char *);
int parse_fetch_recurse_submodules_arg(const char *opt, const char *arg);
Expand Down
6 changes: 3 additions & 3 deletions test-subprocess.c
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#include "cache.h"
#include "run-command.h"

int main(int argc, char **argv)
int main(int argc, const char **argv)
{
struct child_process cp;
int nogit = 0;

setup_git_directory_gently(&nogit);
if (nogit)
die("No git repo found");
if (!strcmp(argv[1], "--setup-work-tree")) {
if (argc > 1 && !strcmp(argv[1], "--setup-work-tree")) {
setup_work_tree();
argv++;
}
memset(&cp, 0, sizeof(cp));
cp.git_cmd = 1;
cp.argv = (const char **)argv+1;
cp.argv = argv + 1;
return run_command(&cp);
}

0 comments on commit 7945c7f

Please sign in to comment.