From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.176.0/21 X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 From: Carl Worth Subject: Re: What's in git.git (stable) Date: Fri, 15 Dec 2006 14:54:30 -0800 Message-ID: <87odq44vo9.wl%cworth@cworth.org> References: <7v4przfpir.fsf@assigned-by-dhcp.cox.net> <200612142255.33564.andyparkins@gmail.com> <7vk60uyrau.fsf@assigned-by-dhcp.cox.net> <200612150858.25988.andyparkins@gmail.com> <7vmz5oomdf.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_Dec_15_14:54:18_2006-1"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit NNTP-Posting-Date: Fri, 15 Dec 2006 22:55:48 +0000 (UTC) Cc: Andy Parkins , git@vger.kernel.org Return-path: Envelope-to: gcvg-git@gmane.org In-Reply-To: <7vmz5oomdf.fsf@assigned-by-dhcp.cox.net> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/21.4 Mule/5.0 (SAKAKI) Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Received: from vger.kernel.org ([209.132.176.167]) by dough.gmane.org with esmtp (Exim 4.50) id 1GvLxy-0005cL-5w for gcvg-git@gmane.org; Fri, 15 Dec 2006 23:55:46 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030324AbWLOWzn (ORCPT ); Fri, 15 Dec 2006 17:55:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030329AbWLOWzn (ORCPT ); Fri, 15 Dec 2006 17:55:43 -0500 Received: from cworth.org ([217.160.249.188]:41959 "EHLO theworths.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1030324AbWLOWzl (ORCPT ); Fri, 15 Dec 2006 17:55:41 -0500 Received: (qmail 31793 invoked from network); 15 Dec 2006 17:55:40 -0500 Received: from localhost (HELO raht.cworth.org) (127.0.0.1) by localhost with SMTP; 15 Dec 2006 17:55:40 -0500 To: Junio C Hamano Sender: git-owner@vger.kernel.org --pgp-sign-Multipart_Fri_Dec_15_14:54:18_2006-1 Content-Type: text/plain; charset=US-ASCII > The 'can of worms' is that switching to an existing branch could > fail with conflicts. One fix for this would be the idea I've proposed to have a new flag for "git checkout" to 'stash' the dirty state in the current branch before switching. Then, there wouldn't be a problem to implement "commit -b " on top of the stashing checkout. I think the only real problem with the idea of having dirty changes stashed in a branch is that git already allows dirty changes to be carried while switching to a branch, (with or without -m). And doing both of those at once would lead to an ugly new conflict situation, (where _neither_ of the conflicted states exist as exposed tree objects). Even if there were no conflict, it would mingle two different sets of local modifications, and that could be unkind as it might be hard for the user to separate them if they didn't want them mingled. If someone were to pursue this idea, I think it would be reasonable to just make that case an error, "Cannot carry local modifications when checking out a branch with stashed modifications." That message could even suggest the user use the stash option to leave the local modifications behind when doing the checkout. -Carl --pgp-sign-Multipart_Fri_Dec_15_14:54:18_2006-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBFgyel6JDdNq8qSWgRAkhSAJ9jrm+xHJKHNYpP/RgLXOprANCjXgCfQd5/ 7Kk3k/XhRBTBxyRTTI31lTQ= =Wpg2 -----END PGP SIGNATURE-----