git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marius Storm-Olsen <marius@trolltech.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Junio C Hamano <gitster@pobox.com>,
	Marius Storm-Olsen <git@storm-olsen.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] Add bare repository indicator for __git_ps1
Date: Mon, 23 Feb 2009 17:03:29 +0100	[thread overview]
Message-ID: <49A2C8D1.3080104@trolltech.com> (raw)
In-Reply-To: <20090223154237.GH22848@spearce.org>

[-- Attachment #1: Type: text/plain, Size: 1774 bytes --]

Shawn O. Pearce said the following on 23.02.2009 16:42:
> Marius Storm-Olsen <marius@trolltech.com> wrote:
>> Anyways, I just thought it would fairly "low cost" to add, and
>> nice to have.
> 
> 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.  ;)
> 
>> Consider it, as Linus coined the term, a throw-away patch. I can
>> easily put it in my .bashrc instead. :)
> 
> Like Junio, I'm not very compelled to include this patch.  I just 
> don't see enough to make including it worthwhile.

If so, then I'd like to argue to remove setting the fake "GIT_DIR!" 
branch in the ps, since it hinders me from constructing this, IMO 
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 
also make it more light weight, since you'd remove one extra fork+exec 
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 
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 
removing useful information from the prompt; at least it does for me.

-- 
.marius [@trolltech.com]
'if you know what you're doing, it's not research'


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 187 bytes --]

  reply	other threads:[~2009-02-23 16:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-21 14:48 [PATCH] Add bare repository indicator for __git_ps1 Marius Storm-Olsen
2009-02-21 14:53 ` Marius Storm-Olsen
2009-02-21 19:29 ` Junio C Hamano
2009-02-21 19:43   ` Marius Storm-Olsen
2009-02-22 16:49     ` Junio C Hamano
2009-02-23  7:52       ` Marius Storm-Olsen
2009-02-23 15:42     ` Shawn O. Pearce
2009-02-23 16:03       ` Marius Storm-Olsen [this message]
2009-02-23 16:16         ` Shawn O. Pearce
2009-02-23 18:55           ` Marius Storm-Olsen
2009-02-24  1:35           ` Junio C Hamano
2009-02-24 14:25             ` Ted Pavlic
2009-02-24 14:46               ` Marius Storm-Olsen
2009-02-24 15:39                 ` Ted Pavlic
2009-02-24 17:01                   ` Junio C Hamano
2009-02-24 19:47                     ` Marius Storm-Olsen
2009-02-25  6:08                       ` Junio C Hamano
2009-02-25  6:46                         ` Marius Storm-Olsen
  -- strict thread matches above, loose matches on Subject: below --
2009-02-20 14:56 Marius Storm-Olsen
2009-02-20 16:35 ` Johannes Schindelin
2009-02-20 16:46   ` Thomas Rast
2009-02-20 17:13     ` Michael J Gruber
2009-02-20 22:04     ` Marius Storm-Olsen
2009-02-20 16:39 ` Michael J Gruber
2009-02-20 21:55   ` Marius Storm-Olsen
2009-02-20 17:06 ` Ted Pavlic
2009-02-20 22:00   ` Marius Storm-Olsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49A2C8D1.3080104@trolltech.com \
    --to=marius@trolltech.com \
    --cc=git@storm-olsen.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).