From: Junio C Hamano <junkio@cox.net>
To: Bruno Ribas <ribas@c3sl.ufpr.br>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] Added use of xmalloc() on diff-delta.c
Date: Wed, 04 Apr 2007 12:22:40 -0700 [thread overview]
Message-ID: <7vejn02bcv.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <11757126093105-git-send-email-ribas@c3sl.ufpr.br> (Bruno Ribas's message of "Wed, 4 Apr 2007 15:50:08 -0300")
These two functions, create_delta_index() and create_delta(),
are already nicely libified. They allow the caller to deal with
oom condition. The caller may die(), or it may decide to
continue its operation with reduced functionality without using
delta data. A good example of this is found a few lines after
the lines the second patch touches. When create_delta() cannot
find memory to work with, the entire function returns 0, saying
"sorry, cannot deltify these two", which would cause the object
stored without deltification.
These patches take that nice property away, making libification
more difficult, which is the downside. Is there an upside?
If anything, I suspect that the part that calls die() you
touched in the second patch could return NULL.
next prev parent reply other threads:[~2007-04-04 19:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-04 18:50 [PATCH 1/2] Added use of xmalloc() on diff-delta.c Bruno Ribas
2007-04-04 18:50 ` [PATCH 2/2] Removed NULL check on builtin-pack-objects.c from create_delta_index() as it just checks for Out of Memory Bruno Ribas
2007-04-04 19:22 ` Junio C Hamano [this message]
2007-04-04 22:31 ` [PATCH 1/2] Added use of xmalloc() on diff-delta.c Linus Torvalds
2007-04-05 5:14 ` 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=7vejn02bcv.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=ribas@c3sl.ufpr.br \
/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