All of lore.kernel.org
 help / color / mirror / Atom feed
From: Justin Tobler <jltobler@gmail.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] object-file: return error on index-pack abnormal exit
Date: Thu, 5 Nov 2026 12:06:47 -0600	[thread overview]
Message-ID: <auzC7sZ95tL-5Axv@denethor> (raw)
In-Reply-To: <auyhIvMHLomMQrPm@pks.im>

On 26/11/05 04:30PM, Patrick Steinhardt wrote:
> On Tue, Nov 03, 2026 at 03:24:10PM -0600, Justin Tobler wrote:
> > When git-index-pack(1) exits abnormally after reporting the packfile
> > name, `odb_transaction_files_write_pack()` records an error message in
> > `err_msg` but still returns success. Current callers ultimately discard
> > the return value, so this does not cause any issues at present, but the
> > return value should still reflect the failure.
> 
> Is this a theoretical concern or does git-index-pack(1) perform any
> important steps after reporting the packfile name? I think we should of
> course respect errors in either case, but I wonder whether this is a bug
> fix or whether it's a simple cleanup.

This is a theoretical concern. If `read_index_pack_report()` returned
success and finish_command() returned an error,
`odb_transaction_files_write_pack()` would append an error message but
return 0. This isn't really the correct behavior. In this case though,
it doesn't cause any bugs because the return value is ultimately
discarded by its callers.

-Justin

  reply	other threads:[~2026-11-05 18:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 21:24 [PATCH 0/2] object-file: small error handling follow-ups Justin Tobler
2026-11-03 21:24 ` [PATCH 1/2] object-file: warn on failed unlink Justin Tobler
2026-11-04 23:00   ` Junio C Hamano
2026-11-03 21:24 ` [PATCH 2/2] object-file: return error on index-pack abnormal exit Justin Tobler
2026-11-04 23:06   ` Junio C Hamano
2026-11-05 18:09     ` Justin Tobler
2026-11-10  9:04     ` Kaartic Sivaraam
2026-11-10 16:43       ` Junio C Hamano
2026-11-10 17:57         ` Kaartic Sivaraam
2026-11-10 19:25           ` Justin Tobler
2026-11-05 15:30   ` Patrick Steinhardt
2026-11-05 18:06     ` Justin Tobler [this message]
2026-11-04 13:37 ` [PATCH 0/2] object-file: small error handling follow-ups Karthik Nayak

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=auzC7sZ95tL-5Axv@denethor \
    --to=jltobler@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    /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.