On 26/09/15 12:40AM, Karthik Nayak wrote:
Justin Tobler [off-list ref] writes:
quoted
@@ -1260,6 +1260,7 @@ static int odb_transaction_files_commit(struct odb_transaction *base)
{
struct odb_transaction_files *transaction =
container_of(base, struct odb_transaction_files, base);
+ int have_packfile = !!transaction->packfile.f;
if (transaction->objdir) {
struct strbuf temp_path = STRBUF_INIT;@@ -1293,6 +1294,9 @@ static int odb_transaction_files_commit(struct odb_transaction *base)
flush_packfile_transaction(transaction);
Earlier this would unconditionally call `odb_reprepare()` within, now we
only call if needed. Which makes sense. Would it also make sense to only
call `flush_packfile_transaction(transaction)` if we have a packfile?
`flush_packfile_transaction()` already returns early if there is nothing
to do. We could make it more explicit here, but I think it is probably
fine to leave it as-is.
-Justin