Commit Diff


commit - 533c404ec30ef30690b8c41481cbdbbeeb8e2a5c
commit + 3bafd8d444040e4f41be33562f63e5d2eb201447
blob - 2f7c650a06440ad6ab3cfbc4ddcf755b4fee8829
blob + b55e991971271638732739463b3a95ee39f126af
--- got/got.c
+++ got/got.c
@@ -8030,7 +8030,7 @@ add_progress(void *arg, unsigned char status, const ch
 }
 
 static const struct got_error *
-check_paths_contains_dir(int *contains_dir, struct got_worktree *worktree,
+pathlist_contains_directory(int *contains_dir, struct got_worktree *worktree,
     struct got_pathlist_head *paths)
 {
 	const struct got_error *error = NULL;
@@ -8136,7 +8136,8 @@ cmd_add(int argc, char *argv[])
 		goto done;
 
 	if (!can_recurse) {
-		error = check_paths_contains_dir(&contains_dir, worktree, &paths);
+		error = pathlist_contains_directory(&contains_dir, worktree,
+		    &paths);
 		if (error != NULL)
 			goto done;
 
@@ -8283,7 +8284,8 @@ cmd_remove(int argc, char *argv[])
 		goto done;
 
 	if (!can_recurse) {
-		error = check_paths_contains_dir(&contains_dir, worktree, &paths);
+		error = pathlist_contains_directory(&contains_dir, worktree,
+		    &paths);
 		if (error != NULL)
 			goto done;
 
@@ -8997,7 +8999,8 @@ cmd_revert(int argc, char *argv[])
 		goto done;
 
 	if (!can_recurse) {
-		error = check_paths_contains_dir(&contains_dir, worktree, &paths);
+		error = pathlist_contains_directory(&contains_dir, worktree,
+		    &paths);
 		if (error != NULL)
 			goto done;
 
@@ -13924,7 +13927,7 @@ cmd_stage(int argc, char *argv[])
 		    print_stage, NULL, check_cancelled, NULL);
 	else {
 		if (!can_recurse) {
-			error = check_paths_contains_dir(&contains_dir,
+			error = pathlist_contains_directory(&contains_dir,
 			    worktree, &paths);
 			if (error != NULL)
 				goto done;
@@ -14060,7 +14063,7 @@ cmd_unstage(int argc, char *argv[])
 		goto done;
 
 	if (!can_recurse) {
-		error = check_paths_contains_dir(&contains_dir,
+		error = pathlist_contains_directory(&contains_dir,
 		    worktree, &paths);
 		if (error != NULL)
 			goto done;