All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Shawn O. Pearce" <spearce@spearce.org>, git@vger.kernel.org
Subject: Re: [PATCH 2/2] completion: enhance "current branch" display
Date: Sun, 10 May 2009 12:59:07 +0200	[thread overview]
Message-ID: <200905101259.07175.j6t@kdbg.org> (raw)
In-Reply-To: <7vvdo91glm.fsf@alter.siamese.dyndns.org>

On Sonntag, 10. Mai 2009, Junio C Hamano wrote:
>  				b="$(cut -c1-7 "$g/HEAD" 2>/dev/null)..." ||

While you are here, you could turn this line into

		{ b=$(< "$g/HEAD") && b=${b:0:7}...; } 2>/dev/null ||

to save a process. $(< foo) is a bash feature and does the same as $(cat foo), 
but faster.

-- Hannes

  reply	other threads:[~2009-05-10 11:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-10  8:56 [PATCH 2/2] completion: enhance "current branch" display Junio C Hamano
2009-05-10 10:59 ` Johannes Sixt [this message]
2009-05-10 11:33   ` Michal Nazarewicz
2009-05-10 11:57     ` Johannes Sixt
2009-05-10 21:18 ` Shawn O. Pearce

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=200905101259.07175.j6t@kdbg.org \
    --to=j6t@kdbg.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.