]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t4211-line-log.sh
Merge branch 'rs/preserve-merges-unused-code-removal'
[thirdparty/git.git] / t / t4211-line-log.sh
index 1428eae26299d63262568bf93e3b46671b517660..2d1d7b5d1938a05daa6a98359a2dfd5e1be645e2 100755 (executable)
@@ -4,7 +4,6 @@ test_description='test log -L'
 . ./test-lib.sh
 
 test_expect_success 'setup (import history)' '
-       test_oid_init &&
        git fast-import < "$TEST_DIRECTORY"/t4211/history.export &&
        git reset --hard
 '
@@ -240,10 +239,12 @@ test_expect_success 'setup for checking line-log and parent oids' '
        EOF
        git add file.c &&
        test_tick &&
+       first_tick=$test_tick &&
        git commit -m "Add func1() and func2() in file.c" &&
 
        echo 1 >other-file &&
        git add other-file &&
+       test_tick &&
        git commit -m "Add other-file" &&
 
        sed -e "s/F1/F1 + 1/" file.c >tmp &&
@@ -283,4 +284,10 @@ test_expect_success 'parent oids with parent rewriting' '
        test_cmp expect actual
 '
 
+test_expect_success 'line-log with --before' '
+       echo $root_oid >expect &&
+       git log --format=%h --no-patch -L:func2:file.c --before=$first_tick >actual &&
+       test_cmp expect actual
+'
+
 test_done