Staging
v0.5.1
https://github.com/git/git
Raw File
Tip revision: f3500825257b441134bd99b08bab3b6fd1cb4f51 authored by Junio C Hamano on 07 February 2013, 23:21:10 UTC
Git 1.8.1.3
Tip revision: f350082
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