summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorTzvetan Mikov <tmikov@gmail.com>2014-11-04 20:33:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-11-04 20:47:35 (GMT)
commita8787c5c1c51f4bdb610526175442a23eea7c467 (patch)
tree3a00579a034a4231109d36ecdfc6432742d22327 /t
parent1762224ddb599ab14ca26cedafec39dee9b92fe5 (diff)
downloadgit-a8787c5c1c51f4bdb610526175442a23eea7c467.zip
git-a8787c5c1c51f4bdb610526175442a23eea7c467.tar.gz
git-a8787c5c1c51f4bdb610526175442a23eea7c467.tar.bz2
line-log: fix crash when --first-parent is used
line-log tries to access all parents of a commit, but only the first parent has been loaded if "--first-parent" is specified, resulting in a crash. Limit the number of parents to one if "--first-parent" is specified. Reported-by: Eric N. Vander Weele <ericvw@gmail.com> Signed-off-by: Tzvetan Mikov <tmikov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t4211-line-log.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t4211-line-log.sh b/t/t4211-line-log.sh
index 7665d67..3be25a3 100755
--- a/t/t4211-line-log.sh
+++ b/t/t4211-line-log.sh
@@ -77,4 +77,9 @@ test_expect_success '-L {empty-range} (first -L)' '
git log -L$n:b.c
'
+test_expect_success '-L with --first-parent and a merge' '
+ git checkout parallel-change &&
+ git log --first-parent -L 1,1:b.c
+'
+
test_done