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

Re: [PATCH] upload-pack: allow stateless client EOF just prior to haves

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Oct 30, 2020, 02:59 UTC
Message-ID
<CAPig+cTOkd248WKh5KyVfScRf8fqcOQPj4V3waGQ3XWEcugiKg@mail.gmail.com>
In-Reply-To
<1604022059-18527-1-git-send-email-dan@mutual.io>
On Thu, Oct 29, 2020 at 9:51 PM Daniel Duvall <dan@mutual.io> wrote:
Show 16 quoted lines
> [...]
> Instead, upload-pack should gently peek for an EOF between the sending
> of shallow/unshallow lines (followed by flush) and the reading of client
> haves. If the client has hung up at this point, exit normally.
>
> Signed-off-by: Daniel Duvall <dan@mutual.io>
> ---
> diff --git a/t/t9904-upload-pack-stateless-timely-eof.sh b/t/t9904-upload-pack-stateless-timely-eof.sh
> @@ -0,0 +1,24 @@
> +#!/bin/sh
> +
> +test_description='stateless upload-pack gently handles EOF just after want/shallow/depth/flush'
> +
> +. ./test-lib.sh
> +
> +D=$(pwd)

What is the purpose of this assignment? It doesn't seem to be used anywhere in this script.

Show 16 quoted lines
> +test_expect_success 'upload-pack outputs flush and exits ok' '
> +       test_commit initial &&
> +       head=$(git rev-parse HEAD) &&
> +       hexsz=$(test_oid hexsz) &&
> +
> +       printf "%04xwant %s\n%04xshallow %s\n000ddeepen 1\n0000" \
> +               $(($hexsz + 10)) $head $(($hexsz + 13)) $head >request &&
> +
> +       git upload-pack --stateless-rpc "$(pwd)" <request >actual &&
> +
> +       printf "0000" >expect &&
> +
> +       test_cmp expect actual
> +'
> +
> +test_done
Previous: Daniel DuvallNext: Daniel Duvall
Message 2 of 18 in “upload-pack: allow stateless client EOF just prior to haves”
  1. upload-pack: allow stateless client EOF just prior to havesDaniel Duvall, Oct 30, 2020
  2. Eric SunshineOct 30, 2020
  3. Daniel DuvallOct 30, 2020
  4. upload-pack: allow stateless client EOF just prior to havesDaniel Duvall, Oct 30, 2020
  5. Junio C HamanoOct 30, 2020
  6. Daniel DuvallOct 30, 2020
  7. Jeff KingOct 30, 2020
  8. Daniel DuvallOct 30, 2020
  9. Jeff KingOct 30, 2020
  10. Junio C HamanoNov 3, 2020
  11. Jeff KingNov 4, 2020
  12. Daniel DuvallNov 4, 2020
  13. Junio C HamanoNov 4, 2020
  14. upload-pack: allow stateless client EOF just prior to havesDaniel Duvall, Oct 30, 2020
  15. Junio C HamanoOct 30, 2020
  16. Daniel DuvallOct 31, 2020
  17. Junio C HamanoOct 31, 2020
  18. upload-pack: allow stateless client EOF just prior to havesDaniel Duvall, Oct 31, 2020

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.