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

Re: [PATCH v2] fetch: remove fetch_if_missing=0

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Nov 5, 2019, 20:06 UTC
Message-ID
<CAPig+cQ6iyJacniLDF_kuc1FhPMXYmL3V1DzdOPa6bX0h2FHFA@mail.gmail.com>
In-Reply-To
<20191105185619.207173-1-jonathantanmy@google.com>
On Tue, Nov 5, 2019 at 1:56 PM Jonathan Tan <jonathantanmy@google.com> wrote:
Show 6 quoted lines
> diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh
> @@ -296,6 +296,76 @@ test_expect_success 'partial clone with unresolvable sparse filter fails cleanly
> +setup_triangle () {
> +       rm -rf big-blob.txt server client promisor-remote &&
> +
> +       printf "line %d\n" $(test_seq 1 100) >big-blob.txt
Broken &&-chain.
Show 22 quoted lines
> +       # Create a server with 2 commits: a commit with a big blob and a child
> +       # commit with an incremental change. Also, create a partial clone
> +       # client that only contains the first commit.
> +       git init server &&
> +       git -C server config --local uploadpack.allowfilter 1 &&
> +       cp big-blob.txt server &&
> +       git -C server add big-blob.txt &&
> +       git -C server commit -m "initial" &&
> +       git clone --bare --filter=tree:0 "file://$(pwd)/server" client &&
> +       echo another line >>server/big-blob.txt &&
> +       git -C server commit -am "append line to big blob" &&
> +
> +       # Create a promisor remote that only contains the blob from the first
> +       # commit, and set it as the promisor remote of client. Thus, whenever
> +       # the client lazy fetches, the lazy fetch will succeed only if it is
> +       # for this blob.
> +       git init promisor-remote &&
> +       test_commit -C promisor-remote one && # so that ref advertisement is not empty
> +       git -C promisor-remote config --local uploadpack.allowanysha1inwant 1 &&
> +       git -C promisor-remote hash-object -w --stdin <big-blob.txt &&
> +       git -C client remote set-url origin "file://$(pwd)/promisor-remote"
> +}
Previous: Jonathan TanNext: Junio C Hamano
Message 9 of 12 in “fetch: remove fetch_if_missing=0”
  1. fetch: remove fetch_if_missing=0Jonathan Tan, Nov 1, 2019
  2. Jonathan NiederNov 1, 2019
  3. Junio C HamanoNov 2, 2019
  4. Eric SunshineNov 2, 2019
  5. Junio C HamanoNov 2, 2019
  6. Jonathan TanNov 5, 2019
  7. Jonathan NiederNov 5, 2019
  8. fetch: remove fetch_if_missing=0Jonathan Tan, Nov 5, 2019
  9. Eric SunshineNov 5, 2019
  10. Junio C HamanoNov 6, 2019
  11. Junio C HamanoNov 8, 2019
  12. Junio C HamanoNov 8, 2019

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.