On Wed, Jan 26, 2011 at 08:45:12AM +0700, Nguyen Thai Ngoc Duy wrote: > > A few days ago I was tracing something or other and decided that these > > extra lines are annoying. > > > > Patch 1 moves this code from trace.c to git.c, to contain its impact > > to a single translation unit (that is, it let me experiment without > > touching cache.h after that). > > > > Patch 2 removes the repo-setup tracing code, introducing a > > test-repo-setup helper to take its place in the repo setup tests. > > > > Patch 3 does some cleaning up made possible by patch 2. > > > > Thoughts? > > I'm fine with this. Although long term maybe we should support pattern > matching or category selection in GIT_TRACE. Yeah. I recently was peeking at the git protocol, and I wrote some nice-ish packet-tracing support. I triggered it via: GIT_TRACE=$whatever GIT_TRACE_PACKET=1 git push ... So you have to turn on tracing (to whatever destination you want) and then turn on packet tracing with a bool. In retrospect, probably GIT_TRACE_* should take the same type of location parameter as GIT_TRACE, so you can get whatever subset of trace going to wherever you like. And then the repo setup code can just go into GIT_TRACE_SETUP or something. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html