{"thread":{"id":"53481","subject":"Re: [PATCH v7 1/4] gitfaq: files in .gitignore are tracked","startedAt":"2020-05-15T17:32:20Z","lastAt":"2020-05-19T04:53:14Z","messageCount":2,"participants":["Son Luong Ngoc","Todd Zullinger"],"isPatch":true,"patchVersion":7,"patchTotal":4},"messages":[{"id":"397906","messageId":"CAL3xRKdwOASiGys+7Uu_OA5kBPrTdAURfEw3UQ+rguTXT+C6JQ@mail.gmail.com","threadId":"53481","inReplyTo":null,"subject":"Re: [PATCH v7 1/4] gitfaq: files in .gitignore are tracked","fromName":"Son Luong Ngoc","fromEmail":"sluongng@gmail.com","sentAt":"2020-05-15T17:32:05Z","receivedAt":"2020-05-15T17:32:20Z","isPatch":true,"sender":{"key":"sluongng@gmail.com","avatar":"https://avatars.githubusercontent.com/u/26684313?v=4"},"body":"Hey folks,\n\n> Add issue in 'Common Issues' section which addresses the problem of\n> Git tracking files/paths mentioned in '.gitignore'.\n>\n> Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>\n> ---\n>  Documentation/gitfaq.txt | 10 ++++++++++\n>  1 file changed, 10 insertions(+)\n>\n> diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt\n> index 1cf83df118..11d9bac859 100644\n> --- a/Documentation/gitfaq.txt\n> +++ b/Documentation/gitfaq.txt\n> @@ -223,6 +223,16 @@ a file checked into the repository which is a template or set of defaults which\n>  can then be copied alongside and modified as appropriate.  This second, modified\n>  file is usually ignored to prevent accidentally committing it.\n>\n> +[[files-in-.gitignore-are-tracked]]\n\nThis does not work for older xmlto(centos6) for whatever reason.\n```\n# make doc\n...\n# xmlto -m manpage-normal.xsl  -m manpage-bold-literal.xsl -m\nmanpage-base-url.xsl man gitfaq.xml\nxmlto: /<git-dir>/Documentation/gitfaq.xml does not validate (status 3)\nxmlto: Fix document syntax or use --skip-validation option\n/<git-dir>/Documentation/gitfaq.xml:3: element refentry: validity\nerror : Element refentry content does not follow the DTD, expecting\n(beginpage? , indexterm* , refentryinfo? , refmeta? , (remark | link |\nolink | ulink)* , refnamediv+ , refsynopsisdiv? , (refsect1+ |\nrefsection+)), got (refmeta refnamediv refsynopsisdiv refsect1\nrefsect1 refsect1 refsect1 variablelist refsect1 refsect1 )\n```\n\nBuild went fine on Centos7 and Centos8 though.\n\nI ran a quick sed to temporarily fix the problem\n```\nsed -i 's/files-in-\\.gitignore/files-in-gitignore/g' Documentation/gitfaq.txt\n```\n\nBut I suggest to just remove the period from this heading.\n\n> +I asked Git to ignore various files, yet they are still tracked::\n> + A `gitignore` file ensures that certain file(s) which are not\n> + tracked by Git remain untracked.  However, sometimes particular\n> + file(s) may have been tracked before adding them into the\n> + `.gitignore`, hence they still remain tracked.  To untrack and\n> + ignore files/patterns, use `git rm --cached <file/pattern>`\n> + and add a pattern to `.gitignore` that matches the <file>.\n> + See linkgit:gitignore[5] for details.\n> +\n>  Hooks\n>  -----\n>\n> --\n> 2.26.2\n\nCheers,\nSon Luong.\n"},{"id":"398179","messageId":"20200519045301.GY24220@pobox.com","threadId":"53481","inReplyTo":"CAL3xRKdwOASiGys+7Uu_OA5kBPrTdAURfEw3UQ+rguTXT+C6JQ@mail.gmail.com","subject":"Re: [PATCH v7 1/4] gitfaq: files in .gitignore are tracked","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2020-05-19T04:53:01Z","receivedAt":"2020-05-19T04:53:14Z","isPatch":true,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"Hi,\n\nSon Luong Ngoc wrote:\n> Hey folks,\n> \n>> Add issue in 'Common Issues' section which addresses the problem of\n>> Git tracking files/paths mentioned in '.gitignore'.\n>>\n>> Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>\n>> ---\n>>  Documentation/gitfaq.txt | 10 ++++++++++\n>>  1 file changed, 10 insertions(+)\n>>\n>> diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt\n>> index 1cf83df118..11d9bac859 100644\n>> --- a/Documentation/gitfaq.txt\n>> +++ b/Documentation/gitfaq.txt\n>> @@ -223,6 +223,16 @@ a file checked into the repository which is a template or set of defaults which\n>>  can then be copied alongside and modified as appropriate.  This second, modified\n>>  file is usually ignored to prevent accidentally committing it.\n>>\n>> +[[files-in-.gitignore-are-tracked]]\n> \n> This does not work for older xmlto(centos6) for whatever reason.\n> ```\n> # make doc\n> ...\n> # xmlto -m manpage-normal.xsl  -m manpage-bold-literal.xsl -m\n> manpage-base-url.xsl man gitfaq.xml\n> xmlto: /<git-dir>/Documentation/gitfaq.xml does not validate (status 3)\n> xmlto: Fix document syntax or use --skip-validation option\n> /<git-dir>/Documentation/gitfaq.xml:3: element refentry: validity\n> error : Element refentry content does not follow the DTD, expecting\n> (beginpage? , indexterm* , refentryinfo? , refmeta? , (remark | link |\n> olink | ulink)* , refnamediv+ , refsynopsisdiv? , (refsect1+ |\n> refsection+)), got (refmeta refnamediv refsynopsisdiv refsect1\n> refsect1 refsect1 refsect1 variablelist refsect1 refsect1 )\n> ```\n\nI ran into this as well.  I _think_ this is an asciidoc\nissue (but it could be further up the doc tools chain).  On\nCentOS 6, the asciidoc version is 8.4.5.  From earlier in\nthe make output:\n\n    make[1]: Leaving directory `/builddir/build/BUILD/git-2.27.0.rc0'\n    rm -f gitfaq.html+ gitfaq.html && \\\n\t    asciidoc  -f asciidoc.conf -amanversion=2.27.0.rc0 -amanmanual='Git Manual' -amansource='Git' -b xhtml11 -d manpage -o gitfaq.html+ gitfaq.txt && \\\n\t    mv gitfaq.html+ gitfaq.html\n    WARNING: gitfaq.txt: line 245: missing [[files-in-.gitignore-are-tracked]] section\n\nDropping the \".\" from the anchor name works around the\nfailure, which seems like a reasonable thing to do.  With\nthe age of asciidoc and CentOS 6 approaching end-of-life\nthis November, we wouldn't want to spend too much effort to\nwork around issues there.  But this seems like an easy way\nto allow the documentation to continue to build on such old\nplatforms.\n\nThere do appear to be other issues with the asciidoc's\nparsing of the anchors, as some of the others are either not\nincluded in the xml and html or are not quite in the place\nthey should be.  I didn't see an obvious reason for that,\nbut I didn't spend all that long looking over gitfaq.txt\nbecause I imagine there are plenty of minor issues with\nasciidoc-8.4.5.\n\nI thought this change in asciidoc might have fixed the\nissue:\n\n    https://github.com/asciidoc/asciidoc/commit/4ceeb32\n\nBut I didn't have any luck after applying that to\nasciidoc-8.4.5.\n\nAnyway, here's the quick work-around in patch form.\n\n-- >8 --\nSubject: [PATCH] gitfaq: avoid validation error with older asciidoc\n\nWhen building with asciidoc-8.4.5 (as found on CentOS/Red Hat 6), the\nperiod in the \"[[files-in-.gitignore-are-tracked]]\" anchor is not\nproperly parsed as a section:\n\n  WARNING: gitfaq.txt: line 245: missing [[files-in-.gitignore-are-tracked]] section\n\nThe resulting XML file fails to validate with xmlto:\n\n    xmlto: /git/Documentation/gitfaq.xml does not validate (status 3)\n    xmlto: Fix document syntax or use --skip-validation option\n     /git/Documentation/gitfaq.xml:3: element refentry: validity error :\n     Element refentry content does not follow the DTD, expecting\n     (beginpage? , indexterm* , refentryinfo? , refmeta? , (remark | link\n     | olink | ulink)* , refnamediv+ , refsynopsisdiv? , (refsect1+ |\n     refsection+)), got (refmeta refnamediv refsynopsisdiv refsect1\n     refsect1 refsect1 refsect1 variablelist refsect1 refsect1 )\n    Document /git/Documentation/gitfaq.xml does not validate\n\nLet's avoid breaking users of platforms which ship an old version of\nasciidoc, since the cost to do so is quite low.\n\nReported-by: Son Luong Ngoc <sluongng@gmail.com>\nSigned-off-by: Todd Zullinger <tmz@pobox.com>\n---\n Documentation/gitfaq.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt\nindex 370d62dae4..9cd7a592ac 100644\n--- a/Documentation/gitfaq.txt\n+++ b/Documentation/gitfaq.txt\n@@ -223,7 +223,7 @@ a file checked into the repository which is a template or set of defaults which\n can then be copied alongside and modified as appropriate.  This second, modified\n file is usually ignored to prevent accidentally committing it.\n \n-[[files-in-.gitignore-are-tracked]]\n+[[files-in-gitignore-are-tracked]]\n I asked Git to ignore various files, yet they are still tracked::\n \tA `gitignore` file ensures that certain file(s) which are not\n \ttracked by Git remain untracked.  However, sometimes particular\n-- \n2.26.1\n\n-- >8 --\n\n-- \nTodd\n"}]}