From: Andreas Schwab <schwab@linux-m68k.org>
To: kusmabite@gmail.com
Cc: Johannes Sixt <j.sixt@viscovery.net>,
Git Mailing List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: git checkout creates strange '(null)'-branch
Date: Tue, 08 May 2012 14:10:53 +0200 [thread overview]
Message-ID: <m2r4uuhnzm.fsf@igel.home> (raw)
In-Reply-To: <CABPQNSZjdpz8zqYOwBQ_SPeh0JqyxQ1bjrghG1vzxt0GiLR22w@mail.gmail.com> (Erik Faye-Lund's message of "Tue, 8 May 2012 13:50:35 +0200")
Erik Faye-Lund <kusmabite@gmail.com> writes:
> +test_expect_failure 'committing to empty submodule does not create
> (null) branch' '
> + test_create_repo empty-repo &&
> + git submodule add ./empty-repo empty-submodule &&
> + (
> + cd empty-submodule &&
> + echo "foo" > bar.txt &&
> + git add bar.txt &&
> + git commit -m. &&
> + ! (git show-ref | grep "(null)")
You don't need the parens, since ! operates on the whole pipeline. (And
for grouping the shell language uses { } instead of ( ).)
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2012-05-08 12:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 11:24 git checkout creates strange '(null)'-branch Erik Faye-Lund
2012-05-08 11:34 ` Johannes Sixt
2012-05-08 11:50 ` Erik Faye-Lund
2012-05-08 12:10 ` Andreas Schwab [this message]
2012-05-08 16:25 ` Junio C Hamano
2012-05-10 14:22 ` Erik Faye-Lund
2012-05-10 16:49 ` Junio C Hamano
2012-05-08 15:09 ` Junio C Hamano
2012-05-08 15:05 ` Junio C Hamano
2012-05-08 15:19 ` Junio C Hamano
2012-05-08 16:04 ` Erik Faye-Lund
2012-05-08 16:22 ` Junio C Hamano
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=m2r4uuhnzm.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
--cc=kusmabite@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).