On Mon, 9 Jul 2007, René Scharfe wrote: > Daniel Barkalow schrieb: > > On Sun, 8 Jul 2007, Junio C Hamano wrote: > > > >> Are _identifiers with leading underscore Kosher thing to do, I > >> wonder... We do have ones with trailing ones (mostly qsort > >> functions) and I think they are done that way for the sake of > >> standards conformance. > > > > I'm not sure; I inherited that bit of code from Julian. Do we have a > > standard idiom for a function that sets a bunch of static variables? > > You could put all flags and settings into a struct fetch_pack_args. > > You could then go one step further by exporting the struct definition > and letting the internal interface take a pointer to such a struct, > thereby getting rid of static variables and their setup routine. This code is going to get an extensive refactor at some point (I'd like to get to the point where git-fetch uses only a single connection), but that's a much bigger patch, and I want to get builtin-fetch done with minimal changes to other code; passing configuration through to everywhere that uses it would add a lot of noise at this stage. Passing a pointer to a struct instead of a pile of ints in hopefully the right order is probably a worthwhile improvement to reviewability, though, so I'll try that much this evening. -Daniel *This .sig left intentionally blank*