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