git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/5] pack-check.c: minor formatting fix to match coding style

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 30, 2009, 11:05 UTC
Message-ID
<1233313517-24208-2-git-send-email-gitster@pobox.com>
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
Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 10 in “fsck updates”
  1. 0/5 fsck updatesJunio C Hamano, Jan 30, 2009
  2. 1/5 pack-check.c: minor formatting fix to match coding styleJunio C Hamano, Jan 30, 2009
  3. 2/5 verify_pack(): allow a quicker verification for a pack with version 2 idxJunio C Hamano, Jan 30, 2009
  4. 3/5 verify-pack: add --quickJunio C Hamano, Jan 30, 2009
  5. 4/5 fsck: three levels of validationJunio C Hamano, Jan 30, 2009
  6. 5/5 [squash] fsck: revert --quick to the default and introduce --mediumJunio C Hamano, Jan 30, 2009
  7. Kjetil BarvikJan 30, 2009
  8. Nanako ShiraishiJan 31, 2009
  9. Marius Storm-OlsenJan 31, 2009
  10. Nanako ShiraishiFeb 1, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.