git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>
Cc: GIT Mailing-list <git@vger.kernel.org>,
	 Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: seen branch dirty after 'make clean'
Date: Mon, 22 Jul 2024 09:18:44 -0700	[thread overview]
Message-ID: <xmqq34o1fli3.fsf@gitster.g> (raw)
In-Reply-To: <57f9a518-8b71-442e-ae21-58b283b073a9@ramsayjones.plus.com> (Ramsay Jones's message of "Sun, 21 Jul 2024 21:43:29 +0100")

Ramsay Jones <ramsay@ramsayjones.plus.com> writes:

> Just a quick heads up; with current seen branch, if you do a 'make clean'
> before building (as I routinely do), then:
>   $ git describe --dirty
>   v2.46.0-rc1-129-g19a89823f5
>   $ 
>  
> This is because commit dbc2de902e ("asciidoctor: fix `synopsis` rendering",
> 2024-07-20) adds a tracked file (Documentation/docinfo.html) which the clean
> target deletes (via *.html).

Not just "make clean" but Documentation/.gitignore explicitly says
that in this project, we consider HTML files expendable, which is a
sensible stance to take, because they are generated from other
sources and nobody ought to be writing HTML by hand.

Let me squash this (or something like that) in.

Thanks.

 Documentation/Makefile                          | 5 +++++
 Documentation/{docinfo.html => docinfo-html.in} | 0
 2 files changed, 5 insertions(+)

diff --git c/Documentation/Makefile w/Documentation/Makefile
index 78e407e4bd..371d56eb5e 100644
--- c/Documentation/Makefile
+++ w/Documentation/Makefile
@@ -209,6 +209,8 @@ XMLTO_EXTRA += --skip-validation
 XMLTO_EXTRA += -x manpage.xsl
 endif
 
+ASCIIDOC_DEPS += docinfo.html
+
 SHELL_PATH ?= $(SHELL)
 # Shell quote;
 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
@@ -337,6 +339,9 @@ clean:
 	$(RM) $(cmds_txt) $(mergetools_txt) *.made
 	$(RM) GIT-ASCIIDOCFLAGS
 
+docinfo.html: docinfo-html.in
+	$(QUIET_GEN)$(RM) $@ && cat $< >$@
+
 $(MAN_HTML): %.html : %.txt $(ASCIIDOC_DEPS)
 	$(QUIET_ASCIIDOC)$(TXT_TO_HTML) -d manpage -o $@ $<
 
diff --git c/Documentation/docinfo.html w/Documentation/docinfo-html.in
similarity index 100%
rename from Documentation/docinfo.html
rename to Documentation/docinfo-html.in

      reply	other threads:[~2024-07-22 16:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-21 20:43 seen branch dirty after 'make clean' Ramsay Jones
2024-07-22 16:18 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq34o1fli3.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=ramsay@ramsayjones.plus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).