git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Remove bashism from t3210-pack-refs.sh
Date: Fri, 6 Oct 2006 09:33:59 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0610060931160.3952@g5.osdl.org> (raw)
In-Reply-To: <eg5r9k$58c$1@sea.gmane.org>



On Fri, 6 Oct 2006, Jakub Narebski wrote:
> Alex Riesen wrote:
> 
> > On 10/6/06, Dennis Stosberg <dennis@stosberg.net> wrote:
> >> -     SHA1=$(< .git/refs/heads/a) &&
> >> +     SHA1=`cat .git/refs/heads/a` &&
> > 
> > Only "<" (the redirection part) is bashism. The "$()" is POSIX.
> 
> BTW. it is not packed-refs safe.

Well, since that seems to be a test-case for the packed-refs thing, that's 
probably not a problem ;)

In a real-life git script you should do something like

	SHA1=$(git-rev-parse --verify "refs/heads/$head^0") && ...

to get the SHA1 and verify that it's all good, but since that script is 
all about checking that packing does the right thing, I think it's fine to 
do it by hand there..

		Linus

      reply	other threads:[~2006-10-06 16:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-06  9:10 [PATCH] Remove bashism from t3210-pack-refs.sh Dennis Stosberg
2006-10-06 13:35 ` Alex Riesen
2006-10-06 15:05   ` Jakub Narebski
2006-10-06 16:33     ` Linus Torvalds [this message]

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=Pine.LNX.4.64.0610060931160.3952@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    /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).