From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-5.6 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 6ABCB205C9 for ; Mon, 2 Jan 2017 14:51:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751523AbdABOvU (ORCPT ); Mon, 2 Jan 2017 09:51:20 -0500 Received: from mout.gmx.net ([212.227.17.22]:51869 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750875AbdABOvT (ORCPT ); Mon, 2 Jan 2017 09:51:19 -0500 Received: from virtualbox ([37.24.141.236]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LtJ5T-1cUPpY10zj-012tPa; Mon, 02 Jan 2017 15:51:07 +0100 Date: Mon, 2 Jan 2017 15:51:04 +0100 (CET) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: Junio C Hamano cc: git@vger.kernel.org, Kevin Daudt , Dennis Kaarsemaker Subject: Re: [PATCH v2 20/34] sequencer (rebase -i): copy commit notes at end In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Provags-ID: V03:K0:50OLj88Mdfm6j8cZsCYlGlw01P/R5GC/d+Uec9R9941iToP1x2b qH5docDM++pn2j/39FvUBbMISAPUuB4EPg5rS1W3WZ5tdvIdPYBeYWMEjLypbIMP0JYZidw IQH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oerIODqA0UqHi3T7w9qL3 oWD26bnLDAdAWYyBYhjgD9GTDaGUxomdcoh+D49QUTr0mGKUGEjZNAf7Jz65I0zUdNNot59/n Fxg5isTJg+OF+rU8ylUFse4= Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Junio, On Fri, 16 Dec 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > @@ -1750,6 +1797,17 @@ static int is_final_fixup(struct todo_list *todo_list) > > return 1; > > } > > > > +static enum todo_command peek_command(struct todo_list *todo_list, int offset) > > +{ > > + int i; > > + > > + for (i = todo_list->current + offset; i < todo_list->nr; i++) > > + if (todo_list->items[i].command != TODO_NOOP) > > + return todo_list->items[i].command; > > Makes me wonder, after having commented on 07/34 regarding the fact > that in the end you would end up having three variants of no-op > (i.e. NOOP, DROP and COMMENT), what definition of a "command" this > function uses to return its result, when asked to "peek". Well, it uses the todo_command idea of a "command"... ;-) The only thing we do with this for now is to look whether the next command is a fixup/squash (so that the user gets to edit the commit message just once, for example, and also to record rewritten commits properly). > I suspect that this will be updated in a later patch to do "< TODO_NOOP" > instead? Actually, no. I introduced a new function is_noop() and that is used now. Ciao, Dscho