From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Storm-Olsen Subject: Re: [PATCH] Add bare repository indicator for __git_ps1 Date: Mon, 23 Feb 2009 17:03:29 +0100 Message-ID: <49A2C8D1.3080104@trolltech.com> References: <1235227723-11471-1-git-send-email-git@storm-olsen.com> <7v8wnzr3k9.fsf@gitster.siamese.dyndns.org> <49A05958.7050703@trolltech.com> <20090223154237.GH22848@spearce.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigC4E8FE25A8ACA985A6986DDB" Cc: Junio C Hamano , Marius Storm-Olsen , git@vger.kernel.org To: "Shawn O. Pearce" X-From: git-owner@vger.kernel.org Mon Feb 23 17:06:09 2009 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1LbdJe-0000xB-8b for gcvg-git-2@gmane.org; Mon, 23 Feb 2009 17:05:58 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755538AbZBWQDk (ORCPT ); Mon, 23 Feb 2009 11:03:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754703AbZBWQDk (ORCPT ); Mon, 23 Feb 2009 11:03:40 -0500 Received: from hoat.troll.no ([62.70.27.150]:50613 "EHLO hoat.troll.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754709AbZBWQDj (ORCPT ); Mon, 23 Feb 2009 11:03:39 -0500 Received: from hoat.troll.no (tedur.troll.no [62.70.27.154]) by hoat.troll.no (Postfix) with SMTP id D77F120ED6; Mon, 23 Feb 2009 17:03:29 +0100 (CET) Received: from [172.24.90.95] (unknown [172.24.90.95]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hoat.troll.no (Postfix) with ESMTP id C1CAD20E4D; Mon, 23 Feb 2009 17:03:29 +0100 (CET) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Lightning/0.9 Thunderbird/2.0.0.19 ThunderGit/0.1a Mnenhy/0.7.6.666 In-Reply-To: <20090223154237.GH22848@spearce.org> X-Enigmail-Version: 0.95.7 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEXU1NTAwMABAQGsrKyE hIQwMDAEBAS8hGUfAAACQUlEQVQ4jV2TS47cMAxEKSDZW1CfwMB4PYLkrKchsveJRR2gEen+R0hR 9vziBmahhyqSRQ4NfF1FmIv3dH4usNAGoFprBVguQJmZ1nX0XiHgEukTCK3TairiZeXcVGzmZIoU 3738pehdVbiU9KFgMQWeZ1fpHZDfRS4rPb3eQVaZChGx4ikt5GDkAZQ2KKohzjklno4+iJpVhxka ZjSpasJ4gdGaEQMWTMjRa5uTqza0XDJjzhIdzGTMrqoopimoIPCKZtVOq265MAXpMLXycmVl2Y8C oE1FkT/faKauOjYoHJyOxHfvixjowvI0xZJsKykubgLYzuJMdBO+L86TjxfQ9hz9jpSudbnXXzRm tor5i3MUONpOfARAhlWbzWF7OhP2eSeEW9HUBNiHOxUM8HLWHhUAj3NZNsdqRZpNA+DJ+XlX+Qc9 Z4ZjHX8LRUzgTBBef84NQoCMOcS0+BMsj3klbTzRri03ugXr9em1GfgzDAyEn4J3fvFI5YwdTrYu 1ntAY1h5ysM2OMGm+cBOocCXHisAHu2PagnLghoG2krz8bzsA4fj7KxCGk+63jt+DDCtYjbFNkHD nRwpRqsQYx5WYzsbm/eBfn0I4TbOGvMWqhQAiEDzNs4apumCI0x2OyHtY7uAlZff/sanbH9+AGT1 KOEmUlJISdYPgEgehw+cTZEf6xeFyoEjCPgv+A62KhW3EOy9PL7WmCBMRWmfYN0OqW9krzl/Ay91 75HMqfDtP8UFckFUX2rwrm/kTVB2gH+hdu4avZVCuAAAAABJRU5ErkJggg== Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC4E8FE25A8ACA985A6986DDB Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Shawn O. Pearce said the following on 23.02.2009 16:42: > Marius Storm-Olsen wrote: >> Anyways, I just thought it would fairly "low cost" to add, and >> nice to have. >=20 > Its not that low of a cost, its an extra fork+exec per prompt when > in a .git/ or a bare repository. Neither is very common when > compared to a workdir, Junio's right about that. But its YAFE. ;) >=20 >> Consider it, as Linus coined the term, a throw-away patch. I can >> easily put it in my .bashrc instead. :) >=20 > Like Junio, I'm not very compelled to include this patch. I just=20 > don't see enough to make including it worthwhile. If so, then I'd like to argue to remove setting the fake "GIT_DIR!"=20 branch in the ps, since it hinders me from constructing this, IMO=20 useful prompt, "(BARE:master)" in my own .bashrc. ~/source/some_repo (GIT_DIR!)$ simply isn't useful to me, and neither is ~/source/some_repo (BARE:GIT_DIR!)$ of course. Now, if we remove setting the fake branch ~/source/some_repo (BARE:some/funky/branch)$ is doable for me in my own .bashrc, and by your argument, it would=20 also make it more light weight, since you'd remove one extra fork+exec=20 for *every single prompt* (and not just one extra when inside GIT_DIR). ^shrug^ at this point you and Junio can discuss what to do, as Junio=20 already said | "I do not understand the need for GIT_DIR! thing even | less, but since we have that there already, I do not | see a reason not to add this to the queue." And I have to agree with him. At this point, __git_ps1() is actually=20 removing useful information from the prompt; at least it does for me. --=20 =2Emarius [@trolltech.com] 'if you know what you're doing, it's not research' --------------enigC4E8FE25A8ACA985A6986DDB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) iD8DBQFJosjRKzzXl/njVP8RAvJYAKDSP7vMyfWtfJGHbxYnwRnogVDXIACgwlE2 nZl2U9QA/rvfosuFve25guo= =6B0X -----END PGP SIGNATURE----- --------------enigC4E8FE25A8ACA985A6986DDB--