From: Felipe Contreras <felipe.contreras@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
Felipe Contreras <felipe.contreras@gmail.com>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: [PATCH] doc: set actual revdate for manpages
Date: Fri, 14 Apr 2023 12:59:24 -0600 [thread overview]
Message-ID: <6439a28c34fe7_5f77329440@chronos.notmuch> (raw)
In-Reply-To: <xmqqv8hyqsc6.fsf@gitster.g>
Junio C Hamano wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
> >> 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?
>
> Ah, that is true. What I should have worried more about was the
> distribution package maintainers who may set their own version by
> writing it in the "version" file themselves.
In reality they don't do that. I checked Arch Linux, Fedora, and Debian,
and all of them leave the version alone.
It does make sense becasue for example in Arch Linux `2.40.0-1` means
version `2.40.0`, release `1`. I believe all packaging systems use the
same semantical distinction.
I asked ChatGPT, and this is what it said about `-1`:
-1 is the package release number. This number is used by the package
maintainers to indicate how many times the package has been built and
released. This number is typically incremented each time a new build
of the package is released, even if the underlying software has not
changed.
So it makes sense for `git --version` to return the upstream version,
not the package release number, and that's why packagers don't mess with
that.
Either way, even though I don't think it matters in practice, I
generally prefer to separate fields with tabs, or even newlines. If you
consider this an issue, we could do:
printf '%s\n' $(GIT_VERSION) $(GIT_DATE) >version
read -d'' VN DN <version
Cheers.
--
Felipe Contreras
prev parent reply other threads:[~2023-04-14 18:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 7:47 [PATCH] doc: set actual revdate for manpages Felipe Contreras
2023-04-14 7:04 ` Jeff King
2023-04-14 12:40 ` Felipe Contreras
2023-04-14 16:46 ` Junio C Hamano
2023-04-14 17:14 ` Junio C Hamano
2023-04-14 18:40 ` Felipe Contreras
2023-04-14 18:26 ` Felipe Contreras
2023-04-14 21:45 ` Jeff King
2023-04-14 22:06 ` Junio C Hamano
2023-04-14 21:35 ` Jeff King
2023-04-14 15:27 ` Junio C Hamano
2023-04-14 16:20 ` Felipe Contreras
2023-04-14 17:36 ` Junio C Hamano
2023-04-14 18:59 ` Felipe Contreras [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=6439a28c34fe7_5f77329440@chronos.notmuch \
--to=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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).