1
0
mirror of https://github.com/git/git.git synced 2024-09-28 16:13:01 +02:00
git/builtin/commit-graph.c

37 lines
922 B
C
Raw Normal View History

#include "builtin.h"
#include "config.h"
#include "parse-options.h"
static char const * const builtin_commit_graph_usage[] = {
N_("git commit-graph [--object-dir <objdir>]"),
NULL
};
static struct opts_commit_graph {
const char *obj_dir;
} opts;
int cmd_commit_graph(int argc, const char **argv, const char *prefix)
{
static struct option builtin_commit_graph_options[] = {
OPT_STRING(0, "object-dir", &opts.obj_dir,
N_("dir"),
N_("The object directory to store the graph")),
OPT_END(),
};
if (argc == 2 && !strcmp(argv[1], "-h"))
usage_with_options(builtin_commit_graph_usage,
builtin_commit_graph_options);
git_config(git_default_config, NULL);
argc = parse_options(argc, argv, prefix,
builtin_commit_graph_options,
builtin_commit_graph_usage,
PARSE_OPT_STOP_AT_NON_OPTION);
usage_with_options(builtin_commit_graph_usage,
builtin_commit_graph_options);
}