commit d32cddf793aea53b04cdd28eb567968481930428 from: Stefan Sperling date: Thu Feb 20 21:32:31 2025 UTC change gotwebd diff algorithm from myers-diff to patience-diff This matches the default of our command line diff and tog diff. If anyone really prefers myers we could add an option gotwebd.conf. commit - 0cc74c2680627c981bd59b4b445450ff7afa8684 commit + d32cddf793aea53b04cdd28eb567968481930428 blob - fd987412bad6dd4d9785fd3e12392a8884b4d4ef blob + f60b86ed8bb810bc93dbee821cc7991a64152284 --- gotwebd/got_operations.c +++ gotwebd/got_operations.c @@ -1108,7 +1108,7 @@ got_output_file_blame(struct request *c, got_render_bl goto done; error = got_blame(in_repo_path, commit_id, repo, - GOT_DIFF_ALGORITHM_MYERS, got_gotweb_blame_cb, &bca, NULL, NULL, + GOT_DIFF_ALGORITHM_PATIENCE, got_gotweb_blame_cb, &bca, NULL, NULL, fd1, fd2, f1, f2); done: @@ -1213,18 +1213,18 @@ got_open_diff_for_output(FILE **fp, struct request *c) switch (obj_type) { case GOT_OBJ_TYPE_BLOB: error = got_diff_objects_as_blobs(NULL, NULL, f1, f2, fd1, fd2, - id1, id2, NULL, NULL, GOT_DIFF_ALGORITHM_MYERS, 3, 0, 0, - NULL, repo, f3); + id1, id2, NULL, NULL, GOT_DIFF_ALGORITHM_PATIENCE, + 3, 0, 0, NULL, repo, f3); break; case GOT_OBJ_TYPE_TREE: error = got_diff_objects_as_trees(NULL, NULL, f1, f2, fd1, fd2, - id1, id2, NULL, "", "", GOT_DIFF_ALGORITHM_MYERS, 3, 0, 0, - NULL, repo, f3); + id1, id2, NULL, "", "", GOT_DIFF_ALGORITHM_PATIENCE, + 3, 0, 0, NULL, repo, f3); break; case GOT_OBJ_TYPE_COMMIT: error = got_diff_objects_as_commits(NULL, NULL, f1, f2, fd1, - fd2, id1, id2, NULL, GOT_DIFF_ALGORITHM_MYERS, 3, 0, 0, - NULL, repo, f3); + fd2, id1, id2, NULL, GOT_DIFF_ALGORITHM_PATIENCE, + 3, 0, 0, NULL, repo, f3); break; default: error = got_error(GOT_ERR_OBJ_TYPE);