git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: "André Laszlo" <andre@laszlo.nu>
Cc: git@vger.kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
	"René Scharfe" <l.s.r@web.de>,
	"Johannes Schindelin" <johannes.schindelin@gmx.de>,
	"Jeff King" <peff@peff.net>
Subject: Re: [PATCH] pull: do not segfault when HEAD refers to missing object file
Date: Sun, 5 Mar 2017 23:52:22 +0000	[thread overview]
Message-ID: <20170305235222.vxia7jw2n5uj2h2e@genre.crustytoothpaste.net> (raw)
In-Reply-To: <20170305234222.4590-1-andre@laszlo.nu>

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

On Mon, Mar 06, 2017 at 12:42:22AM +0100, André Laszlo wrote:
> +test_expect_success 'git pull --rebase with corrupt HEAD does not segfault' '
> +	mkdir corrupted &&
> +	(cd corrupted &&
> +	git init &&
> +	echo one >file && git add file &&
> +	git commit -m one &&
> +	REV=$(git rev-parse HEAD) &&
> +	rm -f .git/objects/${REV:0:2}/${REV:2} &&

I think this is a bashism.  On dash, I get the following:

  genre ok % dash -c 'foo=abcdefg; echo ${foo:0:2}; echo ${foo:2}'
  dash: 1: Bad substitution

> +	test_expect_code 128 git pull --rebase > /dev/null
> +	)
> +'
> +
>  test_done
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]

  reply	other threads:[~2017-03-05 23:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-05 23:42 [PATCH] pull: do not segfault when HEAD refers to missing object file André Laszlo
2017-03-05 23:52 ` brian m. carlson [this message]
2017-03-06  3:51   ` Jeff King
2017-03-06  6:52     ` Johannes Sixt
2017-03-06  7:33       ` Jeff King
2017-03-06  3:46 ` Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20170305235222.vxia7jw2n5uj2h2e@genre.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=andre@laszlo.nu \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=l.s.r@web.de \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).