Re: [PATCH 2/2] pkt-line: show packets in async processes as "sideband"

2015-09-01 Thread Jeff King
On Tue, Sep 01, 2015 at 03:31:41PM -0700, Stefan Beller wrote: > > Ah, right, I think I misunderstood Junio's question. Yes, if we start > > calling cmd_fetch() from inside the threads, things may get confusing. > > > > I'll see how painful the thread storage approach would be. > > I think that m

Re: [PATCH 2/2] pkt-line: show packets in async processes as "sideband"

2015-09-01 Thread Stefan Beller
On Tue, Sep 1, 2015 at 3:26 PM, Jeff King wrote: > On Tue, Sep 01, 2015 at 03:23:06PM -0700, Stefan Beller wrote: > >> > Hmm, does Stefan's thread-pool thing interact with this decision in >> > any way? >> >> I do not plan to actually fetch from inside the thread pool, but each thread >> is just a

Re: [PATCH 2/2] pkt-line: show packets in async processes as "sideband"

2015-09-01 Thread Jeff King
On Tue, Sep 01, 2015 at 03:23:06PM -0700, Stefan Beller wrote: > > Hmm, does Stefan's thread-pool thing interact with this decision in > > any way? > > I do not plan to actually fetch from inside the thread pool, but each thread > is just a proxy for starting a new process doing the fetch and get

Re: [PATCH 2/2] pkt-line: show packets in async processes as "sideband"

2015-09-01 Thread Jeff King
On Tue, Sep 01, 2015 at 03:13:25PM -0700, Junio C Hamano wrote: > > So instead, let us just assume that any async process is > > handling sideband data. That's always true now, and is > > likely to remain so in the future. > > Hmm, does Stefan's thread-pool thing interact with this decision in >

Re: [PATCH 2/2] pkt-line: show packets in async processes as "sideband"

2015-09-01 Thread Stefan Beller
On Tue, Sep 1, 2015 at 3:13 PM, Junio C Hamano wrote: > Jeff King writes: > >> What we really need is thread-local storage for >> packet_trace_identity. But the async code does not provide >> an interface for that, and it would be messy to add it here >> (we'd have to care about pthreads, initial

Re: [PATCH 2/2] pkt-line: show packets in async processes as "sideband"

2015-09-01 Thread Junio C Hamano
Jeff King writes: > What we really need is thread-local storage for > packet_trace_identity. But the async code does not provide > an interface for that, and it would be messy to add it here > (we'd have to care about pthreads, initializing our > pthread_key_t ahead of time, etc). True. > So in

[PATCH 2/2] pkt-line: show packets in async processes as "sideband"

2015-09-01 Thread Jeff King
If you run "GIT_TRACE_PACKET=1 git push", you may get confusing output like (line prefixes omitted for clarity): packet: push< \1000eunpack ok0019ok refs/heads/master packet: push< unpack ok packet: push< ok refs/heads/master packet: push< packet: p