{"thread":{"id":"56982","subject":"[PATCH] t1404: mark directory/file conflict tests with REFFILES","startedAt":"2021-11-25T16:09:48Z","lastAt":"2021-11-29T22:13:41Z","messageCount":5,"participants":["Han-Wen Nienhuys via GitGitGadget","Junio C Hamano","Han-Wen Nienhuys"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"442314","messageId":"pull.1148.git.git.1637855828856.gitgitgadget@gmail.com","threadId":"56982","inReplyTo":null,"subject":"[PATCH] t1404: mark directory/file conflict tests with REFFILES","fromName":"Han-Wen Nienhuys via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-11-25T15:57:08Z","receivedAt":"2021-11-25T16:09:48Z","isPatch":true,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"From: Han-Wen Nienhuys <hanwen@google.com>\n\nThe files backend uses file system locking on individual refs, which means a\ndirectory/file conflict can prevent locks being taken. For example, in a repo\nwith just the ref \"foo\", an update\n\n    (DELETE \"foo\") + (ADD \"foo/bar\")\n\ncannot be executed in the files backend, as one cannot take a lock on foo/bar.\n\nThe result is a repo with just \"foo/bar\", which has no directory/file conflict,\nand this is a valid transaction in reftable.\n\nSigned-off-by: Han-Wen Nienhuys <hanwen@google.com>\n---\n    t1404: mark directory/file conflict tests with REFFILES\n    \n    The files backend uses file system locking on individual refs, which\n    means a directory/file conflict can prevent locks being taken. For\n    example, in a repo with just the ref \"foo\", an update\n    \n    (DELETE \"foo\") + (ADD \"foo/bar\")\n    \n    \n    cannot be executed in the files backend, as one cannot take a lock on\n    foo/bar.\n    \n    The result is a repo with just \"foo/bar\", which has no directory/file\n    conflict, and this is a valid transaction in reftable.\n    \n    Signed-off-by: Han-Wen Nienhuys hanwen@google.com\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1148%2Fhanwen%2Ft1404-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1148/hanwen/t1404-v1\nPull-Request: https://github.com/git/git/pull/1148\n\n t/t1404-update-ref-errors.sh | 40 +++++++++++++++++++++---------------\n 1 file changed, 24 insertions(+), 16 deletions(-)\n\ndiff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh\nindex b729c1f4803..fe7b6447cae 100755\n--- a/t/t1404-update-ref-errors.sh\n+++ b/t/t1404-update-ref-errors.sh\n@@ -261,69 +261,77 @@ test_expect_success REFFILES 'empty directory should not fool 1-arg delete' '\n \tgit update-ref --stdin\n '\n \n-test_expect_success 'D/F conflict prevents add long + delete short' '\n+test_expect_success REFFILES  'D/F conflict prevents add long + delete short' '\n \tdf_test refs/df-al-ds --add-del foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents add short + delete long' '\n+test_expect_success REFFILES 'D/F conflict prevents add short + delete long' '\n \tdf_test refs/df-as-dl --add-del foo foo/bar\n '\n \n-test_expect_success 'D/F conflict prevents delete long + add short' '\n+test_expect_success REFFILES  'D/F conflict prevents delete long + add short' '\n \tdf_test refs/df-dl-as --del-add foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents delete short + add long' '\n+test_expect_success REFFILES 'D/F conflict prevents delete short + add long' '\n \tdf_test refs/df-ds-al --del-add foo foo/bar\n '\n \n-test_expect_success 'D/F conflict prevents add long + delete short packed' '\n+test_expect_success REFFILES 'D/F conflict prevents add long + delete short packed' '\n \tdf_test refs/df-al-dsp --pack --add-del foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents add short + delete long packed' '\n+test_expect_success REFFILES 'D/F conflict prevents add short + delete long packed' '\n \tdf_test refs/df-as-dlp --pack --add-del foo foo/bar\n '\n \n-test_expect_success 'D/F conflict prevents delete long packed + add short' '\n+test_expect_success REFFILES 'D/F conflict prevents delete long packed + add short' '\n \tdf_test refs/df-dlp-as --pack --del-add foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents delete short packed + add long' '\n+test_expect_success REFFILES 'D/F conflict prevents delete short packed + add long' '\n \tdf_test refs/df-dsp-al --pack --del-add foo foo/bar\n '\n \n # Try some combinations involving symbolic refs...\n \n-test_expect_success 'D/F conflict prevents indirect add long + delete short' '\n+test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short' '\n \tdf_test refs/df-ial-ds --sym-add --add-del foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents indirect add long + indirect delete short' '\n+test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short' '\n+\tdf_test refs/df-ial-ds --sym-add --add-del foo/bar foo\n+'\n+\n+test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short' '\n+\tdf_test refs/df-ial-ds --sym-add --add-del foo/bar foo\n+'\n+\n+test_expect_success REFFILES 'D/F conflict prevents indirect add long + indirect delete short' '\n \tdf_test refs/df-ial-ids --sym-add --sym-del --add-del foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents indirect add short + indirect delete long' '\n+test_expect_success REFFILES 'D/F conflict prevents indirect add short + indirect delete long' '\n \tdf_test refs/df-ias-idl --sym-add --sym-del --add-del foo foo/bar\n '\n \n-test_expect_success 'D/F conflict prevents indirect delete long + indirect add short' '\n+test_expect_success REFFILES 'D/F conflict prevents indirect delete long + indirect add short' '\n \tdf_test refs/df-idl-ias --sym-add --sym-del --del-add foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents indirect add long + delete short packed' '\n+test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short packed' '\n \tdf_test refs/df-ial-dsp --sym-add --pack --add-del foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents indirect add long + indirect delete short packed' '\n+test_expect_success REFFILES 'D/F conflict prevents indirect add long + indirect delete short packed' '\n \tdf_test refs/df-ial-idsp --sym-add --sym-del --pack --add-del foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents add long + indirect delete short packed' '\n+test_expect_success REFFILES 'D/F conflict prevents add long + indirect delete short packed' '\n \tdf_test refs/df-al-idsp --sym-del --pack --add-del foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents indirect delete long packed + indirect add short' '\n+test_expect_success REFFILES 'D/F conflict prevents indirect delete long packed + indirect add short' '\n \tdf_test refs/df-idlp-ias --sym-add --sym-del --pack --del-add foo/bar foo\n '\n \n\nbase-commit: 35151cf0720460a897cde9b8039af364743240e7\n-- \ngitgitgadget\n"},{"id":"442348","messageId":"xmqq35nj8ix6.fsf@gitster.g","threadId":"56982","inReplyTo":"pull.1148.git.git.1637855828856.gitgitgadget@gmail.com","subject":"Re: [PATCH] t1404: mark directory/file conflict tests with REFFILES","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-11-26T07:39:33Z","receivedAt":"2021-11-26T07:41:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Han-Wen Nienhuys via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> -test_expect_success 'D/F conflict prevents add long + delete short' '\n> +test_expect_success REFFILES  'D/F conflict prevents add long + delete short' '\n\nTwo spaces after REFFILES here but ...\n\n>  \tdf_test refs/df-al-ds --add-del foo/bar foo\n>  '\n>  \n> -test_expect_success 'D/F conflict prevents add short + delete long' '\n> +test_expect_success REFFILES 'D/F conflict prevents add short + delete long' '\n\n... only one space here and then ...\n\n>  \tdf_test refs/df-as-dl --add-del foo foo/bar\n>  '\n>  \n> -test_expect_success 'D/F conflict prevents delete long + add short' '\n> +test_expect_success REFFILES  'D/F conflict prevents delete long + add short' '\n\n... two spaces here?  Let's be consistent.\n\n>  \tdf_test refs/df-dl-as --del-add foo/bar foo\n>  '\n\nAs all these df_test instances _expect_ to fail, not causing any\nchanges in the refs, I think skipping them would hopefully not\nreveal unpleasant reliance of side effects by later tests.\n\nAnd presumably, without REFFILES prerequisite, these operations\nwould be supported?  E.g. we can have 'main' branch, with 'main/1',\n'main/2',... refs, at the same time, with reftable?  That would be\nquite interesting.\n\n"},{"id":"442437","messageId":"CAFQ2z_OTc41g9YgA70W8NCWKWRaRs41EJVZFihmTiPnZFOiEEw@mail.gmail.com","threadId":"56982","inReplyTo":"xmqq35nj8ix6.fsf@gitster.g","subject":"Re: [PATCH] t1404: mark directory/file conflict tests with REFFILES","fromName":"Han-Wen Nienhuys","fromEmail":"hanwen@google.com","sentAt":"2021-11-29T10:57:28Z","receivedAt":"2021-11-29T11:55:09Z","isPatch":true,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"On Fri, Nov 26, 2021 at 8:39 AM Junio C Hamano <gitster@pobox.com> wrote:\n\n> And presumably, without REFFILES prerequisite, these operations\n> would be supported?  E.g. we can have 'main' branch, with 'main/1',\n> 'main/2',... refs, at the same time, with reftable?  That would be\n> quite interesting.\n\nThe storage format allows D/F conflicts, but transactions are checked\nfor not creating new D/F conflicts (depending on\nthe value of reftable_write_options.skip_name_check).\n\n-- \nHan-Wen Nienhuys - Google Munich\nI work 80%. Don't expect answers from me on Fridays.\n--\nGoogle Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich\nRegistergericht und -nummer: Hamburg, HRB 86891\nSitz der Gesellschaft: Hamburg\nGeschäftsführer: Paul Manicle, Halimah DeLaine Prado\n"},{"id":"442453","messageId":"xmqqsfve3ksy.fsf@gitster.g","threadId":"56982","inReplyTo":"CAFQ2z_OTc41g9YgA70W8NCWKWRaRs41EJVZFihmTiPnZFOiEEw@mail.gmail.com","subject":"Re: [PATCH] t1404: mark directory/file conflict tests with REFFILES","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-11-29T17:59:09Z","receivedAt":"2021-11-29T18:01:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Han-Wen Nienhuys <hanwen@google.com> writes:\n\n> On Fri, Nov 26, 2021 at 8:39 AM Junio C Hamano <gitster@pobox.com> wrote:\n>\n>> And presumably, without REFFILES prerequisite, these operations\n>> would be supported?  E.g. we can have 'main' branch, with 'main/1',\n>> 'main/2',... refs, at the same time, with reftable?  That would be\n>> quite interesting.\n>\n> The storage format allows D/F conflicts, but transactions are checked\n> for not creating new D/F conflicts (depending on\n> the value of reftable_write_options.skip_name_check).\n\nOK.  Then once we let reffiles wither and die over time, hopefully\nwe can flip the bit and allow us to be in an interesting world ;-)\n\nNice.\n\n"},{"id":"442501","messageId":"pull.1148.v2.git.git.1638210022966.gitgitgadget@gmail.com","threadId":"56982","inReplyTo":"pull.1148.git.git.1637855828856.gitgitgadget@gmail.com","subject":"[PATCH v2] t1404: mark directory/file conflict tests with REFFILES","fromName":"Han-Wen Nienhuys via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-11-29T18:20:22Z","receivedAt":"2021-11-29T22:13:41Z","isPatch":true,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"From: Han-Wen Nienhuys <hanwen@google.com>\n\nThe files backend uses file system locking on individual refs, which means a\ndirectory/file conflict can prevent locks being taken. For example, in a repo\nwith just the ref \"foo\", an update\n\n    (DELETE \"foo\") + (ADD \"foo/bar\")\n\ncannot be executed in the files backend, as one cannot take a lock on foo/bar.\n\nThe current reftable proof-of-concept integration supports these tranactions, as\nthe result is a repo with just \"foo/bar\", which has no directory/file conflict.\n\nSigned-off-by: Han-Wen Nienhuys <hanwen@google.com>\n---\n    t1404: mark directory/file conflict tests with REFFILES\n    \n    The files backend uses file system locking on individual refs, which\n    means a directory/file conflict can prevent locks being taken. For\n    example, in a repo with just the ref \"foo\", an update\n    \n    (DELETE \"foo\") + (ADD \"foo/bar\")\n    \n    \n    cannot be executed in the files backend, as one cannot take a lock on\n    foo/bar.\n    \n    The result is a repo with just \"foo/bar\", which has no directory/file\n    conflict, and this is a valid transaction in reftable.\n    \n    Signed-off-by: Han-Wen Nienhuys hanwen@google.com\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1148%2Fhanwen%2Ft1404-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1148/hanwen/t1404-v2\nPull-Request: https://github.com/git/git/pull/1148\n\nRange-diff vs v1:\n\n 1:  55d200a6a83 ! 1:  59e9ea188f5 t1404: mark directory/file conflict tests with REFFILES\n     @@ Commit message\n      \n          cannot be executed in the files backend, as one cannot take a lock on foo/bar.\n      \n     -    The result is a repo with just \"foo/bar\", which has no directory/file conflict,\n     -    and this is a valid transaction in reftable.\n     +    The current reftable proof-of-concept integration supports these tranactions, as\n     +    the result is a repo with just \"foo/bar\", which has no directory/file conflict.\n      \n          Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>\n      \n     @@ t/t1404-update-ref-errors.sh: test_expect_success REFFILES 'empty directory shou\n       '\n       \n      -test_expect_success 'D/F conflict prevents add long + delete short' '\n     -+test_expect_success REFFILES  'D/F conflict prevents add long + delete short' '\n     ++test_expect_success REFFILES 'D/F conflict prevents add long + delete short' '\n       \tdf_test refs/df-al-ds --add-del foo/bar foo\n       '\n       \n     @@ t/t1404-update-ref-errors.sh: test_expect_success REFFILES 'empty directory shou\n       '\n       \n      -test_expect_success 'D/F conflict prevents delete long + add short' '\n     -+test_expect_success REFFILES  'D/F conflict prevents delete long + add short' '\n     ++test_expect_success REFFILES 'D/F conflict prevents delete long + add short' '\n       \tdf_test refs/df-dl-as --del-add foo/bar foo\n       '\n       \n     @@ t/t1404-update-ref-errors.sh: test_expect_success REFFILES 'empty directory shou\n       '\n       \n      -test_expect_success 'D/F conflict prevents indirect add long + indirect delete short' '\n     -+test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short' '\n     -+\tdf_test refs/df-ial-ds --sym-add --add-del foo/bar foo\n     -+'\n     -+\n     -+test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short' '\n     -+\tdf_test refs/df-ial-ds --sym-add --add-del foo/bar foo\n     -+'\n     -+\n      +test_expect_success REFFILES 'D/F conflict prevents indirect add long + indirect delete short' '\n       \tdf_test refs/df-ial-ids --sym-add --sym-del --add-del foo/bar foo\n       '\n\n\n t/t1404-update-ref-errors.sh | 32 ++++++++++++++++----------------\n 1 file changed, 16 insertions(+), 16 deletions(-)\n\ndiff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh\nindex b729c1f4803..13c2b43bbae 100755\n--- a/t/t1404-update-ref-errors.sh\n+++ b/t/t1404-update-ref-errors.sh\n@@ -261,69 +261,69 @@ test_expect_success REFFILES 'empty directory should not fool 1-arg delete' '\n \tgit update-ref --stdin\n '\n \n-test_expect_success 'D/F conflict prevents add long + delete short' '\n+test_expect_success REFFILES 'D/F conflict prevents add long + delete short' '\n \tdf_test refs/df-al-ds --add-del foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents add short + delete long' '\n+test_expect_success REFFILES 'D/F conflict prevents add short + delete long' '\n \tdf_test refs/df-as-dl --add-del foo foo/bar\n '\n \n-test_expect_success 'D/F conflict prevents delete long + add short' '\n+test_expect_success REFFILES 'D/F conflict prevents delete long + add short' '\n \tdf_test refs/df-dl-as --del-add foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents delete short + add long' '\n+test_expect_success REFFILES 'D/F conflict prevents delete short + add long' '\n \tdf_test refs/df-ds-al --del-add foo foo/bar\n '\n \n-test_expect_success 'D/F conflict prevents add long + delete short packed' '\n+test_expect_success REFFILES 'D/F conflict prevents add long + delete short packed' '\n \tdf_test refs/df-al-dsp --pack --add-del foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents add short + delete long packed' '\n+test_expect_success REFFILES 'D/F conflict prevents add short + delete long packed' '\n \tdf_test refs/df-as-dlp --pack --add-del foo foo/bar\n '\n \n-test_expect_success 'D/F conflict prevents delete long packed + add short' '\n+test_expect_success REFFILES 'D/F conflict prevents delete long packed + add short' '\n \tdf_test refs/df-dlp-as --pack --del-add foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents delete short packed + add long' '\n+test_expect_success REFFILES 'D/F conflict prevents delete short packed + add long' '\n \tdf_test refs/df-dsp-al --pack --del-add foo foo/bar\n '\n \n # Try some combinations involving symbolic refs...\n \n-test_expect_success 'D/F conflict prevents indirect add long + delete short' '\n+test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short' '\n \tdf_test refs/df-ial-ds --sym-add --add-del foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents indirect add long + indirect delete short' '\n+test_expect_success REFFILES 'D/F conflict prevents indirect add long + indirect delete short' '\n \tdf_test refs/df-ial-ids --sym-add --sym-del --add-del foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents indirect add short + indirect delete long' '\n+test_expect_success REFFILES 'D/F conflict prevents indirect add short + indirect delete long' '\n \tdf_test refs/df-ias-idl --sym-add --sym-del --add-del foo foo/bar\n '\n \n-test_expect_success 'D/F conflict prevents indirect delete long + indirect add short' '\n+test_expect_success REFFILES 'D/F conflict prevents indirect delete long + indirect add short' '\n \tdf_test refs/df-idl-ias --sym-add --sym-del --del-add foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents indirect add long + delete short packed' '\n+test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short packed' '\n \tdf_test refs/df-ial-dsp --sym-add --pack --add-del foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents indirect add long + indirect delete short packed' '\n+test_expect_success REFFILES 'D/F conflict prevents indirect add long + indirect delete short packed' '\n \tdf_test refs/df-ial-idsp --sym-add --sym-del --pack --add-del foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents add long + indirect delete short packed' '\n+test_expect_success REFFILES 'D/F conflict prevents add long + indirect delete short packed' '\n \tdf_test refs/df-al-idsp --sym-del --pack --add-del foo/bar foo\n '\n \n-test_expect_success 'D/F conflict prevents indirect delete long packed + indirect add short' '\n+test_expect_success REFFILES 'D/F conflict prevents indirect delete long packed + indirect add short' '\n \tdf_test refs/df-idlp-ias --sym-add --sym-del --pack --del-add foo/bar foo\n '\n \n\nbase-commit: 35151cf0720460a897cde9b8039af364743240e7\n-- \ngitgitgadget\n"}]}