blob: cabeed4530d68625e086c79597465b27fd0d7a98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/*
* Builtin "git pull"
*
* Based on git-pull.sh by Junio C Hamano
*
* Fetch one or more remote refs and merge it/them into the current HEAD.
*/
#include "cache.h"
#include "builtin.h"
#include "parse-options.h"
#include "exec_cmd.h"
static const char * const pull_usage[] = {
NULL
};
static struct option pull_options[] = {
OPT_END()
};
int cmd_pull(int argc, const char **argv, const char *prefix)
{
if (!getenv("_GIT_USE_BUILTIN_PULL")) {
const char *path = mkpath("%s/git-pull", git_exec_path());
if (sane_execvp(path, (char **)argv) < 0)
die_errno("could not exec %s", path);
}
argc = parse_options(argc, argv, prefix, pull_options, pull_usage, 0);
return 0;
}
|