git/builtin/add.c

/*
 * "git add" builtin command
 *
 * Copyright (C) 2006 Linus Torvalds
 */
#include "builtin.h"
#include "advice.h"
#include "config.h"
#include "lockfile.h"
#include "editor.h"
#include "dir.h"
#include "gettext.h"
#include "pathspec.h"
#include "run-command.h"
#include "parse-options.h"
#include "path.h"
#include "preload-index.h"
#include "diff.h"
#include "read-cache.h"
#include "revision.h"
#include "bulk-checkin.h"
#include "strvec.h"
#include "submodule.h"
#include "add-interactive.h"

static const char * const builtin_add_usage[] =;
static int patch_interactive, add_interactive, edit_interactive;
static int take_worktree_changes;
static int add_renormalize;
static int pathspec_file_nul;
static int include_sparse;
static const char *pathspec_from_file;

static int chmod_pathspec(struct repository *repo,
			  struct pathspec *pathspec,
			  char flip,
			  int show_only)
{}

static int renormalize_tracked_files(struct repository *repo,
				     const struct pathspec *pathspec,
				     int flags)
{}

static char *prune_directory(struct repository *repo,
			     struct dir_struct *dir,
			     struct pathspec *pathspec,
			     int prefix)
{}

static int refresh(struct repository *repo, int verbose, const struct pathspec *pathspec)
{}

int interactive_add(struct repository *repo,
		    const char **argv,
		    const char *prefix,
		    int patch)
{}

static int edit_patch(struct repository *repo,
		      int argc,
		      const char **argv,
		      const char *prefix)
{}

static const char ignore_error[] =);

static int verbose, show_only, ignored_too, refresh_only;
static int ignore_add_errors, intent_to_add, ignore_missing;
static int warn_on_embedded_repo =;

#define ADDREMOVE_DEFAULT
static int addremove =;
static int addremove_explicit =; /* unspecified */

static char *chmod_arg;

static int ignore_removal_cb(const struct option *opt, const char *arg, int unset)
{}

static struct option builtin_add_options[] =;

static int add_config(const char *var, const char *value,
		      const struct config_context *ctx, void *cb)
{}

static const char embedded_advice[] =
);

static void check_embedded_repo(const char *path)
{}

static int add_files(struct repository *repo, struct dir_struct *dir, int flags)
{}

int cmd_add(int argc,
	    const char **argv,
	    const char *prefix,
	    struct repository *repo)
{}