From: Junio C Hamano <junkio@cox.net>
To: Dana How <danahow@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 5/8] get-repack --max-pack-size: write_object() takes 'limit' arg
Date: Sun, 08 Apr 2007 17:03:35 -0700 [thread overview]
Message-ID: <7v4pnq8ld4.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <46197994.70009@gmail.com> (Dana How's message of "Sun, 08 Apr 2007 16:24:04 -0700")
Dana How <danahow@gmail.com> writes:
> Accept new 'limit' argument and check against it
> before each group of writes. Update delta usability rules
> for possibility of delta base being in a previously-
> written pack. Inline sha1write_compressed() so we know
> the exact size of the written data when it needs to be compressed.
>
> Signed-off-by: Dana How <how@deathvalley.cswitch.com>
My first reaction of open-coding sha1write_compressed() was
"Ugh", but as you are removing the only user of that function,
maybe this is not as bad as it looks.
> @@ -407,6 +408,10 @@ static off_t write_object(struct sha1file *f,
> if (revalidate_loose_object(entry, map, mapsize))
> die("corrupt loose object %s",
> sha1_to_hex(entry->sha1));
> + if ( limit && mapsize + 20 >= limit ) {
> + munmap(map, mapsize);
> + return 0;
> + }
Our coding style guideline is similar to that of the kernel. No
SP after '(' or before ')' in conditionals.
next prev parent reply other threads:[~2007-04-09 0:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-08 23:24 [PATCH 5/8] get-repack --max-pack-size: write_object() takes 'limit' arg Dana How
2007-04-09 0:03 ` Junio C Hamano [this message]
2007-04-09 0:15 ` Junio C Hamano
2007-04-09 2:28 ` Nicolas Pitre
2007-04-09 0:40 ` Nicolas Pitre
2007-04-09 18:51 ` Dana How
2007-04-09 18:59 ` Nicolas Pitre
2007-04-09 19:20 ` Dana How
2007-04-09 19:25 ` Nicolas Pitre
2007-04-09 20:09 ` 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=7v4pnq8ld4.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=danahow@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.