From: Johannes Schindelin <johannes.schindelin@gmx.de>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
Markus Klein <markus.klein@reelworx.at>
Subject: [PATCH v2 0/2] Fix segmentation fault with cherry-pick
Date: Sat, 26 Nov 2016 13:47:58 +0100 (CET) [thread overview]
Message-ID: <cover.1480164459.git.johannes.schindelin@gmx.de> (raw)
In-Reply-To: <cover.1480091758.git.johannes.schindelin@gmx.de>
The culprit is actually not cherry-pick, but a special code path that
expects refresh_cache_entry() not to return NULL. And the fix is to
teach it to handle NULL there.
This bug was brought to my attention by Markus Klein via
https://github.com/git-for-windows/git/issues/952.
Changes since v1:
- changed test title
- avoided ambiguous refname in test
Johannes Schindelin (2):
cherry-pick: demonstrate a segmentation fault
Avoid a segmentation fault with renaming merges
merge-recursive.c | 2 ++
t/t3501-revert-cherry-pick.sh | 12 ++++++++++++
2 files changed, 14 insertions(+)
base-commit: e2b2d6a172b76d44cb7b1ddb12ea5bfac9613a44
Published-As: https://github.com/dscho/git/releases/tag/cherry-pick-segfault-v2
Fetch-It-Via: git fetch https://github.com/dscho/git cherry-pick-segfault-v2
Interdiff vs v1:
diff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh
index 8e21840f11..4f2a263b63 100755
--- a/t/t3501-revert-cherry-pick.sh
+++ b/t/t3501-revert-cherry-pick.sh
@@ -141,7 +141,7 @@ test_expect_success 'cherry-pick "-" works with arguments' '
test_cmp expect actual
'
-test_expect_success 'cherry-pick fails gracefully with dirty renamed file' '
+test_expect_success 'cherry-pick works with dirty renamed file' '
test_commit to-rename &&
git checkout -b unrelated &&
test_commit unrelated &&
@@ -150,7 +150,7 @@ test_expect_success 'cherry-pick fails gracefully with dirty renamed file' '
test_tick &&
git commit -m renamed &&
echo modified >renamed &&
- git cherry-pick unrelated
+ git cherry-pick refs/heads/unrelated
'
test_done
--
2.11.0.rc3.windows.1
next prev parent reply other threads:[~2016-11-26 12:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-25 16:36 [PATCH 0/2] Fix segmentation fault with cherry-pick Johannes Schindelin
2016-11-25 16:36 ` [PATCH 1/2] cherry-pick: demonstrate a segmentation fault Johannes Schindelin
2016-11-26 12:47 ` Johannes Schindelin
2016-11-25 16:36 ` [PATCH 2/2] Avoid a segmentation fault with renaming merges Johannes Schindelin
2016-11-25 16:41 ` [PATCH 0/2] Fix segmentation fault with cherry-pick Johannes Schindelin
2016-11-26 12:47 ` Johannes Schindelin [this message]
2016-11-26 12:48 ` [PATCH v2 1/2] cherry-pick: demonstrate a segmentation fault Johannes Schindelin
2016-11-26 12:48 ` [PATCH v2 2/2] Avoid a segmentation fault with renaming merges Johannes Schindelin
2016-11-26 12:53 ` Johannes Schindelin
2016-11-28 18:42 ` Junio C Hamano
2016-11-28 18:59 ` 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
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=cover.1480164459.git.johannes.schindelin@gmx.de \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=markus.klein@reelworx.at \
/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).