{"thread":{"id":"76","subject":"Re: [PATCH] libgit","startedAt":"2005-04-17T07:30:28Z","lastAt":"2005-04-17T08:08:51Z","messageCount":2,"participants":["Brad Roberts","Mike Taht"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"453","messageId":"Pine.LNX.4.44.0504170027500.2625-100000@bellevue.puremagic.com","threadId":"76","inReplyTo":null,"subject":"Re: [PATCH] libgit","fromName":"Brad Roberts","fromEmail":"braddr@puremagic.com","sentAt":"2005-04-17T07:30:28Z","receivedAt":"2005-04-17T07:30:28Z","isPatch":true,"sender":{"key":"braddr@puremagic.com","avatar":null},"body":"> Converted git to libgit. Moved all the main() calls into a single\n> multi-call binary - git-main.\n> Made extern a bunch of functions that were static. Verified it at least\n> still minimally worked.\n> Note: this is only a first step towards creating a generic library.\n> Figuring out what functions and variables *truly* need to be exported,\n> renaming them to a git_<function> api, making it thread safe\n> ... and not least of all, keeping up with everybody working out of the\n> base tree... are problems that remain. Also - cleaning up the UI.\n\nWhy do all that static and main rearrangement?  It would be a lot simpler\nand cleaner to simply rename the main's in place and add the new\ndispatcher by itself.\n\nLater,\nBrad\n\n"},{"id":"455","messageId":"42621993.10800@timesys.com","threadId":"76","inReplyTo":"Pine.LNX.4.44.0504170027500.2625-100000@bellevue.puremagic.com","subject":"Re: [PATCH] libgit","fromName":"Mike Taht","fromEmail":"mike.taht@timesys.com","sentAt":"2005-04-17T08:08:51Z","receivedAt":"2005-04-17T08:08:51Z","isPatch":true,"sender":{"key":"mike.taht@timesys.com","avatar":null},"body":"Brad Roberts wrote:\n>>Converted git to libgit. Moved all the main() calls into a single\n>>multi-call binary - git-main.\n>>Made extern a bunch of functions that were static. Verified it at least\n>>still minimally worked.\n>>Note: this is only a first step towards creating a generic library.\n>>Figuring out what functions and variables *truly* need to be exported,\n>>renaming them to a git_<function> api, making it thread safe\n>>... and not least of all, keeping up with everybody working out of the\n>>base tree... are problems that remain. Also - cleaning up the UI.\n> \n> \n> Why do all that static and main rearrangement?  It would be a lot simpler\n> and cleaner to simply rename the main's in place and add the new\n> dispatcher by itself.\n\n0) I like multi-call binaries.\n\n1) I wanted to get a first pass at what functions needed to be exported, \nand pulling out the mains was the fastest way to see what might be  needed.\n\n2) Agreed, about half of git-main.c needs to move back into the \nlibraries, but that depends on deciding on the API for the formentioned \nfunctions... and leaving the mains parsing argv in the library itself \nseemed silly. So I moved them out. See 1)\n\nIn particular gotta chose the prefix itself git_<function> or \ncg_<_function> or cogito_<function>. I lean towards git_ myself - \nit'short and unique-looking, though I haven't verified that\n\nWhen the useful to export functions are clearly identified they have to \nbecome named thus.\n\n3) I'd really like to commonalize the UI and use longopts for the \nargument parsing. Linus indicated a preference for a certain argument \norder, longopts doesn't do that.\n\n4) Like to make git thread safe (and ultimately, thread using - parallel \ndiff, merge, fsck) and that means eliminating the globals, where \nappropriate. I've been thinking through the issues there (how about \n(GIT_THREAD)->some_variable and (GIT-GLOBAL)->some_variable where those \ndefine out when threads are disabled? Etc. There needs to be a git_init \nthat does things like correctly and universally setting up the defaults, \nand atexit, etc, file locking needs to fixed...\n\n5) I wanted to get something that still compiled, worked, and out for \ncomment before I went to bed. :)\n\nmy current plan is to break out git.h back into it's subject \n\"update-cache.h\" etc, move all that into include/git, turn git.h into a \nmaster lazy man's include, come up with a scheme for the globals, get \nsome sort of thread cleanliness and take a crack at making it shared.\n\nand now to bed. All: Feel free to implement any of that....\n\n> \n> Later,\n> Brad\n> \n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n\n-- \n\nMike Taht\n\n\n   \"If you wait long enough, it will go away... after having done its \ndamage.\nIf it was bad, it will be back.\"\n"}]}