Re: [PATCH] Add git-bundle: move objects and references by archive
- From
Mark Levedahl <mdl123@verizon.net>
- Date
- Feb 23, 2007, 02:32 UTC
- Message-ID
- <45DE5259.6090502@verizon.net>
- In-Reply-To
- <7v8xeqllxk.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 18 quoted lines
>> diff --git a/Documentation/cmd-list.perl b/Documentation/cmd-list.perl >> index a2d6268..f61c77a 100755 >> --- a/Documentation/cmd-list.perl >> +++ b/Documentation/cmd-list.perl >> @@ -70,6 +70,7 @@ git-archive mainporcelain >> git-bisect mainporcelain >> git-blame ancillaryinterrogators >> git-branch mainporcelain >> +git-bundle mainporcelain >> git-cat-file plumbinginterrogators >> git-checkout-index plumbingmanipulators >> git-checkout mainporcelain >> > > Is this really a mainporcelain? > I would say ancillarymanipulators (or perhaps synchelpers). > >
git bundle has four commands: create, verify, list-heads, and unbundle. The last two are pure helper functions, basically plumbing. Verify is questionable as to where it lies. But, create is the only way to create a bundle, is logically equivalent to git push as a user command to move data, so I called it mainporcelain because that is how git push is classified.
Show 17 quoted lines
>> + /* write prerequisites */ >> + memcpy(argv_boundary + 2, argv + 1, argc * sizeof(const char *)); >> + argv_boundary[0] = "rev-list"; >> + argv_boundary[1] = "--boundary"; >> + argv_boundary[argc + 1] = NULL; >> + out = -1; >> + pid = fork_with_pipe(argv_boundary, NULL, &out); >> + if (pid < 0) >> + return -1; >> + while ((i = read_string(out, buffer, sizeof(buffer))) > 0) >> + if (buffer[0] == '-') >> + write(bundle_fd, buffer, i); >> > > It would be helpful for the recipient if you can append output > from git-describe (or name-rev) when the buffer lacks "name". >
I found the actual commit summary message (i.e., git-rev-list --pretty=one --max-count=1 sha1) the most useful of the various summaries available.
Mark