Commit Diff


commit - c89c70b628c1825024e333214392011409d71184
commit + addd8d40708de74e3dcbfb6962a12f29189e674e
blob - 860d8c6d46a8db026e455591d706160d86c7f3fe
blob + 6df059e9a98fbe2f538884f14d8c80a5e3f4fc97
--- lib/worktree.c
+++ lib/worktree.c
@@ -6535,7 +6535,7 @@ check_path_is_commitable(const char *path,
 	}
 
 	if (cpe == NULL)
-		return got_error_path(path, GOT_ERR_BAD_PATH);
+		return got_error_path(path, GOT_ERR_COMMIT_NO_CHANGES);
 
 	return NULL;
 }
blob - 5f92bc4c5f41eaab6b2619e4a75bc863402edc0c
blob + c8651ab26909a5ce8ff104fcc69b1029cc18605e
--- regress/cmdline/commit.sh
+++ regress/cmdline/commit.sh
@@ -638,7 +638,8 @@ test_commit_selected_paths() {
 		test_done "$testroot" "1"
 		return 1
 	fi
-	echo "got: nonexistent: bad path" > $testroot/stderr.expected
+	echo "got: nonexistent: no changes to commit" \
+		> $testroot/stderr.expected
 
 	cmp -s $testroot/stderr.expected $testroot/stderr
 	ret=$?