-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* maint: test-subprocess: fix segfault without arguments submodule: fix prototype of gitmodules_config
- Loading branch information
Showing
2 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |