This test fails with the current iteration of builtin-clone. After builtin-clone.c have finished processing the "--reference" option, it switches (i.e. calls set_git_dir()) to the cloned repo. However, when updating refs in the cloned repo, git is unable to find the (loose) objects they point at due to the underlying plumbing generating incorrect filenames for these loose objects (referring to non-existing files in the "--reference" repo instead of existing files in the cloned repo). Signed-off-by: Johan Herland <johan@xxxxxxxxxxx> --- t/t5700-clone-reference.sh | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/t/t5700-clone-reference.sh b/t/t5700-clone-reference.sh index d318780..40826ac 100755 --- a/t/t5700-clone-reference.sh +++ b/t/t5700-clone-reference.sh @@ -118,4 +118,25 @@ test_expect_success 'cloning with reference being subset of source (-l -s)' \ cd "$base_dir" +test_expect_success 'preparing alternate repository #1' \ +'test_create_repo F && cd F && +echo first > file1 && +git add file1 && +git commit -m initial' + +cd "$base_dir" + +test_expect_success 'cloning alternate repo #2 and adding changes to repo #1' \ +'git clone F G && cd F && +echo second > file2 && +git add file2 && +git commit -m addition' + +cd "$base_dir" + +test_expect_failure 'cloning alternate repo #1, using #2 as reference' \ +'git clone --reference G F H' + +cd "$base_dir" + test_done -- 1.5.4.3.328.gcaed -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html