MCPcopy Create free account
hub / github.com/git/git / interactive_add

Function interactive_add

builtin/add.c:161–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161int interactive_add(struct repository *repo,
162 const char **argv,
163 const char *prefix,
164 int patch, struct interactive_options *interactive_opts)
165{
166 struct pathspec pathspec;
167 int ret;
168
169 parse_pathspec(&pathspec, 0,
170 PATHSPEC_PREFER_FULL |
171 PATHSPEC_SYMLINK_LEADING_PATH |
172 PATHSPEC_PREFIX_ORIGIN,
173 prefix, argv);
174
175 if (patch)
176 ret = !!run_add_p(repo, ADD_P_ADD, interactive_opts, NULL, &pathspec, 0);
177 else
178 ret = !!run_add_i(repo, &pathspec, interactive_opts);
179
180 clear_pathspec(&pathspec);
181 return ret;
182}
183
184static int edit_patch(struct repository *repo,
185 int argc,

Callers 2

cmd_addFunction · 0.85
prepare_indexFunction · 0.85

Calls 4

parse_pathspecFunction · 0.85
run_add_pFunction · 0.85
run_add_iFunction · 0.85
clear_pathspecFunction · 0.85

Tested by

no test coverage detected