From: Heiko Voigt Date: Tue, 23 Aug 2011 19:45:21 GMT Subject: Re: [PATCH v4 1/2] push: Don't push a repository with unpushed submodules Message-ID: <20110823194521.GB57187@book.hvoigt.net> In-Reply-To: <7vd3fxulw8.fsf@alter.siamese.dyndns.org> On Mon, Aug 22, 2011 at 03:22:31PM -0700, Junio C Hamano wrote: > Heiko Voigt writes: > > > Junio since you are one person listed in the api docs could you maybe > > quickly explain to me what this flag is used for? > > It is used in order to avoid walking the object we have walked already. > > Which in turn means that once you walk chain of objects, unless you > remember the ones you walked and clear the marks after you are done, you > cannot walk the object chain for unrelated purposes. See how functions > like get_merge_bases_many() walk portions of graph for their own purpose > and then avoid disrupting others by calling clear_commit_marks(). The use > of TMP_MARK (and its clearing after the function is done with the marked > objects) in remove_duplicate_parents() serve the same purpose. Thanks I will have look at those places and try to cook up something. Cheers Heiko