From: Linus Torvalds Subject: Re: [PATCH] rev-list: add "--full-objects" flag. Date: Mon, 11 Jul 2005 21:48:40 -0700 (PDT) Message-ID: References: <20050703234629.GF13848@pasky.ji.cz> <7vk6k2sfa4.fsf@assigned-by-dhcp.cox.net> <20050707221443.GB7151@pasky.ji.cz> <7vll4ifbq8.fsf_-_@assigned-by-dhcp.cox.net> <7vfyuqfa6r.fsf_-_@assigned-by-dhcp.cox.net> <7vvf3mds9c.fsf_-_@assigned-by-dhcp.cox.net> <7vy88ica8e.fsf@assigned-by-dhcp.cox.net> , git@vger.kernel.org X-From: git-owner@vger.kernel.org Tue Jul 12 06:49:10 2005 Return-path: Received: from vger.kernel.org ([12.107.209.244]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DsChQ-0000CZ-CG for gcvg-git@gmane.org; Tue, 12 Jul 2005 06:48:52 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262341AbVGLEsr (ORCPT ); Tue, 12 Jul 2005 00:48:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262357AbVGLEsr (ORCPT ); Tue, 12 Jul 2005 00:48:47 -0400 Received: from smtp.osdl.org ([65.172.181.4]:4511 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S262341AbVGLEsq (ORCPT ); Tue, 12 Jul 2005 00:48:46 -0400 Received: from shell0.pdx.osdl.net (fw.osdl.org [65.172.181.6]) by smtp.osdl.org (8.12.8/8.12.8) with ESMTP id j6C4mfjA022561 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 11 Jul 2005 21:48:41 -0700 Received: from localhost (shell0.pdx.osdl.net [10.9.0.31]) by shell0.pdx.osdl.net (8.13.1/8.11.6) with ESMTP id j6C4mewM022423; Mon, 11 Jul 2005 21:48:41 -0700 To: "Eric W. Biederman" In-Reply-To: X-Spam-Status: No, hits=0 required=5 tests= X-Spam-Checker-Version: SpamAssassin 2.63-osdl_revision__1.40__ X-MIMEDefang-Filter: osdl$Revision: 1.113 $ X-Scanned-By: MIMEDefang 2.36 Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org On Mon, 11 Jul 2005, Eric W. Biederman wrote: > > Looking closer it appears that commit_list_insert is recursive > and that is what I missed. Actually, it's "pop_most_recent_commit()" that ends up being the "recursive" part: it will pop the top-most entry, but as it is popping it it will push the parents of that entry onto the same list. So basically, you can get a list of all history by first inserting the top entry, and then doing "pop_most_recent_commit()" until the list is empty. Now, git-rev-list ends up being slightly more complex than that, since it has support for multiple starting points, and marking commits (and thus their parents) uninteresting, and two other sorting methods in addition to the default "by date" thing. And then there's all the issues about tags, trees and blobs, and their visibility as a function of the commits that are visible and the command line arguments.. In fact, it turns out that git-rev-list is really the real heart of "git". Almost everything else revolves around it. Once you grok git-rev-list, you probably really grok git. Linus