Subject: [PATCH/RFC 0/3] add GIT_TRACE_STDIN

From: Jeff King <[email-masked]>
Date: Tue, 16 Jun 2015 15:31:02 -0400

On Tue, Jun 16, 2015 at 01:23:31PM -0400, Augie Fackler wrote:

> > I guess there is really room for both. Just because you _can_ accomplish
> > the same thing with both does not mean we cannot have two ways to do it
> > (an easy way, and a harder, more flexible way).
> 
> *nod* that might make the most sense - given that we both seem to have
> use cases in mind for verbatim packs on pulls, that seems like a good
> thing to have easy to deploy.

My ulterior motive is that I actually already have a similar thing in
place _just_ for pack-objects, and I'd like to get rid of my custom
hack. :)

In that case it is not about saving the packfile, but rather saving the
parameters to create it (I was interested in finding out why git was
spending so much CPU to serve some particular requests, and being able
to run the same pack-generation repeatedly is helpful).

Here are the patches I came up with:

  [1/3]: trace: implement %p placeholder for filenames
  [2/3]: trace: add pid to each output line
  [3/3]: trace: add GIT_TRACE_STDIN

They apply on top of the TRACE_PACKFILE patches, only because they also
need the new trace_verbatim(). But I am not altogether happy with the
result; see the comments I'll add to 3/3.

-Peff