On Fri, Aug 5, 2016 at 10:31 AM, Lars Schneider
wrote:
>
>> On 04 Aug 2016, at 18:14, Junio C Hamano wrote:
>>
>> signature would look more like write(2) and deserve to be called
>> packet_write() but unfortunately the name is taken by what should
>> have called packet_fmt() or something, but tha
> On 04 Aug 2016, at 18:14, Junio C Hamano wrote:
>
> Jeff King writes:
>
>> The cost of write() may vary on other platforms, but the cost of memcpy
>> generally shouldn't. So I'm inclined to say that it is not really worth
>> micro-optimizing the interface.
>>
>> I think the other issue is t
Lars Schneider writes:
> However, besides the bogus performance argument I introduced that function
> to allow packet writs to fail using the `gentle` parameter:
> http://public-inbox.org/git/D116610C-F33A-43DA-A49D-0B33958822E5%40gmail.com/
>
> Would you be OK if I introduce packet_write_gently(
> On 04 Aug 2016, at 18:14, Junio C Hamano wrote:
>
> Jeff King writes:
>
>> The cost of write() may vary on other platforms, but the cost of memcpy
>> generally shouldn't. So I'm inclined to say that it is not really worth
>> micro-optimizing the interface.
>>
>> I think the other issue is t
Jeff King writes:
> The cost of write() may vary on other platforms, but the cost of memcpy
> generally shouldn't. So I'm inclined to say that it is not really worth
> micro-optimizing the interface.
>
> I think the other issue is that format_packet() only lets you send
> string data via "%s", so
> On 03 Aug 2016, at 22:18, Junio C Hamano wrote:
>
> larsxschnei...@gmail.com writes:
>
>> From: Lars Schneider
>>
>> set_packet_header() converts an integer to a 4 byte hex string. Make
>> this function locally available so that other pkt-line functions can
>> use it.
>
> Didn't I say that
On Wed, Aug 03, 2016 at 05:12:21PM -0400, Jeff King wrote:
> The alternative is to hand-code it, which is what send_sideband() does
> (it uses xsnprintf("%04x") to do the hex formatting, though).
After seeing that, I wondered why we need set_packet_header() at all.
But we do for the case when we
On Wed, Aug 03, 2016 at 01:18:55PM -0700, Junio C Hamano wrote:
> larsxschnei...@gmail.com writes:
>
> > From: Lars Schneider
> >
> > set_packet_header() converts an integer to a 4 byte hex string. Make
> > this function locally available so that other pkt-line functions can
> > use it.
>
> Did
larsxschnei...@gmail.com writes:
> From: Lars Schneider
>
> set_packet_header() converts an integer to a 4 byte hex string. Make
> this function locally available so that other pkt-line functions can
> use it.
Didn't I say that this is a bad idea already in an earlier review?
The only reason wh
From: Lars Schneider
set_packet_header() converts an integer to a 4 byte hex string. Make
this function locally available so that other pkt-line functions can
use it.
Signed-off-by: Lars Schneider
---
pkt-line.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --
10 matches
Mail list logo