From: Christian Couder <chriscool@tuxfamily.org>
To: Nelson Elhage <nelhage@ksplice.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] index-pack: Don't follow replace refs.
Date: Thu, 12 Aug 2010 05:17:53 +0200 [thread overview]
Message-ID: <201008120517.53874.chriscool@tuxfamily.org> (raw)
In-Reply-To: <1281401149-23141-1-git-send-email-nelhage@ksplice.com>
On Tuesday 10 August 2010 02:45:49 Nelson Elhage wrote:
> Without this, attempting to index a pack containing objects that have been
> replaced results in a fatal error that looks like:
>
> fatal: SHA1 COLLISION FOUND WITH <replaced-object> !
I think it is a good patch except for a nit pick below.
> Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
> ---
> builtin/index-pack.c | 2 ++
> t/t6050-replace.sh | 6 ++++++
> 2 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/builtin/index-pack.c b/builtin/index-pack.c
> index a89ae83..fad76bf 100644
> --- a/builtin/index-pack.c
> +++ b/builtin/index-pack.c
> @@ -884,6 +884,8 @@ int cmd_index_pack(int argc, const char **argv, const
> char *prefix) if (argc == 2 && !strcmp(argv[1], "-h"))
> usage(index_pack_usage);
>
> + read_replace_refs = 0;
> +
> /*
> * We wish to read the repository's config file if any, and
> * for that it is necessary to call setup_git_directory_gently().
> diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
> index 203ffdb..b5635a7 100755
> --- a/t/t6050-replace.sh
> +++ b/t/t6050-replace.sh
> @@ -219,6 +219,12 @@ test_expect_success 'bisect and replacements' '
> git bisect reset
> '
>
> +test_expect_success 'index-pack and replacements' '
> + git --no-replace-objects rev-list --objects HEAD | \
> + git --no-replace-objects pack-objects test-
Maybe you could add "&&" at the end of the above line to make sure that an
error in the commands is caught.
So, for what it's worth, if the above is fixed:
Acked-by: Christian Couder <chriscool@tuxfamily.org>
> + git index-pack test-*.pack
> +'
> +
> #
> #
> test_done
Thanks,
Christian.
next prev parent reply other threads:[~2010-08-12 3:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-10 0:45 [PATCH] index-pack: Don't follow replace refs Nelson Elhage
2010-08-12 3:17 ` Christian Couder [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-08-12 14:18 Nelson Elhage
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201008120517.53874.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=nelhage@ksplice.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.
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 NNTP newsgroup(s).