git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 7/9] Export create_branch() from builtin-branch.c

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Feb 5, 2008, 20:39 UTC
Message-ID
<alpine.LNX.1.00.0802042139170.13593@iabervon.org>
In-Reply-To
<alpine.LSU.1.00.0802050136440.8543@racer.site>
On Tue, 5 Feb 2008, Johannes Schindelin wrote:
Show 15 quoted lines
> Hi,
> 
> On Mon, 4 Feb 2008, Daniel Barkalow wrote:
> 
> > You can also create branches, in exactly the same way, with checkout -b.
> > 
> > Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
> > ---
> >  builtin-branch.c |    4 ++--
> >  cache.h          |    4 ++++
> 
> Note that builtin-branch.c is not part of libgit.a, so you are only moving 
> the declaration into the "libgit" part.
> 
> Maybe it would be better to move this function, say, into refs.c?

I think it's actually time to start a branch.{c,h} library file for operations that deal with the porcelain-ish information about branches. This would go there, and a function to discard MERGE_HEAD and similar files (whatever they are, which isn't currently collected anywhere authoritative). Probably also most of the other stuff that should be shared between reset and checkout, too, and functions should probably migrate there from builtin-branch and builtin-checkout as they become needed, leaving the builtin-* code as command-line parsing and calls to these functions. In any case, I'll start with this.

	-Daniel
*This .sig left intentionally blank*
Previous: Johannes Schindelin
Message 3 of 3 in “Export create_branch() from builtin-branch.c”
  1. 7/9 Export create_branch() from builtin-branch.cDaniel Barkalow, Feb 4, 2008
  2. Johannes SchindelinFeb 5, 2008
  3. Daniel BarkalowFeb 5, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.