Staging
v0.5.1
https://github.com/git/git
Raw File
Tip revision: e4f59a32de3f90ff5aabc09b9da6bd5818c5076b authored by Junio C Hamano on 14 January 2013, 16:04:50 UTC
Git 1.8.1.1
Tip revision: e4f59a3
test-subprocess.c
#include "cache.h"
#include "run-command.h"

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 (argc > 1 && !strcmp(argv[1], "--setup-work-tree")) {
		setup_work_tree();
		argv++;
	}
	memset(&cp, 0, sizeof(cp));
	cp.git_cmd = 1;
	cp.argv = argv + 1;
	return run_command(&cp);
}
back to top