From 991c9391541d1a4ff3d3e135884139e706fa5f51 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Mon, 14 Oct 2024 15:49:52 -0400 Subject: [PATCH 1/2] doc: Update "cmp" links in `tree::function::diff` This updates the "git_cmp_c" and "git_cmp_rs" links in the `gix_diff::tree::function::diff` documentation comment. - The significant change is to the "git_cmp_rs" link (the second link), which accounts for how files have renamed and how code has been moved, and also changed in #849 to fix issue #848. This hyperlink change completes the third task listed in #1627. - The other change is to update the "git_cmp_c" link at the same time. That code has not changed, and this is just referring to a later commit (the current tip of the master branch in git/git). The reason to also do this change is to make it easier to verify, both now and for anyone reading the documentation, that that link remains current. --- gix-diff/src/tree/function.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gix-diff/src/tree/function.rs b/gix-diff/src/tree/function.rs index 3dd90010ea3..71b5224edd1 100644 --- a/gix-diff/src/tree/function.rs +++ b/gix-diff/src/tree/function.rs @@ -23,8 +23,8 @@ use crate::tree::{visit::Change, Error, State, TreeInfoTuple, Visit}; /// * cycle checking is not performed, but can be performed in the delegate which can return /// [`tree::visit::Action::Cancel`](crate::tree::visit::Action::Cancel) to stop the traversal. /// -/// [git_cmp_c]: https://github.com/git/git/blob/311531c9de557d25ac087c1637818bd2aad6eb3a/tree-diff.c#L49:L65 -/// [git_cmp_rs]: https://github.com/GitoxideLabs/gitoxide/blob/a4d5f99c8dc99bf814790928a3bf9649cd99486b/gix-object/src/mutable/tree.rs#L52-L55 +/// [git_cmp_c]: https://github.com/git/git/blob/ef8ce8f3d4344fd3af049c17eeba5cd20d98b69f/tree-diff.c#L72-L88 +/// [git_cmp_rs]: https://github.com/GitoxideLabs/gitoxide/blob/795962b107d86f58b1f7c75006da256d19cc80ad/gix-object/src/tree/mod.rs#L263-L273 #[doc(alias = "diff_tree_to_tree", alias = "git2")] pub fn diff( lhs: TreeRefIter<'_>, From baa6f23c2ed95fe7079bfb9af81f0c044ca406a9 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Mon, 14 Oct 2024 15:56:11 -0400 Subject: [PATCH 2/2] Rename nonexistent repo in `Makefile` from `foo` to `nonexistent` The nonexistent repo used to get data from a 401 response in the `update-curl-fixtures` rule was formerly called `foo`. (In 1ea08bf in #1624, I had erroneously said this was for a 404 response, but the `foo` URL is the 401 URL, not the 404 URL.) This commit renames it to `nonexistent`, which is more self-documenting and less likely to be created by accident, even temporarily. In 1ea08bf (#1624), it was changed from `Byron/foo` to `GitoxideLabs/foo`, going along with the change of the existing repository (gitoxide's own) from `Byron/gitoxide` to `GitoxideLabs/gitoxide`. But while `Byron/foo` would continue not to exist as long as the convention of not having a `foo` repo was maintained by `@Byron`, a `foo` repository in `GitoxideLabs` might someday be created by another developer who is not aware of its status in `Makefile`. Renaming it to `nonexistent` should make this easier to avoid. I tested this change with the same approach as noted for 1ea08bf. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9ccf1bfc36c..fea4c7229ec 100644 --- a/Makefile +++ b/Makefile @@ -145,7 +145,7 @@ base_url = https://github.com/GitoxideLabs/gitoxide.git update-curl-fixtures: ## use curl to fetch raw fixtures for use in unit test. Changes there might break them curl -D - -L "$(base_url)/info/refs?service=git-upload-pack" > $(transport_fixtures)/v1/http-handshake.response curl -D - -H 'Git-Protocol: version=2' -L "$(base_url)/info/refs?service=git-upload-pack" > $(transport_fixtures)/v2/http-handshake.response - curl -H 'User-Agent: git/oxide-0.1.0' -D - -H 'Git-Protocol: version=1' -L "https://github.com/GitoxideLabs/foo/info/refs?service=git-upload-pack" > $(transport_fixtures)/http-401.response + curl -H 'User-Agent: git/oxide-0.1.0' -D - -H 'Git-Protocol: version=1' -L "https://github.com/GitoxideLabs/nonexistent/info/refs?service=git-upload-pack" > $(transport_fixtures)/http-401.response curl -D - -H 'Git-Protocol: version=1' -L "https://github.com/GitoxideLabs/gitoxide/info/refs?service=git-upload-pack" > $(transport_fixtures)/http-404.response update-assets: $(baseline_asset_fixture) ## refresh assets compiled into the binaries from their source