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

Re: [PATCH] log --children

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Oct 4, 2011, 20:27 UTC
Message-ID
<4E8B6C4F.1090507@drmicha.warpmail.net>
In-Reply-To
<7vpqicbj8w.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 04.10.2011 22:21:
Show 20 quoted lines
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
>>> @@ -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.
> 
I didn't think --parents would switch on rewriting, but I guess all is good:

git rev-list -5 --parents --children origin/next fatal: cannot combine --parents and --children

Should be the same for log.
Michael
Previous: Junio C HamanoNext: Jay Soffian
Message 4 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.