git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Daniel Duvall <dan@mutual.io>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH] upload-pack: allow stateless client EOF just prior to haves
Date: Thu, 29 Oct 2020 20:31:14 -0700	[thread overview]
Message-ID: <CANo+1gvybEMEhQV2OWD8q3B9s=ztnJi_bFKo0eVVWwDRbYmAEA@mail.gmail.com> (raw)
In-Reply-To: <CAPig+cTOkd248WKh5KyVfScRf8fqcOQPj4V3waGQ3XWEcugiKg@mail.gmail.com>

On Thu, Oct 29, 2020 at 8:00 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
>
> On Thu, Oct 29, 2020 at 9:51 PM Daniel Duvall <dan@mutual.io> wrote:
> > [...]
> > 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.

It's an artifact of my copying/pasting a previous test script as a
template. I didn't see it used in that script either, so I assumed it
was needed somewhere in the test libs. If that's not the case, I can
definitely remove it.

>
> > +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

  reply	other threads:[~2020-10-30  3:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30  1:40 [PATCH] upload-pack: allow stateless client EOF just prior to haves Daniel Duvall
2020-10-30  2:59 ` Eric Sunshine
2020-10-30  3:31   ` Daniel Duvall [this message]
2020-10-30  3:43 ` Daniel Duvall
2020-10-30 18:42   ` Junio C Hamano
2020-10-30 22:38     ` Daniel Duvall
2020-10-30  4:40 ` Jeff King
2020-10-30  7:47   ` Daniel Duvall
2020-10-30  9:09     ` Jeff King
2020-11-03 21:10       ` Junio C Hamano
2020-11-04 13:33         ` Jeff King
2020-11-04 14:06           ` Daniel Duvall
2020-11-04 18:25             ` Junio C Hamano
2020-10-30 22:35 ` [PATCH v2] " Daniel Duvall
2020-10-30 23:45   ` Junio C Hamano
2020-10-31  2:42     ` Daniel Duvall
2020-10-31  4:17       ` Junio C Hamano
2020-10-31  2:39 ` [PATCH v3] " Daniel Duvall

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='CANo+1gvybEMEhQV2OWD8q3B9s=ztnJi_bFKo0eVVWwDRbYmAEA@mail.gmail.com' \
    --to=dan@mutual.io \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    /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).