From: Jonathan Nieder <jrnieder@gmail.com>
To: Dmitry Ivankov <divanorama@gmail.com>
Cc: git@vger.kernel.org, "Shawn O. Pearce" <spearce@spearce.org>,
David Barr <davidbarr@google.com>
Subject: Re: [PATCH 3/3] fast-import: rename object_count to pack_object_count
Date: Sun, 18 Sep 2011 16:40:10 -0500 [thread overview]
Message-ID: <20110918214010.GK2308@elie> (raw)
In-Reply-To: <CA+gfSn8aOWPm=xmTE9WzuXsQY0EfYypFxRAyVb-x3_kmhNUb-Q@mail.gmail.com>
Dmitry Ivankov wrote:
> --- a/fast-import.c
> +++ b/fast-import.c
[...]
> @@ -310,8 +309,16 @@ static unsigned int atom_cnt;
> static struct atom_str **atom_table;
>
> /* The .pack file being generated */
> +/*
> + * objects that are being written to the current pack
> + * all *must* have current pack_id in struct object_entry.
> + * And object_count *must* be a count of object_entry's
> + * having current pack_id. This data is used to create
> + * index file once current pack_file is finished.
> + */
> static struct pack_idx_option pack_idx_opts;
> static unsigned int pack_id;
> +static unsigned long object_count;
> static struct sha1file *pack_file;
Closer. Now I am tempted to nitpick and say that this should be
a single comment, formatted in complete sentences, and written to
be descriptive rather than normative when possible (since norms
will inevitably change over time, and future readers should not
have an excuse to be afraid to adjust the comment to match code
changes).
/*
* The .pack file being generated
*
* Objects that are being written to the current pack store the
* current value of "pack_id" in struct object_entry.
* "object_count" counts the object_entrys with the current
* pack_id. These values are used to create the pack index
* file when the current pack is finished.
*/
static struct pack_idx_option pack_idx_opts;
static unsigned int pack_id;
...
prev parent reply other threads:[~2011-09-18 21:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-18 19:01 [PATCH 0/3] fast-import: fix pack_id corner cases Dmitry Ivankov
2011-09-18 19:01 ` [PATCH 1/3] fast-import: die if we produce too many (MAX_PACK_ID) packs Dmitry Ivankov
2011-09-18 19:17 ` Jonathan Nieder
2011-09-18 19:01 ` [PATCH 2/3] fast-import: fix corner case for checkpoint Dmitry Ivankov
2011-09-18 19:28 ` Jonathan Nieder
2011-09-18 19:01 ` [PATCH 3/3] fast-import: rename object_count to pack_object_count Dmitry Ivankov
2011-09-18 19:32 ` Jonathan Nieder
2011-09-18 19:51 ` Dmitry Ivankov
2011-09-18 21:40 ` Jonathan Nieder [this message]
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=20110918214010.GK2308@elie \
--to=jrnieder@gmail.com \
--cc=davidbarr@google.com \
--cc=divanorama@gmail.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/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).