Commit Diff


commit - fdfa9bf28f9d53053ad4687f6cd06c86cfe31b33
commit + 1e71573ed6f406d76e81bd84089a93e76274d424
blob - c985f53d8a15c95d1676fac487eee6262a70e492
blob + 2d55ba42e59fbbee2f17dfdd693234c397232b49
--- include/got_worktree.h
+++ include/got_worktree.h
@@ -379,7 +379,6 @@ const struct got_error *got_worktree_get_histedit_scri
  * 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
@@ -4917,10 +4917,10 @@ done:
 }
 
 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;
@@ -4936,11 +4936,6 @@ got_worktree_stage_paths(struct got_worktree *worktree
 		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)