From: karthik nayak <karthik.188@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git List <git@vger.kernel.org>, Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v10 0/4] cat-file: add support for "-allow-unknown-type"
Date: Mon, 04 May 2015 19:00:32 +0530 [thread overview]
Message-ID: <55477478.9010406@gmail.com> (raw)
In-Reply-To: <xmqqvbg9td0x.fsf@gitster.dls.corp.google.com>
On 05/04/2015 05:44 AM, Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Hmmmm... you do not seem to pass your own test.
>>
>> expecting success:
>> echo $bogus_type >expect &&
>> git cat-file -t --allow-unknown-type $bogus_sha1 >actual &&
>> test_cmp expect actual
>>
>> --- expect 2015-05-04 00:09:24.327335512 +0000
>> +++ actual 2015-05-04 00:09:24.335335473 +0000
>> @@ -1 +1 @@
>> -abcdefghijklmnopqrstuvwxyz1234679
>> +abcdefghijklmnopqrstuvwxyz123467abcdefghijklmnopqrstuvwxyz1234679
>> not ok 86 - Type of broken object is correct when type is large
>
> Perhaps it would have a better chance of being correct with this
> squashed in.
>
> -- >8 --
> [PATCH] fixup! sha1_file: support reading from a loose object of unknown type
>
> ---
> sha1_file.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/sha1_file.c b/sha1_file.c
> index f65bf90..e010e7c 100644
> --- a/sha1_file.c
> +++ b/sha1_file.c
> @@ -1568,7 +1568,6 @@ static int unpack_sha1_header_to_strbuf(git_zstream *stream, unsigned char *map,
> unsigned long mapsize, void *buffer,
> unsigned long bufsiz, struct strbuf *header)
> {
> - unsigned char *cp;
> int status;
>
> status = unpack_sha1_header(stream, map, mapsize, buffer, bufsiz);
> @@ -1579,7 +1578,6 @@ static int unpack_sha1_header_to_strbuf(git_zstream *stream, unsigned char *map,
> if (memchr(buffer, '\0', stream->next_out - (unsigned char *)buffer))
> return 0;
>
> - strbuf_add(header, buffer, stream->next_out - (unsigned char *)buffer);
Ok this works, weird, I test before sending patches, anyways getting to
the point of discussion, shouldn't we have add the buf, since we did
inflate once, before doing inflate again?
> do {
> status = git_inflate(stream, 0);
> strbuf_add(header, buffer, stream->next_out - (unsigned char *)buffer);
>
next prev parent reply other threads:[~2015-05-04 13:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-03 14:28 [PATCH v10 0/4] cat-file: add support for "-allow-unknown-type" karthik nayak
2015-05-03 14:29 ` [PATCH v10 1/4] sha1_file: support reading from a loose object of unknown type Karthik Nayak
2015-05-03 14:30 ` [PATCH v10 2/4] cat-file: make the options mutually exclusive Karthik Nayak
2015-05-03 14:30 ` [PATCH v10 3/4] cat-file: teach cat-file a '--allow-unknown-type' option Karthik Nayak
2015-05-05 1:29 ` Eric Sunshine
2015-05-03 14:30 ` [PATCH v10 4/4] t1006: add tests for git cat-file --allow-unknown-type Karthik Nayak
2015-05-05 1:33 ` Eric Sunshine
2015-05-05 2:23 ` karthik nayak
2015-05-06 4:37 ` Junio C Hamano
2015-05-04 23:34 ` [PATCH v10 1/4] sha1_file: support reading from a loose object of unknown type Eric Sunshine
2015-05-05 2:21 ` karthik nayak
2015-05-04 0:10 ` [PATCH v10 0/4] cat-file: add support for "-allow-unknown-type" Junio C Hamano
2015-05-04 0:14 ` Junio C Hamano
2015-05-04 2:55 ` Eric Sunshine
2015-05-04 3:30 ` Eric Sunshine
2015-05-04 13:31 ` karthik nayak
2015-05-06 13:37 ` karthik nayak
2015-05-06 17:16 ` Junio C Hamano
2015-05-07 3:34 ` Karthik Nayak
2015-05-07 18:35 ` Junio C Hamano
2015-05-04 13:30 ` karthik nayak [this message]
2015-05-04 20:57 ` Junio C Hamano
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=55477478.9010406@gmail.com \
--to=karthik.188@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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.
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).