documentation: add documentation for 'git version'

While 'git version' is probably the least complex git command, it is a non-experimental user-facing builtin command. As such it should have a help page. Both `git help` and `git version` can be called as options (`--help`/`--version`) that internally get converted to the corresponding command. Add a small paragraph to Documentation/git.txt describing how these two options interact with each other and link to this help page for the sub-options that `--version` can take. Well, currently there is only one sub-option, but that could potentially increase in future versions of Git. Signed-off-by: Matthias Aßhauer <mha1993@live.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Matthias Aßhauer committed Sep 14, 2021 at 13:27 UTC b6d8887d3d607e0da971218f20428c0635c6362c
2 files changed +32
Documentation/git-version.txt new
+28
@@ -0,0 +1,28 @@
1 +git-version(1)
2 +==============
3 +
4 +NAME
5 +----
6 +git-version - Display version information about Git
7 +
8 +SYNOPSIS
9 +--------
10 +[verse]
11 +'git version' [--build-options]
12 +
13 +DESCRIPTION
14 +-----------
15 +With no options given, the version of 'git' is printed on the standard output.
16 +
17 +Note that `git --version` is identical to `git version` because the
18 +former is internally converted into the latter.
19 +
20 +OPTIONS
21 +-------
22 +--build-options::
23 + Include additional information about how git was built for diagnostic
24 + purposes.
25 +
26 +GIT
27 +---
28 +Part of the linkgit:git[1] suite
Documentation/git.txt
+4
@@ -41,6 +41,10 @@ OPTIONS
41 -------
42 --version::
43 Prints the Git suite version that the 'git' program came from.
44 ++
45 +This option is internaly converted to `git version ...` and accepts
46 +the same options as the linkgit:git-version[1] command. If `--help` is
47 +also given, it takes precedence over `--version`.
48
49 --help::
50 Prints the synopsis and a list of the most commonly used