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

Re: Re: [PATCH v3 4/4] implement automatic fast-forward merge for submodules

From
Heiko Voigt <hvoigt@hvoigt.net>
Date
Jul 7, 2010, 17:11 UTC
Message-ID
<20100707171059.GA44073@book.hvoigt.net>
In-Reply-To
<7vwrt7w7qq.fsf@alter.siamese.dyndns.org>
On Wed, Jul 07, 2010 at 09:56:45AM -0700, Junio C Hamano wrote:
Show 24 quoted lines
> Heiko Voigt <hvoigt@hvoigt.net> writes:
> 
> > diff --git a/submodule.c b/submodule.c
> > index 61cb6e2..9bc4b80 100644
> > --- a/submodule.c
> > +++ b/submodule.c
> > @@ -6,6 +6,7 @@
> >  #include "revision.h"
> >  #include "run-command.h"
> >  #include "diffcore.h"
> > +#include "refs.h"
> >  
> >  static int add_submodule_odb(const char *path)
> >  {
> > @@ -218,3 +219,164 @@ unsigned is_submodule_modified(const char *path, int ignore_untracked)
> > ...
> > +	while ((commit = get_revision(&revs)) != NULL) {
> > +		struct object *o = &(commit->object);
> > +		if (in_merge_bases(b, &commit, 1)) {
> > +			add_object_array(o, NULL, &merges);
> > +		}
> 
> Unnecessary braces around a single statement.  I've fixed some other style
> violations to this file while replacing the topic branch.

True, that must be a leftover from development. I will check that out once you pushed the new pu.

Show 11 quoted lines
> > ...
> > +static void print_commit(struct commit *commit)
> > +{
> > +	struct strbuf sb = STRBUF_INIT;
> > +	struct pretty_print_context ctx = {0};
> > +	ctx.date_mode = DATE_NORMAL;
> > +	format_commit_message(commit, " %h: %m %s", &sb, &ctx);
> > +	fprintf(stderr, "%s\n", sb.buf);
> > +}
> 
> strbuf_release(&sb)???
Definitely, thanks for catching that.
cheers Heiko
Previous: Junio C Hamano
Message 7 of 7 in “implement automatic submodule merge strategy when possible”
  1. 0/4 implement automatic submodule merge strategy when possibleHeiko Voigt, Jul 7, 2010
  2. 1/4 add missing && to submodule-merge testcaseHeiko Voigt, Jul 7, 2010
  3. 2/4 teach ref iteration module about submodulesHeiko Voigt, Jul 7, 2010
  4. 3/4 setup_revisions(): allow walking history in a submoduleHeiko Voigt, Jul 7, 2010
  5. 4/4 implement automatic fast-forward merge for submodulesHeiko Voigt, Jul 7, 2010
  6. Junio C HamanoJul 7, 2010
  7. Heiko VoigtJul 7, 2010

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.