{"thread":{"id":"61817","subject":"seen branch dirty after 'make clean'","startedAt":"2024-07-21T20:46:39Z","lastAt":"2024-07-22T16:18:55Z","messageCount":2,"participants":["Ramsay Jones","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"499033","messageId":"57f9a518-8b71-442e-ae21-58b283b073a9@ramsayjones.plus.com","threadId":"61817","inReplyTo":null,"subject":"seen branch dirty after 'make clean'","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2024-07-21T20:43:29Z","receivedAt":"2024-07-21T20:46:39Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nJust a quick heads up; with current seen branch, if you do a 'make clean'\nbefore building (as I routinely do), then:\n\n  $ pwd\n  /home/ramsay/git\n  $ \n\n  $ git gcs HEAD\n  19a89823f5 (\"Merge branch 'pw/add-patch-with-suppress-blank-empty' into seen\", 2024-07-20)\n  $ \n\n  $ make clean >/dev/null\n  $ \n\n  $ git status -uno\n  On branch seen\n  Your branch is up-to-date with 'origin/seen'.\n  \n  Changes not staged for commit:\n    (use \"git add/rm <file>...\" to update what will be committed)\n    (use \"git restore <file>...\" to discard changes in working directory)\n  \tdeleted:    Documentation/docinfo.html\n  \n  no changes added to commit (use \"git add\" and/or \"git commit -a\")\n  $ \n\n  $ git describe --dirty\n  v2.46.0-rc1-129-g19a89823f5-dirty\n  $ \n\n  $ git restore Documentation/docinfo.html\n  $ \n\n  $ git status -uno\n  On branch seen\n  Your branch is up-to-date with 'origin/seen'.\n  \n  nothing to commit (use -u to show untracked files)\n  $ \n\n  $ git describe --dirty\n  v2.46.0-rc1-129-g19a89823f5\n  $ \n \nThis is because commit dbc2de902e (\"asciidoctor: fix `synopsis` rendering\",\n2024-07-20) adds a tracked file (Documentation/docinfo.html) which the clean\ntarget deletes (via *.html).\n\nATB,\nRamsay Jones\n\n"},{"id":"499061","messageId":"xmqq34o1fli3.fsf@gitster.g","threadId":"61817","inReplyTo":"57f9a518-8b71-442e-ae21-58b283b073a9@ramsayjones.plus.com","subject":"Re: seen branch dirty after 'make clean'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-07-22T16:18:44Z","receivedAt":"2024-07-22T16:18:55Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramsay Jones <ramsay@ramsayjones.plus.com> writes:\n\n> Just a quick heads up; with current seen branch, if you do a 'make clean'\n> before building (as I routinely do), then:\n>   $ git describe --dirty\n>   v2.46.0-rc1-129-g19a89823f5\n>   $ \n>  \n> This is because commit dbc2de902e (\"asciidoctor: fix `synopsis` rendering\",\n> 2024-07-20) adds a tracked file (Documentation/docinfo.html) which the clean\n> target deletes (via *.html).\n\nNot just \"make clean\" but Documentation/.gitignore explicitly says\nthat in this project, we consider HTML files expendable, which is a\nsensible stance to take, because they are generated from other\nsources and nobody ought to be writing HTML by hand.\n\nLet me squash this (or something like that) in.\n\nThanks.\n\n Documentation/Makefile                          | 5 +++++\n Documentation/{docinfo.html => docinfo-html.in} | 0\n 2 files changed, 5 insertions(+)\n\ndiff --git c/Documentation/Makefile w/Documentation/Makefile\nindex 78e407e4bd..371d56eb5e 100644\n--- c/Documentation/Makefile\n+++ w/Documentation/Makefile\n@@ -209,6 +209,8 @@ XMLTO_EXTRA += --skip-validation\n XMLTO_EXTRA += -x manpage.xsl\n endif\n \n+ASCIIDOC_DEPS += docinfo.html\n+\n SHELL_PATH ?= $(SHELL)\n # Shell quote;\n SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))\n@@ -337,6 +339,9 @@ clean:\n \t$(RM) $(cmds_txt) $(mergetools_txt) *.made\n \t$(RM) GIT-ASCIIDOCFLAGS\n \n+docinfo.html: docinfo-html.in\n+\t$(QUIET_GEN)$(RM) $@ && cat $< >$@\n+\n $(MAN_HTML): %.html : %.txt $(ASCIIDOC_DEPS)\n \t$(QUIET_ASCIIDOC)$(TXT_TO_HTML) -d manpage -o $@ $<\n \ndiff --git c/Documentation/docinfo.html w/Documentation/docinfo-html.in\nsimilarity index 100%\nrename from Documentation/docinfo.html\nrename to Documentation/docinfo-html.in\n"}]}