summaryrefslogtreecommitdiff
path: root/t/t4211-line-log.sh
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2013-07-09 05:55:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-09 16:25:04 (GMT)
commit3755b53af779ce75fa3ea4581a0e6525bc67278d (patch)
treed9cad5bafb9d6c1dd2482478103fe2af8e00e348 /t/t4211-line-log.sh
parent18d472db6fe3909537ceb7e0c54cf01fa3466b8f (diff)
downloadgit-3755b53af779ce75fa3ea4581a0e6525bc67278d.zip
git-3755b53af779ce75fa3ea4581a0e6525bc67278d.tar.gz
git-3755b53af779ce75fa3ea4581a0e6525bc67278d.tar.bz2
range_set: fix coalescing bug when range is a subset of another
When coalescing ranges, sort_and_merge_range_set() unconditionally assumes that the end of a range being folded into a preceding range should become the end of the coalesced range. This assumption, however, is invalid when one range is a subset of another. For example, given ranges 1-5 and 2-3 added via range_set_append_unsafe(), sort_and_merge_range_set() incorrectly coalesces them to range 1-3 rather than the correct union range 1-5. Fix this bug. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4211-line-log.sh')
-rwxr-xr-xt/t4211-line-log.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t4211-line-log.sh b/t/t4211-line-log.sh
index 549df9e..7776f93 100755
--- a/t/t4211-line-log.sh
+++ b/t/t4211-line-log.sh
@@ -50,8 +50,8 @@ canned_test "-M -L ':f:b.c' parallel-change" parallel-change-f-to-main
canned_test "-L 4,12:a.c -L :main:a.c simple" multiple
canned_test "-L 4,18:a.c -L :main:a.c simple" multiple-overlapping
canned_test "-L :main:a.c -L 4,18:a.c simple" multiple-overlapping
-canned_test_failure "-L 4:a.c -L 8,12:a.c simple" multiple-superset
-canned_test_failure "-L 8,12:a.c -L 4:a.c simple" multiple-superset
+canned_test "-L 4:a.c -L 8,12:a.c simple" multiple-superset
+canned_test "-L 8,12:a.c -L 4:a.c simple" multiple-superset
test_bad_opts "-L" "switch.*requires a value"
test_bad_opts "-L b.c" "argument.*not of the form"