From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthieu Moy Subject: Re: [PATCH/RFCv2 1/2] git-rebase -i: add command "drop" to remove a commit Date: Mon, 01 Jun 2015 20:36:01 +0200 Message-ID: References: <1433152643-4292-1-git-send-email-remi.galan-alfonso@ensimag.grenoble-inp.fr> <1433152643-4292-2-git-send-email-remi.galan-alfonso@ensimag.grenoble-inp.fr> <563732680.250935.1433180720935.JavaMail.zimbra@ensimag.grenoble-inp.fr> Mime-Version: 1.0 Content-Type: text/plain Cc: Junio C Hamano , Git List , Remi Lespinet , Guillaume Pages , Louis-Alexandre Stuber , Antoine Delaite , Johannes Schindelin , Stefan Beller , Philip Oakley , Eric Sunshine , Stephen Kelly To: Remi Galan Alfonso X-From: git-owner@vger.kernel.org Mon Jun 01 20:36:28 2015 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YzUZY-0004nD-5a for gcvg-git-2@plane.gmane.org; Mon, 01 Jun 2015 20:36:28 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753808AbbFASgT (ORCPT ); Mon, 1 Jun 2015 14:36:19 -0400 Received: from mx1.imag.fr ([129.88.30.5]:60148 "EHLO shiva.imag.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753744AbbFASgP (ORCPT ); Mon, 1 Jun 2015 14:36:15 -0400 Received: from clopinette.imag.fr (clopinette.imag.fr [129.88.34.215]) by shiva.imag.fr (8.13.8/8.13.8) with ESMTP id t51Ia0G6000964 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 1 Jun 2015 20:36:00 +0200 Received: from anie.imag.fr (anie.imag.fr [129.88.7.32]) by clopinette.imag.fr (8.13.8/8.13.8) with ESMTP id t51Ia15L025241; Mon, 1 Jun 2015 20:36:01 +0200 In-Reply-To: <563732680.250935.1433180720935.JavaMail.zimbra@ensimag.grenoble-inp.fr> (Remi Galan Alfonso's message of "Mon, 1 Jun 2015 19:45:20 +0200 (CEST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (shiva.imag.fr [129.88.30.5]); Mon, 01 Jun 2015 20:36:01 +0200 (CEST) X-IMAG-MailScanner-Information: Please contact MI2S MIM for more information X-MailScanner-ID: t51Ia0G6000964 X-IMAG-MailScanner: Found to be clean X-IMAG-MailScanner-SpamCheck: X-IMAG-MailScanner-From: matthieu.moy@grenoble-inp.fr MailScanner-NULL-Check: 1433788564.47305@8zH7STcYX0Ibi6SNsUDzlA Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Remi Galan Alfonso writes: > Junio C Hamano writes: >> Is this sufficient? > >> If you are going to do something in 2/2 that relies on the format of >> this line being correct (as opposed to "noop" or "#" that can have >> any garbage on the remainder of the line), wouldn't you want to at >> least check $sha1 is sensible? > > That's also something that I was wondering, I wrote about it in the > 0/2 part of this patch, I wanted some opinion about it. Ideally, I think we should do a sanity check before starting the rebase, and error out if we encounter an invalid command, a command that should be followed by a valid sha1 and does not, ... But currently, we do the verification while applying commands, and I don't think there's anything really helpful to do if we encounter a "drop this-is-not-a-sha1" command. So, IMHO, why not do this check, but I'm not sure it will actually help much. -- Matthieu Moy http://www-verimag.imag.fr/~moy/