{"thread":{"id":"62457","subject":"diff-algorithm to work better with color-moved, and issue with am.messageid (was: [PATCH] bind.2: move EADDRNOTAVAIL to general errors)","startedAt":"2024-11-06T11:00:08Z","lastAt":"2024-11-06T11:00:08Z","messageCount":1,"participants":["Alejandro Colomar"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"506709","messageId":"imng4gsmiins23rrpb7zppeambm4wdwfvyhgp4rbzqkc5dyjah@3bckcsvdg42r","threadId":"62457","inReplyTo":"eee2fe5c6c3d6203e1e528a998b0de2c.philipp@bureaucracy.de","subject":"diff-algorithm to work better with color-moved, and issue with am.messageid (was: [PATCH] bind.2: move EADDRNOTAVAIL to general errors)","fromName":"Alejandro Colomar","fromEmail":"alx@kernel.org","sentAt":"2024-11-06T11:00:05Z","receivedAt":"2024-11-06T11:00:08Z","isPatch":true,"sender":{"key":"alx@kernel.org","avatar":null},"body":"[To += git@, to report some issue with git(1)]\n\nHi Philipp, git people,\n\nOn Wed, Nov 06, 2024 at 10:53:47AM GMT, Philipp Takacs wrote:\n> EADDRNOTAVAIL is not a socket specific error\n\nThanks!  I've applied the patch.\n\n> ---\n>  man/man2/bind.2 | 8 ++++----\n>  1 file changed, 4 insertions(+), 4 deletions(-)\n> \n> diff --git a/man/man2/bind.2 b/man/man2/bind.2\n> index a59ac16f9..330a808b7 100644\n> --- a/man/man2/bind.2\n> +++ b/man/man2/bind.2\n> @@ -147,6 +147,10 @@ .SH ERRORS\n\nWow, thanks for configuring git(1) for that!  :)\n\n>  The file descriptor\n>  .I sockfd\n>  does not refer to a socket.\n> +.TP\n> +.B EADDRNOTAVAIL\n> +A nonexistent interface was requested or the requested\n> +address was not local.\n>  .P\n>  The following errors are specific to UNIX domain\n>  .RB ( AF_UNIX )\n> @@ -157,10 +161,6 @@ .SH ERRORS\n>  (See also\n>  .BR path_resolution (7).)\n>  .TP\n> -.B EADDRNOTAVAIL\n> -A nonexistent interface was requested or the requested\n> -address was not local.\n> -.TP\n\nAnd here goes some question to git@ people.  Here, either the .TP from\nbelow or above the rest of the removed text is correct for a diff.\nHowever, when you ask git to --color-moved, it will think the .TP was\nnot moved, as it's in a different position.   Maybe some diffing\nalgorithm could have this in mind and favor when in doubt a line that\nmakes the removed part consistent with the added part, so that more text\nis considered to have been moved.  What do you think?  Would that be\ndoable, or is it easier said than done?  :)\n\n\nBelow is a reproducer.\n\nBTW, now I've noticed that the Message-ID line was written in the wrong\nposition, next to the commit message body, and not in the trailer\nsignature fields.  That's the first time I see that happening.  It might\nbe interesting to check that.  I can consistently reproduce it when\napplying this patch.  It might be interesting to investigate why it\nhappens.\n\n\nHave a lovely day!\nAlex\n\nalx@debian:~$ cd /tmp/\nalx@debian:/tmp$ git clone https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git\nCloning into 'man-pages'...\nremote: Enumerating objects: 172347, done.\nremote: Counting objects: 100% (358/358), done.\nremote: Compressing objects: 100% (332/332), done.\nremote: Total 172347 (delta 180), reused 0 (delta 0), pack-reused 171989\nReceiving objects: 100% (172347/172347), 33.72 MiB | 17.49 MiB/s, done.\nResolving deltas: 100% (141272/141272), done.\nalx@debian:/tmp$ cd man-pages/\nalx@debian:/tmp/man-pages$ git show --color-moved 577251dfb1d2\ncommit 577251dfb1d2c63d8022944d12ed567d8409c17a (HEAD -> master, origin/master, origin/HEAD)\nAuthor: Philipp Takacs <philipp@bureaucracy.de>\nDate:   Wed Nov 6 10:53:47 2024 +0100\n\n    bind.2: move EADDRNOTAVAIL to general errors\n    \n    EADDRNOTAVAIL is not a socket specific error\n    Message-ID: <eee2fe5c6c3d6203e1e528a998b0de2c.philipp@bureaucracy.de>\n    \n    Signed-off-by: Alejandro Colomar <alx@kernel.org>\n\ndiff --git a/man/man2/bind.2 b/man/man2/bind.2\nindex a59ac16f9..330a808b7 100644\n--- a/man/man2/bind.2\n+++ b/man/man2/bind.2\n@@ -147,6 +147,10 @@ .SH ERRORS\n The file descriptor\n .I sockfd\n does not refer to a socket.\n+.TP\n+.B EADDRNOTAVAIL\n+A nonexistent interface was requested or the requested\n+address was not local.\n .P\n The following errors are specific to UNIX domain\n .RB ( AF_UNIX )\n@@ -157,10 +161,6 @@ .SH ERRORS\n (See also\n .BR path_resolution (7).)\n .TP\n-.B EADDRNOTAVAIL\n-A nonexistent interface was requested or the requested\n-address was not local.\n-.TP\n .B EFAULT\n .I addr\n points outside the user's accessible address space.\n\n>  .B EFAULT\n>  .I addr\n>  points outside the user's accessible address space.\n> -- \n> 2.39.5\n> \n\n-- \n<https://www.alejandro-colomar.es/>\n"}]}