| 159 | } |
| 160 | |
| 161 | int 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 | |
| 184 | static int edit_patch(struct repository *repo, |
| 185 | int argc, |
no test coverage detected