From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH 1/5] pack-check.c: minor formatting fix to match coding style
Date: Fri, 30 Jan 2009 03:05:13 -0800 [thread overview]
Message-ID: <1233313517-24208-2-git-send-email-gitster@pobox.com> (raw)
In-Reply-To: <1233313517-24208-1-git-send-email-gitster@pobox.com>
Adjust misaligned columns and multi-line comments that violate our coding
style before touching this file.
Also fix an obvious typo.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
pack-check.c | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/pack-check.c b/pack-check.c
index 90c33b1..2c5f521 100644
--- a/pack-check.c
+++ b/pack-check.c
@@ -4,7 +4,7 @@
struct idx_entry
{
- off_t offset;
+ off_t offset;
const unsigned char *sha1;
unsigned int nr;
};
@@ -43,7 +43,7 @@ int check_pack_crc(struct packed_git *p, struct pack_window **w_curs,
}
static int verify_packfile(struct packed_git *p,
- struct pack_window **w_curs)
+ struct pack_window **w_curs)
{
off_t index_size = p->index_size;
const unsigned char *index_base = p->index_data;
@@ -54,7 +54,8 @@ static int verify_packfile(struct packed_git *p,
int err = 0;
struct idx_entry *entries;
- /* Note that the pack header checks are actually performed by
+ /*
+ * Note that the pack header checks are actually performed by
* use_pack when it first opens the pack file. If anything
* goes wrong during those checks then the call will die out
* immediately.
@@ -72,21 +73,23 @@ static int verify_packfile(struct packed_git *p,
git_SHA1_Final(sha1, &ctx);
pack_sig = use_pack(p, w_curs, pack_sig_ofs, NULL);
if (hashcmp(sha1, pack_sig))
- err = error("%s SHA1 checksum mismatch",
- p->pack_name);
+ err = error("%s SHA1 checksum mismatch", p->pack_name);
if (hashcmp(index_base + index_size - 40, pack_sig))
- err = error("%s SHA1 does not match its inddex",
- p->pack_name);
+ err = error("%s SHA1 does not match its index", p->pack_name);
unuse_pack(w_curs);
- /* Make sure everything reachable from idx is valid. Since we
+ /*
+ * Make sure everything reachable from idx is valid. Since we
* have verified that nr_objects matches between idx and pack,
* we do not do scan-streaming check on the pack file.
*/
nr_objects = p->num_objects;
entries = xmalloc((nr_objects + 1) * sizeof(*entries));
entries[nr_objects].offset = pack_sig_ofs;
- /* first sort entries by pack offset, since unpacking them is more efficient that way */
+ /*
+ * First sort entries by pack offset, since unpacking them is more
+ * efficient that way.
+ */
for (i = 0; i < nr_objects; i++) {
entries[i].sha1 = nth_packed_object_sha1(p, i);
if (!entries[i].sha1)
--
1.6.1.2.312.g5be3c
next prev parent reply other threads:[~2009-01-30 11:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-30 11:05 [PATCH 0/5] fsck updates Junio C Hamano
2009-01-30 11:05 ` Junio C Hamano [this message]
2009-01-30 11:05 ` [PATCH 2/5] verify_pack(): allow a quicker verification for a pack with version 2 idx Junio C Hamano
2009-01-30 11:05 ` [PATCH 3/5] verify-pack: add --quick Junio C Hamano
2009-01-30 11:05 ` [PATCH 4/5] fsck: three levels of validation Junio C Hamano
2009-01-30 11:05 ` [PATCH 5/5] [squash] fsck: revert --quick to the default and introduce --medium Junio C Hamano
2009-01-30 11:37 ` Kjetil Barvik
2009-01-31 21:45 ` [PATCH 1/5] pack-check.c: minor formatting fix to match coding style Nanako Shiraishi
2009-01-31 22:00 ` Marius Storm-Olsen
2009-02-01 0:52 ` Nanako Shiraishi
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=1233313517-24208-2-git-send-email-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.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).