git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitprotocol-http: document invalid 'want' error handling

From
QueenJcloud <qjessa662@gmail.com>
Date
Nov 1, 2025, 16:15 UTC
Message-ID
<20251101161513.1794-1-qjessa662@gmail.com>

Add documentation to describe how the server responds when a client sends an invalid 'want' line during the HTTP protocol exchange. This helps clarify the behavior of Git when handling malformed or unknown object requests, and ensures developers understand how such errors are reported.

Signed-off-by: Queen Ediri Jessa <qjessa662@gmail.com>
---
 Documentation/gitprotocol-http.adoc | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/Documentation/gitprotocol-http.adoc b/Documentation/gitprotocol-http.adoc
index d024010414..8818e9dc03 100644
--- a/Documentation/gitprotocol-http.adoc
+++ b/Documentation/gitprotocol-http.adoc
@@ -443,7 +443,17 @@ If no "want" objects are received, send an error:
 TODO: Define error if no "want" lines are requested.
 
 If any "want" object is not reachable, send an error:
-TODO: Define error if an invalid "want" is requested.
+When the client sends an invalid `want` line, the server responds with an
+appropriate error message indicating the invalid object request. This ensures
+the client can detect and handle protocol violations gracefully.
+
+For example, a malformed or unknown object hash in a `want` command will result
+in a response similar to:
+
+    error invalid 'want' <object-id>
+
+This helps maintain clear communication between client and server during
+fetch operations.
 
 Create an empty list, `s_common`.
 
-- 
2.51.0.573.gb660e2dcb9
Next: Junio C Hamano
Message 1 of 2 in “gitprotocol-http: document invalid 'want' error handling”
  1. gitprotocol-http: document invalid 'want' error handlingQueenJcloud, Nov 1, 2025
  2. Junio C HamanoNov 1, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.