From mboxrd@z Thu Jan 1 00:00:00 1970 From: konglu@minatec.inpg.fr Subject: Re: [PATCHv6 4/4] status: better advices when splitting a commit (during rebase -i) Date: Tue, 05 Jun 2012 11:13:07 +0200 Message-ID: <20120605111307.Horde.-xsEEHwdC4BPzc2jJ-GgdjA@webmail.minatec.grenoble-inp.fr> References: <1338477344-15940-1-git-send-email-Lucien.Kong@ensimag.imag.fr> <1338748217-16440-1-git-send-email-Lucien.Kong@ensimag.imag.fr> <1338748217-16440-4-git-send-email-Lucien.Kong@ensimag.imag.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed DelSp=Yes Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Kong Lucien , git@vger.kernel.org, Duperray Valentin , Jonas Franck , Nguy Thomas , Nguyen Huynh Khoi Nguyen , Moy Matthieu To: Phil Hord X-From: git-owner@vger.kernel.org Tue Jun 05 11:13:17 2012 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 1SbppC-00035n-Ua for gcvg-git-2@plane.gmane.org; Tue, 05 Jun 2012 11:13:15 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752721Ab2FEJNL convert rfc822-to-quoted-printable (ORCPT ); Tue, 5 Jun 2012 05:13:11 -0400 Received: from v-smtp.minatec.grenoble-inp.fr ([147.173.216.28]:57500 "EHLO v-smtp.minatec.grenoble-inp.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752494Ab2FEJNK (ORCPT ); Tue, 5 Jun 2012 05:13:10 -0400 Received: from localhost (www02.minatec.grenoble-inp.fr [147.173.216.15]) by v-smtp.minatec.grenoble-inp.fr (Postfix) with ESMTP id 734F81A02DB; Tue, 5 Jun 2012 11:13:07 +0200 (CEST) Received: from wifi-030006.grenet.fr (wifi-030006.grenet.fr [130.190.30.6]) by webmail.minatec.grenoble-inp.fr (Horde Framework) with HTTP; Tue, 05 Jun 2012 11:13:07 +0200 In-Reply-To: User-Agent: Internet Messaging Program (IMP) H4 (5.0.17) Content-Disposition: inline Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Phil Hord a =E9crit=A0: > On Sun, Jun 3, 2012 at 2:30 PM, Kong Lucien =20 > wrote: >> Add new informative help messages at the output of 'git status' when >> the user is splitting a commit. The code figures this state by >> comparing the contents of the following files in the .git/ directory= : >> =A0 =A0 =A0 =A0 =A0- HEAD >> =A0 =A0 =A0 =A0 =A0- ORIG_HEAD >> =A0 =A0 =A0 =A0 =A0- rebase-merge/amend >> =A0 =A0 =A0 =A0 =A0- rebase-merge/orig-head >> >> Signed-off-by: Kong Lucien >> Signed-off-by: Duperray Valentin >> Signed-off-by: Jonas Franck >> Signed-off-by: Nguy Thomas >> Signed-off-by: Nguyen Huynh Khoi Nguyen =20 >> >> Signed-off-by: Moy Matthieu >> --- >> The second test added by this patch fails because the case in which >> the user amend the last commit through rebase -i is not taken care o= f. >> We infer that the user would directly run "git commit --amend" inste= ad >> of amending it with a rebase -i. > > > Maybe this is safe and logical for most workflows, or maybe this is a > convenience that makes this patch possible (I did not read the patch > yet). But I know that I sometimes use rebase-i instead of > commit--amend because I did not realize the patch I am fixing is the > most recent one until after continuing, or because the patch I am > amending was moved into the most-recent position during the rebase-i > itself. Right, This case has to be taken care of. It will need some work as it's quite difficult to distinguish the current state after doing a reset HEAD^ or doing a commit --amend when the rebase-merge/amend is set on the last commit.