commit - fdfa9bf28f9d53053ad4687f6cd06c86cfe31b33
commit + 1e71573ed6f406d76e81bd84089a93e76274d424
blob - c985f53d8a15c95d1676fac487eee6262a70e492
blob + 2d55ba42e59fbbee2f17dfdd693234c397232b49
--- include/got_worktree.h
+++ include/got_worktree.h
* pointer is expected to point at a const char * path of a file which
* contains alternative content to be staged instead.
*/
-const struct got_error *got_worktree_stage_paths(struct got_worktree *,
- struct got_pathlist_head *, struct got_repository *,
- got_worktree_status_cb, void *,
- got_worktree_cancel_cb , void *);
+const struct got_error *got_worktree_stage(struct got_worktree *,
+ struct got_pathlist_head *, got_worktree_status_cb, void *,
+ struct got_repository *);
blob - a88831b22abee7e7511276c0faba475a036c7c69
blob + 969b659b69337f267299b51146c428e32f004a3a
--- lib/worktree.c
+++ lib/worktree.c
}
const struct got_error *
-got_worktree_stage_paths(struct got_worktree *worktree,
- struct got_pathlist_head *paths, struct got_repository *repo,
+got_worktree_stage(struct got_worktree *worktree,
+ struct got_pathlist_head *paths,
got_worktree_status_cb status_cb, void *status_arg,
- got_worktree_cancel_cb cancel_cb, void *cancel_arg)
+ struct got_repository *repo)
{
const struct got_error *err = NULL, *sync_err, *unlockerr;
struct got_pathlist_entry *pe;
goto done;
TAILQ_FOREACH(pe, paths, entry) {
- if (cancel_cb) {
- err = (*cancel_cb)(cancel_arg);
- if (err)
- break;
- }
err = stage_path(pe->path, pe->path_len, (const char *)pe->data,
worktree, fileindex, repo, status_cb, status_arg);
if (err)