git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] doc: set actual revdate for manpages

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 14, 2023, 16:20 UTC
Message-ID
<64397d3d67d21_5e3ce294a6@chronos.notmuch>
In-Reply-To
<xmqq5y9yv601.fsf@gitster.g>
Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
Show 28 quoted lines
> > diff --git a/Documentation/Makefile b/Documentation/Makefile
> > index 2ccc3a9bc9..307634a94f 100644
> > --- a/Documentation/Makefile
> > +++ b/Documentation/Makefile
> > @@ -144,8 +144,6 @@ man5dir = $(mandir)/man5
> >  man7dir = $(mandir)/man7
> >  # DESTDIR =
> >  
> > -GIT_DATE := $(shell git show --quiet --pretty='%as')
> > -
> >  ASCIIDOC = asciidoc
> >  ASCIIDOC_EXTRA =
> >  ASCIIDOC_HTML = xhtml11
> > diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
> > index 9a1111af9b..14903bd261 100755
> > --- a/GIT-VERSION-GEN
> > +++ b/GIT-VERSION-GEN
> > @@ -10,7 +10,8 @@ LF='
> >  # then try git-describe, then default.
> >  if test -f version
> >  then
> > -	VN=$(cat version) || VN="$DEF_VER"
> > +	VN=$(cut -d" " -f1 version) || VN="$DEF_VER"
> > +	DN=$(cut -d" " -f2 version) || DN=""
> 
> Are we sure historical GIT_VERSION strings never had a SP in it?
> I would be very surprised if we did, but the correctness of the
> approach depends on that assumption.
Why would that matter?

Supposing a hypothetical tarball with a version '0.99 foo', it would have a corresponding GIT-VERSION-GEN (which didn't check for such file until 1.1.1), and it would know how to parse it.

In other words: all three are tied together: the 'version' file, the GIT-VERSION-GEN script, and the tarball that has them both.

-- 
Felipe Contreras
Previous: Junio C HamanoNext: Junio C Hamano
Message 12 of 14 in “doc: set actual revdate for manpages”
  1. doc: set actual revdate for manpagesFelipe Contreras, Apr 13, 2023
  2. Jeff KingApr 14, 2023
  3. Felipe ContrerasApr 14, 2023
  4. Junio C HamanoApr 14, 2023
  5. Junio C HamanoApr 14, 2023
  6. Felipe ContrerasApr 14, 2023
  7. Felipe ContrerasApr 14, 2023
  8. Jeff KingApr 14, 2023
  9. Junio C HamanoApr 14, 2023
  10. Jeff KingApr 14, 2023
  11. Junio C HamanoApr 14, 2023
  12. Felipe ContrerasApr 14, 2023
  13. Junio C HamanoApr 14, 2023
  14. Felipe ContrerasApr 14, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.