From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carl Worth Subject: Comments on "status -v" (was: Two crazy proposals for changing git's diff commands) Date: Fri, 10 Feb 2006 12:32:10 -0800 Message-ID: <87u0b7uf91.wl%cworth@cworth.org> References: <87slqtcr2f.wl%cworth@cworth.org> <7vfymtl43b.fsf@assigned-by-dhcp.cox.net> <7vmzgzy46f.fsf@assigned-by-dhcp.cox.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Fri_Feb_10_12:32:10_2006-1"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Cc: Linus Torvalds , git@vger.kernel.org X-From: git-owner@vger.kernel.org Fri Feb 10 21:33:21 2006 Return-path: Received: from vger.kernel.org ([209.132.176.167]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1F7exE-00087R-00 for ; Fri, 10 Feb 2006 21:33:20 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932180AbWBJUdH (ORCPT ); Fri, 10 Feb 2006 15:33:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932181AbWBJUdH (ORCPT ); Fri, 10 Feb 2006 15:33:07 -0500 Received: from theworths.org ([217.160.253.102]:51363 "EHLO theworths.org") by vger.kernel.org with ESMTP id S932180AbWBJUdF (ORCPT ); Fri, 10 Feb 2006 15:33:05 -0500 Received: (qmail 4664 invoked from network); 10 Feb 2006 15:33:04 -0500 Received: from localhost (HELO raht.localdomain) (127.0.0.1) by localhost with SMTP; 10 Feb 2006 15:33:04 -0500 To: Junio C Hamano In-Reply-To: <7vmzgzy46f.fsf@assigned-by-dhcp.cox.net> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/21.4 Mule/5.0 (SAKAKI) Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: --pgp-sign-Multipart_Fri_Feb_10_12:32:10_2006-1 Content-Type: text/plain; charset=US-ASCII On Fri, 10 Feb 2006 01:05:28 -0800, Junio C Hamano wrote: > > Linus Torvalds writes: > > > Under that logic, "git status -v" would show all the diffs (not just > > filenames) and "git commit -v .." would be the same as "git commit .." but > > the "-v" flag would have been passed down to the "git status" call, so the > > commit message file would be pre-populated with the diff. > > Now that is done and sitting at the tip of "next". Thanks. This does look quite useful. A couple of comments, though: 1) I think the patch should come after the traditional status summary, not before. If something is obviously "wrong" (non-updated file, etc.) that will be more obvious in the summary, so it's good to present that up front, and not bury it after the patch, (which might make it initially invisible without scrolling). 2) Using the "^---$" separator to separate the the edited contents into a commit message and ignored content seems risky to me. One risk is that the user might put that magic string in the commit message. Perhaps the risk is low, but it would be a silent destruction of historical data, which seems like a bad trap. A second risk is that with the current patch-then-summary order it is actually quite easy to inadvertently clobber the separator while editing the commit message. Particularly because the separator is placed exactly where the user must begin editing. So it would be easy to leave the separator trailing on a line of commit message comments or else introducing some initial whitespace that would break it. Moving the patch after the summary (as discussed above) would help greatly in avoiding the clobbered separator, but wouldn't address the separator-appears-in-commit-message problem. -Carl --pgp-sign-Multipart_Fri_Feb_10_12:32:10_2006-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBD7PhK6JDdNq8qSWgRAkYfAJ9myu4WnTkMDWccgjAOJZM+9CjwZwCeOcR6 HCikd845ycUyZj+Mnfcc9xk= =cZ6y -----END PGP SIGNATURE----- --pgp-sign-Multipart_Fri_Feb_10_12:32:10_2006-1--