From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carl Worth Subject: Re: [PATCH] Detached HEAD (experimental) Date: Mon, 08 Jan 2007 17:15:57 -0800 Message-ID: <87d55pyp82.wl%cworth@cworth.org> References: <7vac11yirf.fsf@assigned-by-dhcp.cox.net> <87ps9xgkjo.wl%cworth@cworth.org> <7virfprquo.fsf@assigned-by-dhcp.cox.net> <87odphgfzz.wl%cworth@cworth.org> <7vbql9ydd7.fsf@assigned-by-dhcp.cox.net> <20070108131735.GA2647@coredump.intra.peff.net> <7vzm8tt5kf.fsf@assigned-by-dhcp.cox.net> <87fyalyqqz.wl%cworth@cworth.org> <7v7ivxt3ft.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_Mon_Jan__8_17:15:56_2007-1"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Cc: git@vger.kernel.org X-From: git-owner@vger.kernel.org Tue Jan 09 02:18:13 2007 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1H45cv-0005SR-PB for gcvg-git@gmane.org; Tue, 09 Jan 2007 02:18:10 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750879AbXAIBRx (ORCPT ); Mon, 8 Jan 2007 20:17:53 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750882AbXAIBRx (ORCPT ); Mon, 8 Jan 2007 20:17:53 -0500 Received: from mx1.redhat.com ([66.187.233.31]:53170 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750879AbXAIBRw (ORCPT ); Mon, 8 Jan 2007 20:17:52 -0500 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l091HoI3009509; Mon, 8 Jan 2007 20:17:50 -0500 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l091Ho7p018194; Mon, 8 Jan 2007 20:17:50 -0500 Received: from raht.cworth.org (sebastian-int.corp.redhat.com [172.16.52.221]) by mail.boston.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l091Hmv4002361; Mon, 8 Jan 2007 20:17:49 -0500 To: Junio C Hamano In-Reply-To: <7v7ivxt3ft.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_Mon_Jan__8_17:15:56_2007-1 Content-Type: text/plain; charset=US-ASCII On Mon, 08 Jan 2007 17:05:26 -0800, Junio C Hamano wrote: > An obvious alternative is not to allow building on top of a HEAD > that is detached at all, which I suggested initially. That sounds great to me. Let's just suggest "checkout -b" before commit, (maybe even add new "merge -b " and "commit -b " so the suggest command could be even closer to what the user wanted). > A non-alternative is to silently lose commits, which you seem to > be suggesting, but I would rather play it safe. No, I would never want that. We both agreed earlier that a safety valve is necessary. I just want to make sure that people that never actually need it don't have to see the message. And I don't think that _that_ part would be feasible with the safety valve at the point of "leaving detached state". It would basically come down to having to do reachability analysis for the current HEAD from all known branches or something equally horrific. So let's put the safety valve where it's cheap to detect and where we know it will distinguish between read-only and read-write use, (that is, put it precisely at the point where there's an attempt to create a new commit object while in the detached state). -Carl --pgp-sign-Multipart_Mon_Jan__8_17:15:56_2007-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBFouzN6JDdNq8qSWgRAjk2AJ49hT0VOJ9IuyBRRxqR5JHqdXltwgCfW5xC BFsYYjqkybtjyz9VttfQUOs= =rTwL -----END PGP SIGNATURE----- --pgp-sign-Multipart_Mon_Jan__8_17:15:56_2007-1--