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

Re: [PATCH] log --children

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 4, 2011, 20:21 UTC
Message-ID
<7vpqicbj8w.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4E8B68AC.7020009@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
Show 10 quoted lines
>> @@ -414,6 +422,8 @@ void show_log(struct rev_info *opt)
>>  		fputs(find_unique_abbrev(commit->object.sha1, abbrev_commit), stdout);
>>  		if (opt->print_parents)
>>  			show_parents(commit, abbrev_commit);
>> +		if (opt->children.name)
>> +			show_children(opt, commit, abbrev_commit);
>
> That means that "log --children --parents" will print out the parents'
> sha1s, then the children's. Is that a good default format, or should we
> somehow deal with the case when both are specified?

I think these two options are muturally exclusive, not because of the "mixed output getting confusing" reasons but because of traversal reasons. IIRC, when parent rewriting is in effect, you cannot just say "a commit that has these commits on its parents list is a child of these commits", as you have to orphan and adopt it as a child of ancestor commits, which the code introduced in f35f5603 does not do.

Previous: Michael J GruberNext: Michael J Gruber
Message 3 of 6 in “log --children”
  1. log --childrenJay Soffian, Oct 4, 2011
  2. Michael J GruberOct 4, 2011
  3. Junio C HamanoOct 4, 2011
  4. Michael J GruberOct 4, 2011
  5. log --childrenJay Soffian, Oct 4, 2011
  6. Michael J GruberOct 4, 2011

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.