From: Elia Pinto <gitter.spiros@gmail.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH 8/8] one ugly test to verify basic functionality
Date: Fri, 5 Feb 2016 12:57:53 +0100 [thread overview]
Message-ID: <CA+EOSBnZVuHThXLg9+VftPVaKy5wqqxp=iQtP1ZUtxkKq32HMQ@mail.gmail.com> (raw)
In-Reply-To: <1454662677-15137-9-git-send-email-pclouds@gmail.com>
2016-02-05 9:57 GMT+01:00 Nguyễn Thái Ngọc Duy <pclouds@gmail.com>:
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
> t/t5544-fetch-resume.sh (new +x) | 42 ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
> create mode 100755 t/t5544-fetch-resume.sh
>
> diff --git a/t/t5544-fetch-resume.sh b/t/t5544-fetch-resume.sh
> new file mode 100755
> index 0000000..dfa033d
> --- /dev/null
> +++ b/t/t5544-fetch-resume.sh
> @@ -0,0 +1,42 @@
> +#!/bin/sh
> +
> +test_description='what'
> +
> +. ./test-lib.sh
> +
> +test_expect_success 'what' '
> + test_commit one &&
> + git clone --no-local .git abc &&
> + (
> + cd abc &&
> + mv `ls .git/objects/pack/*.pack` pack &&
No, please. From the git coding guideline : "We prefer $( ... ) for
command substitution; unlike ``, it properly nests.
It should have been the way Bourne spelled it from day one, but
unfortunately isn't."
http://stackoverflow.com/questions/4708549/whats-the-difference-between-command-and-command-in-shell-programming
Thank you
> + git unpack-objects < pack &&
> + rm pack &&
> + git fsck
> + ) &&
> + test_commit two &&
> + test_commit three &&
> + (
> + cd abc &&
> + git fetch --resume-pack=foo origin HEAD &&
> + git log --format=%s origin/master >actual &&
> + echo one >expected &&
> + test_cmp expected actual &&
> + rm .git/FETCH_HEAD &&
> + mv `ls .git/objects/pack/*.pack` pack &&
> + head -c 123 pack >tmp &&
> + git fetch --resume-pack=tmp origin &&
> + test_path_is_missing tmp &&
> + cmp pack .git/objects/pack/*.pack &&
> + git fsck &&
> + git log --format=%s origin/master >actual &&
> + cat >expected <<EOF &&
> +three
> +two
> +one
> +EOF
> + test_cmp expected actual
> + )
> +'
> +
> +test_done
> --
> 2.7.0.377.g4cd97dd
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-02-05 11:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 8:57 [PATCH 0/8] Resumable clone revisited, proof of concept Nguyễn Thái Ngọc Duy
2016-02-05 8:57 ` [PATCH 1/8] pack-objects: add --skip and --skip-hash Nguyễn Thái Ngọc Duy
2016-02-05 9:20 ` Johannes Schindelin
2016-02-05 8:57 ` [PATCH 2/8] pack-objects: produce a stable pack when --skip is given Nguyễn Thái Ngọc Duy
2016-02-05 18:43 ` Junio C Hamano
2016-02-05 23:25 ` Duy Nguyen
2016-02-06 0:48 ` Junio C Hamano
2016-02-08 5:23 ` Duy Nguyen
2016-02-05 8:57 ` [PATCH 3/8] index-pack: add --append-pack=<path> Nguyễn Thái Ngọc Duy
2016-02-05 8:57 ` [PATCH 4/8] upload-pack: new capability to pass --skip* to pack-objects Nguyễn Thái Ngọc Duy
2016-02-05 9:18 ` Johannes Schindelin
2016-02-05 8:57 ` [PATCH 5/8] fetch-pack.c: send "skip" line " Nguyễn Thái Ngọc Duy
2016-02-07 8:57 ` Eric Sunshine
2016-02-05 8:57 ` [PATCH 6/8] fetch: add --resume-pack=<path> Nguyễn Thái Ngọc Duy
2016-02-05 8:57 ` [PATCH 7/8] index-pack: --append-pack implies --strict Nguyễn Thái Ngọc Duy
2016-02-07 9:02 ` Eric Sunshine
2016-02-05 8:57 ` [PATCH 8/8] one ugly test to verify basic functionality Nguyễn Thái Ngọc Duy
2016-02-05 11:57 ` Elia Pinto [this message]
2016-02-05 13:02 ` Duy Nguyen
2016-02-05 13:33 ` Elia Pinto
2016-02-05 13:20 ` Johannes Schindelin
2016-02-05 13:38 ` Elia Pinto
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='CA+EOSBnZVuHThXLg9+VftPVaKy5wqqxp=iQtP1ZUtxkKq32HMQ@mail.gmail.com' \
--to=gitter.spiros@gmail.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.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).