From: QueenJcloud <qjessa662@gmail.com>
To: git@vger.kernel.org
Cc: QueenJcloud <qjessa662@gmail.com>
Subject: [PATCH] gitprotocol-http: document invalid 'want' error handling
Date: Sat, 1 Nov 2025 17:15:12 +0100 [thread overview]
Message-ID: <20251101161513.1794-1-qjessa662@gmail.com> (raw)
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 reply other threads:[~2025-11-01 16:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-01 16:15 QueenJcloud [this message]
2025-11-01 23:17 ` [PATCH] gitprotocol-http: document invalid 'want' error handling Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251101161513.1794-1-qjessa662@gmail.com \
--to=qjessa662@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).