All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Matheus Tavares Bernardino <matheus.bernardino@usp.br>
Cc: git <git@vger.kernel.org>, Jeff Hostetler <git@jeffhostetler.com>
Subject: Re: [PATCH] pkt-line: do not report packet write errors twice
Date: Thu, 15 Apr 2021 13:32:14 -0700	[thread overview]
Message-ID: <xmqqlf9jp9v5.fsf@gitster.g> (raw)
In-Reply-To: <CAHd-oW4sqJpeJywgRJCkchX0uZFSxD-UnguRJcRcQQywd+scbA@mail.gmail.com> (Matheus Tavares Bernardino's message of "Thu, 15 Apr 2021 17:24:52 -0300")

Matheus Tavares Bernardino <matheus.bernardino@usp.br> writes:

> Nice! :) Maybe we could also avoid the static strings without
> repeating the literals by making `do_packet_write()` receive a `struct
> strbuf *err` and save the error message in it? Then the two callers
> can decide whether to pass it to error() or die() accordingly.

Sorry, but I do not understand what benefit we are trying to gain by
introducing an extra strbuf (which I assume is used to strbuf_add()
the error message into).  Wouldn't the caller need two messages and
flip between <error,error_errno> vs <die,die_errno> pair?



  reply	other threads:[~2021-04-15 20:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15 19:10 [PATCH] pkt-line: do not report packet write errors twice Matheus Tavares
2021-04-15 20:06 ` Junio C Hamano
2021-04-15 20:24   ` Matheus Tavares Bernardino
2021-04-15 20:32     ` Junio C Hamano [this message]
2021-04-15 20:48       ` Matheus Tavares
2021-04-15 20:56         ` Junio C Hamano
2021-04-15 21:57 ` [PATCH v2] " Matheus Tavares
2021-04-15 21:59   ` 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=xmqqlf9jp9v5.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@jeffhostetler.com \
    --cc=git@vger.kernel.org \
    --cc=matheus.bernardino@usp.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 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.