summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/.gitignore3
-rw-r--r--Documentation/BreakingChanges.txt25
-rw-r--r--Documentation/CodingGuidelines22
-rw-r--r--Documentation/Makefile82
-rw-r--r--Documentation/RelNotes/2.40.4.txt5
-rw-r--r--Documentation/RelNotes/2.41.3.txt6
-rw-r--r--Documentation/RelNotes/2.42.4.txt6
-rw-r--r--Documentation/RelNotes/2.43.6.txt7
-rw-r--r--Documentation/RelNotes/2.44.3.txt7
-rw-r--r--Documentation/RelNotes/2.45.3.txt7
-rw-r--r--Documentation/RelNotes/2.46.3.txt6
-rw-r--r--Documentation/RelNotes/2.47.2.txt7
-rw-r--r--Documentation/RelNotes/2.48.0.txt137
-rw-r--r--Documentation/RelNotes/2.48.1.txt7
-rw-r--r--Documentation/RelNotes/2.49.0.txt140
-rw-r--r--Documentation/SubmittingPatches11
-rw-r--r--Documentation/asciidoc.conf.in (renamed from Documentation/asciidoc.conf)13
-rw-r--r--Documentation/asciidoctor-extensions.rb.in (renamed from Documentation/asciidoctor-extensions.rb)11
-rwxr-xr-xDocumentation/build-docdep.perl2
-rwxr-xr-xDocumentation/cmd-list.perl23
-rw-r--r--Documentation/config/commit.txt25
-rw-r--r--Documentation/config/credential.txt11
-rw-r--r--Documentation/config/diff.txt2
-rw-r--r--Documentation/config/difftool.txt2
-rw-r--r--Documentation/config/extensions.txt6
-rw-r--r--Documentation/config/merge.txt2
-rw-r--r--Documentation/config/notes.txt32
-rw-r--r--Documentation/config/remote.txt13
-rw-r--r--Documentation/config/worktree.txt10
-rwxr-xr-xDocumentation/generate-mergetool-list.sh17
-rw-r--r--Documentation/git-bundle.txt2
-rw-r--r--Documentation/git-clone.txt9
-rw-r--r--Documentation/git-commit.txt281
-rw-r--r--Documentation/git-credential-cache.txt17
-rw-r--r--Documentation/git-notes.txt191
-rw-r--r--Documentation/git-range-diff.txt17
-rw-r--r--Documentation/git-refs.txt2
-rw-r--r--Documentation/git-restore.txt110
-rw-r--r--Documentation/git-show-index.txt2
-rw-r--r--Documentation/git-update-ref.txt8
-rw-r--r--Documentation/git-worktree.txt8
-rw-r--r--Documentation/git.txt32
-rw-r--r--Documentation/gitattributes.txt2
-rw-r--r--Documentation/gitcli.txt26
-rw-r--r--Documentation/gitcredentials.txt47
-rw-r--r--Documentation/gitrepository-layout.txt7
-rwxr-xr-xDocumentation/howto/howto-index.sh (renamed from Documentation/howto-index.sh)2
-rw-r--r--Documentation/howto/meson.build62
-rw-r--r--Documentation/i18n.txt4
-rw-r--r--Documentation/meson.build504
-rw-r--r--Documentation/rev-list-options.txt3
-rw-r--r--Documentation/signoff-option.txt8
-rwxr-xr-xDocumentation/technical/api-index.sh19
-rw-r--r--Documentation/technical/build-systems.txt224
-rw-r--r--Documentation/technical/meson.build67
-rw-r--r--Documentation/user-manual.conf11
56 files changed, 1862 insertions, 450 deletions
diff --git a/Documentation/.gitignore b/Documentation/.gitignore
index a48448de32..9f4bb3c4bf 100644
--- a/Documentation/.gitignore
+++ b/Documentation/.gitignore
@@ -12,6 +12,9 @@ cmds-*.txt
mergetools-*.txt
SubmittingPatches.txt
tmp-doc-diff/
+tmp-meson-diff/
GIT-ASCIIDOCFLAGS
/.build/
/GIT-EXCLUDED-PROGRAMS
+/asciidoc.conf
+/asciidoctor-extensions.rb
diff --git a/Documentation/BreakingChanges.txt b/Documentation/BreakingChanges.txt
index 27acff86db..7c388e56c8 100644
--- a/Documentation/BreakingChanges.txt
+++ b/Documentation/BreakingChanges.txt
@@ -154,6 +154,31 @@ Cf. <xmqq1rjuz6n3.fsf_-_@gitster.c.googlers.com>,
<CAKvOHKAFXQwt4D8yUCCkf_TQL79mYaJ=KAKhtpDNTvHJFuX1NA@mail.gmail.com>,
<20230323204047.GA9290@coredump.intra.peff.net>,
+* Support for storing shorthands for remote URLs in "$GIT_COMMON_DIR/branches/"
+ and "$GIT_COMMON_DIR/remotes/" has been long superseded by storing remotes in
+ the repository configuration.
++
+The mechanism has originally been introduced in f170e4b39d ([PATCH] fetch/pull:
+short-hand notation for remote repositories., 2005-07-16) and was superseded by
+6687f8fea2 ([PATCH] Use .git/remote/origin, not .git/branches/origin.,
+2005-08-20), where we switched from ".git/branches/" to ".git/remotes/". That
+commit already mentions an upcoming deprecation of the ".git/branches/"
+directory, and starting with a1d4aa7424 (Add repository-layout document.,
+2005-09-01) we have also marked this layout as deprecated. Eventually we also
+started to migrate away from ".git/remotes/" in favor of config-based remotes,
+and we have marked the directory as legacy in 3d3d282146 (Documentation:
+Grammar correction, wording fixes and cleanup, 2011-08-23)
++
+As our documentation mentions, these directories are not to be found in modern
+repositories at all and most users aren't even aware of these mechanisms. They
+have been deprecated for almost 20 years and 14 years respectively, and we are
+not aware of any active users that have complained about this deprecation.
+Furthermore, the ".git/branches/" directory is nowadays misleadingly named and
+may cause confusion as "branches" are almost exclusively used in the context of
+references.
++
+These features will be removed.
+
== Superseded features that will not be deprecated
Some features have gained newer replacements that aim to improve the design in
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 87904791cb..ba047ed224 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -583,7 +583,7 @@ For C programs:
Run `GIT_DEBUGGER=1 ./bin-wrappers/git foo` to simply use gdb as is, or
run `GIT_DEBUGGER="<debugger> <debugger-args>" ./bin-wrappers/git foo` to
use your own debugger and arguments. Example: `GIT_DEBUGGER="ddd --gdb"
- ./bin-wrappers/git log` (See `wrap-for-bin.sh`.)
+ ./bin-wrappers/git log` (See `bin-wrappers/wrap-for-bin.sh`.)
- The primary data structure that a subsystem 'S' deals with is called
`struct S`. Functions that operate on `struct S` are named
@@ -703,16 +703,30 @@ Program Output
Error Messages
- - Do not end error messages with a full stop.
+ - Do not end a single-sentence error message with a full stop.
- Do not capitalize the first word, only because it is the first word
- in the message ("unable to open %s", not "Unable to open %s"). But
+ in the message ("unable to open '%s'", not "Unable to open '%s'"). But
"SHA-3 not supported" is fine, because the reason the first word is
capitalized is not because it is at the beginning of the sentence,
but because the word would be spelled in capital letters even when
it appeared in the middle of the sentence.
- - Say what the error is first ("cannot open %s", not "%s: cannot open")
+ - Say what the error is first ("cannot open '%s'", not "%s: cannot open").
+
+ - Enclose the subject of an error inside a pair of single quotes,
+ e.g. `die(_("unable to open '%s'"), path)`.
+
+ - Unless there is a compelling reason not to, error messages from
+ porcelain commands should be marked for translation, e.g.
+ `die(_("bad revision %s"), revision)`.
+
+ - Error messages from the plumbing commands are sometimes meant for
+ machine consumption and should not be marked for translation,
+ e.g., `die("bad revision %s", revision)`.
+
+ - BUG("message") are for communicating the specific error to developers,
+ thus should not be translated.
Externally Visible Names
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 0f55baa252..aedfe99d1d 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -1,6 +1,8 @@
# Import tree-wide shared Makefile behavior and libraries
include ../shared.mak
+.PHONY: FORCE
+
# Guard against environment variables
MAN1_TXT =
MAN5_TXT =
@@ -111,6 +113,7 @@ TECH_DOCS += MyFirstObjectWalk
TECH_DOCS += SubmittingPatches
TECH_DOCS += ToolsForGit
TECH_DOCS += technical/bitmap-format
+TECH_DOCS += technical/build-systems
TECH_DOCS += technical/bundle-uri
TECH_DOCS += technical/hash-function-transition
TECH_DOCS += technical/long-running-process-protocol
@@ -148,16 +151,12 @@ man5dir = $(mandir)/man5
man7dir = $(mandir)/man7
# DESTDIR =
-GIT_DATE := $(shell git show --quiet --pretty='%as')
-
ASCIIDOC = asciidoc
ASCIIDOC_EXTRA =
ASCIIDOC_HTML = xhtml11
ASCIIDOC_DOCBOOK = docbook
ASCIIDOC_CONF = -f asciidoc.conf
-ASCIIDOC_COMMON = $(ASCIIDOC) $(ASCIIDOC_EXTRA) $(ASCIIDOC_CONF) \
- -amanmanual='Git Manual' -amansource='Git $(GIT_VERSION)' \
- -arevdate='$(GIT_DATE)'
+ASCIIDOC_COMMON = $(ASCIIDOC) $(ASCIIDOC_EXTRA) $(ASCIIDOC_CONF)
ASCIIDOC_DEPS = asciidoc.conf GIT-ASCIIDOCFLAGS
TXT_TO_HTML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_HTML)
TXT_TO_XML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_DOCBOOK)
@@ -182,6 +181,10 @@ endif
-include ../config.mak.autogen
-include ../config.mak
+# Set GIT_VERSION_OVERRIDE such that version_gen knows to substitute
+# GIT_VERSION in case it was set by the user.
+GIT_VERSION_OVERRIDE := $(GIT_VERSION)
+
ifndef NO_MAN_BOLD_LITERAL
XMLTO_EXTRA += -m manpage-bold-literal.xsl
endif
@@ -210,6 +213,12 @@ ASCIIDOC_DEPS = asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
DBLATEX_COMMON =
XMLTO_EXTRA += --skip-validation
XMLTO_EXTRA += -x manpage.xsl
+
+asciidoctor-extensions.rb: asciidoctor-extensions.rb.in FORCE
+ $(QUIET_GEN)$(call version_gen,"$(shell pwd)/..",$<,$@)
+else
+asciidoc.conf: asciidoc.conf.in FORCE
+ $(QUIET_GEN)$(call version_gen,"$(shell pwd)/..",$<,$@)
endif
ASCIIDOC_DEPS += docinfo.html
@@ -218,6 +227,7 @@ SHELL_PATH ?= $(SHELL)
# Shell quote;
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
+ASCIIDOC_EXTRA += -abuild_dir='$(shell pwd)'
ifdef DEFAULT_PAGER
DEFAULT_PAGER_SQ = $(subst ','\'',$(DEFAULT_PAGER))
ASCIIDOC_EXTRA += -a 'git-default-pager=$(DEFAULT_PAGER_SQ)'
@@ -268,22 +278,17 @@ install-pdf: pdf
install-html: html
'$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir)
-../GIT-VERSION-FILE: FORCE
- $(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) GIT-VERSION-FILE
-
-ifneq ($(filter-out lint-docs clean,$(MAKECMDGOALS)),)
--include ../GIT-VERSION-FILE
-endif
+mergetools_txt = mergetools-diff.txt mergetools-merge.txt
#
# Determine "include::" file references in asciidoc files.
#
docdep_prereqs = \
- mergetools-list.made $(mergetools_txt) \
+ $(mergetools_txt) \
cmd-list.made $(cmds_txt)
doc.dep : $(docdep_prereqs) $(DOC_DEP_TXT) build-docdep.perl
- $(QUIET_GEN)$(PERL_PATH) ./build-docdep.perl >$@ $(QUIET_STDERR)
+ $(QUIET_GEN)$(PERL_PATH) ./build-docdep.perl "$(shell pwd)" >$@ $(QUIET_STDERR)
ifneq ($(MAKECMDGOALS),clean)
-include doc.dep
@@ -305,22 +310,14 @@ cmds_txt = cmds-ancillaryinterrogators.txt \
$(cmds_txt): cmd-list.made
cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT)
- $(QUIET_GEN)$(PERL_PATH) ./cmd-list.perl ../command-list.txt $(cmds_txt) $(QUIET_STDERR) && \
+ $(QUIET_GEN)$(PERL_PATH) ./cmd-list.perl .. . $(cmds_txt) && \
date >$@
-mergetools_txt = mergetools-diff.txt mergetools-merge.txt
-
-$(mergetools_txt): mergetools-list.made
-
-mergetools-list.made: ../git-mergetool--lib.sh $(wildcard ../mergetools/*)
- $(QUIET_GEN) \
- $(SHELL_PATH) -c 'MERGE_TOOLS_DIR=../mergetools && TOOL_MODE=diff && \
- . ../git-mergetool--lib.sh && \
- show_tool_names can_diff' | sed -e "s/\([a-z0-9]*\)/\`\1\`;;/" >mergetools-diff.txt && \
- $(SHELL_PATH) -c 'MERGE_TOOLS_DIR=../mergetools && TOOL_MODE=merge && \
- . ../git-mergetool--lib.sh && \
- show_tool_names can_merge' | sed -e "s/\([a-z0-9]*\)/\`\1\`;;/" >mergetools-merge.txt && \
- date >$@
+mergetools-%.txt: generate-mergetool-list.sh ../git-mergetool--lib.sh $(wildcard ../mergetools/*)
+mergetools-diff.txt:
+ $(QUIET_GEN)$(SHELL_PATH) ./generate-mergetool-list.sh .. diff $@
+mergetools-merge.txt:
+ $(QUIET_GEN)$(SHELL_PATH) ./generate-mergetool-list.sh .. merge $@
TRACK_ASCIIDOCFLAGS = $(subst ','\'',$(ASCIIDOC_COMMON):$(ASCIIDOC_HTML):$(ASCIIDOC_DOCBOOK))
@@ -341,6 +338,8 @@ clean:
$(RM) SubmittingPatches.txt
$(RM) $(cmds_txt) $(mergetools_txt) *.made
$(RM) GIT-ASCIIDOCFLAGS
+ $(RM) asciidoc.conf asciidoctor-extensions.rb
+ $(RM) -rf tmp-meson-diff
docinfo.html: docinfo-html.in
$(QUIET_GEN)$(RM) $@ && cat $< >$@
@@ -364,16 +363,16 @@ manpage-cmd = $(QUIET_XMLTO)$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
%.xml : %.txt $(ASCIIDOC_DEPS)
$(QUIET_ASCIIDOC)$(TXT_TO_XML) -d manpage -o $@ $<
-user-manual.xml: user-manual.txt user-manual.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
+user-manual.xml: user-manual.txt $(ASCIIDOC_DEPS)
$(QUIET_ASCIIDOC)$(TXT_TO_XML) -d book -o $@ $<
technical/api-index.txt: technical/api-index-skel.txt \
technical/api-index.sh $(patsubst %,%.txt,$(API_DOCS))
- $(QUIET_GEN)cd technical && '$(SHELL_PATH_SQ)' ./api-index.sh
+ $(QUIET_GEN)'$(SHELL_PATH_SQ)' technical/api-index.sh ./technical ./technical/api-index.txt
technical/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
$(patsubst %,%.html,$(API_DOCS) technical/api-index $(TECH_DOCS)): %.html : %.txt \
- asciidoc.conf GIT-ASCIIDOCFLAGS
+ $(ASCIIDOC_DEPS)
$(QUIET_ASCIIDOC)$(TXT_TO_HTML) $*.txt
SubmittingPatches.txt: SubmittingPatches
@@ -413,16 +412,16 @@ gitman.info: gitman.texi
$(patsubst %.txt,%.texi,$(MAN_TXT)): %.texi : %.xml
$(QUIET_DB2TEXI)$(DOCBOOK2X_TEXI) --to-stdout $*.xml >$@
-howto-index.txt: howto-index.sh $(HOWTO_TXT)
- $(QUIET_GEN)'$(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(HOWTO_TXT)) >$@
+howto-index.txt: howto/howto-index.sh $(HOWTO_TXT)
+ $(QUIET_GEN)'$(SHELL_PATH_SQ)' ./howto/howto-index.sh $(sort $(HOWTO_TXT)) >$@
-$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
+$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt $(ASCIIDOC_DEPS)
$(QUIET_ASCIIDOC)$(TXT_TO_HTML) $*.txt
WEBDOC_DEST = /pub/software/scm/git/docs
howto/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
-$(patsubst %.txt,%.html,$(HOWTO_TXT)): %.html : %.txt GIT-ASCIIDOCFLAGS
+$(patsubst %.txt,%.html,$(HOWTO_TXT)): %.html : %.txt $(ASCIIDOC_DEPS)
$(QUIET_ASCIIDOC) \
sed -e '1,/^$$/d' $< | \
$(TXT_TO_HTML) - >$@
@@ -496,6 +495,20 @@ lint-docs-fsck-msgids: $(LINT_DOCS_FSCK_MSGIDS)
lint-docs-manpages:
$(QUIET_GEN)./lint-manpages.sh
+.PHONY: lint-docs-meson
+lint-docs-meson:
+ @# awk acts up when trying to match single quotes, so we use \047 instead.
+ @mkdir -p tmp-meson-diff && \
+ awk "/^manpages = {$$/ {flag=1 ; next } /^}$$/ { flag=0 } flag { gsub(/^ \047/, \"\"); gsub(/\047 : [157],\$$/, \"\"); print }" meson.build | \
+ grep -v -e '#' -e '^$$' | \
+ sort >tmp-meson-diff/meson.txt && \
+ ls git*.txt scalar.txt | grep -v -e git-bisect-lk2009.txt -e git-tools.txt >tmp-meson-diff/actual.txt && \
+ if ! cmp tmp-meson-diff/meson.txt tmp-meson-diff/actual.txt; then \
+ echo "Meson man pages differ from actual man pages:"; \
+ diff -u tmp-meson-diff/meson.txt tmp-meson-diff/actual.txt; \
+ exit 1; \
+ fi
+
## Lint: list of targets above
.PHONY: lint-docs
lint-docs: lint-docs-fsck-msgids
@@ -503,6 +516,7 @@ lint-docs: lint-docs-gitlink
lint-docs: lint-docs-man-end-blurb
lint-docs: lint-docs-man-section-order
lint-docs: lint-docs-manpages
+lint-docs: lint-docs-meson
ifeq ($(wildcard po/Makefile),po/Makefile)
doc-l10n install-l10n::
diff --git a/Documentation/RelNotes/2.40.4.txt b/Documentation/RelNotes/2.40.4.txt
new file mode 100644
index 0000000000..0ff29f3cfc
--- /dev/null
+++ b/Documentation/RelNotes/2.40.4.txt
@@ -0,0 +1,5 @@
+Git v2.40.4 Release Notes
+=========================
+
+This release lets Git refuse to accept URLs that contain control
+sequences. This addresses CVE-2024-50349 and CVE-2024-52006.
diff --git a/Documentation/RelNotes/2.41.3.txt b/Documentation/RelNotes/2.41.3.txt
new file mode 100644
index 0000000000..b5aba88790
--- /dev/null
+++ b/Documentation/RelNotes/2.41.3.txt
@@ -0,0 +1,6 @@
+Git v2.41.3 Release Notes
+=========================
+
+This release merges up the fix that appears in v2.40.4 to address
+the security issues CVE-2024-50349 and CVE-2024-52006; see the
+release notes for that version for details.
diff --git a/Documentation/RelNotes/2.42.4.txt b/Documentation/RelNotes/2.42.4.txt
new file mode 100644
index 0000000000..3129d76e75
--- /dev/null
+++ b/Documentation/RelNotes/2.42.4.txt
@@ -0,0 +1,6 @@
+Git v2.42.4 Release Notes
+=========================
+
+This release merges up the fix that appears in v2.40.4 and v2.41.3
+to address the security issues CVE-2024-50349 and CVE-2024-52006;
+see the release notes for these versions for details.
diff --git a/Documentation/RelNotes/2.43.6.txt b/Documentation/RelNotes/2.43.6.txt
new file mode 100644
index 0000000000..2114b9f78d
--- /dev/null
+++ b/Documentation/RelNotes/2.43.6.txt
@@ -0,0 +1,7 @@
+Git v2.43.6 Release Notes
+=========================
+
+This release merges up the fix that appears in v2.40.4, v2.41.3
+and v2.42.4 to address the security issues CVE-2024-50349 and
+CVE-2024-52006; see the release notes for these versions for
+details.
diff --git a/Documentation/RelNotes/2.44.3.txt b/Documentation/RelNotes/2.44.3.txt
new file mode 100644
index 0000000000..5862845458
--- /dev/null
+++ b/Documentation/RelNotes/2.44.3.txt
@@ -0,0 +1,7 @@
+Git v2.44.3 Release Notes
+=========================
+
+This release merges up the fix that appears in v2.40.4, v2.41.3,
+v2.42.4 and v2.43.6 to address the security issues CVE-2024-50349
+and CVE-2024-52006; see the release notes for these versions
+for details.
diff --git a/Documentation/RelNotes/2.45.3.txt b/Documentation/RelNotes/2.45.3.txt
index 2a1e9aa608..ddb3cb694b 100644
--- a/Documentation/RelNotes/2.45.3.txt
+++ b/Documentation/RelNotes/2.45.3.txt
@@ -1,7 +1,12 @@
Git v2.45.3 Release Notes
=========================
-This primarily is to backport various small fixes accumulated on the
+This release merges up the fix that appears in v2.40.4, v2.41.3,
+v2.42.4, v2.43.6 and v2.44.3 to address the security issues
+CVE-2024-50349 and CVE-2024-52006; see the release notes for
+these versions for details.
+
+This version also backports various small fixes accumulated on the
'master' front during the development towards Git 2.46, the next
feature release.
diff --git a/Documentation/RelNotes/2.46.3.txt b/Documentation/RelNotes/2.46.3.txt
new file mode 100644
index 0000000000..4af032b63c
--- /dev/null
+++ b/Documentation/RelNotes/2.46.3.txt
@@ -0,0 +1,6 @@
+Git v2.46.3 Release Notes
+=========================
+
+This release merges up the fix that appears in v2.40.4, v2.41.3, v2.42.4,
+v2.43.6, v2.44.3 and v2.45.3 to address the security issues CVE-2024-50349 and
+CVE-2024-52006; see the release notes for these versions for details.
diff --git a/Documentation/RelNotes/2.47.2.txt b/Documentation/RelNotes/2.47.2.txt
new file mode 100644
index 0000000000..7a52ad8cb4
--- /dev/null
+++ b/Documentation/RelNotes/2.47.2.txt
@@ -0,0 +1,7 @@
+Git v2.47.2 Release Notes
+=========================
+
+This release merges up the fix that appears in v2.40.4, v2.41.3,
+v2.42.4, v2.43.6, v2.44.3, v2.45.3 and v2.46.3 to address the
+security issues CVE-2024-50349 and CVE-2024-52006; see the release
+notes for these versions for details.
diff --git a/Documentation/RelNotes/2.48.0.txt b/Documentation/RelNotes/2.48.0.txt
index b9d1b129cd..eff93be37a 100644
--- a/Documentation/RelNotes/2.48.0.txt
+++ b/Documentation/RelNotes/2.48.0.txt
@@ -21,6 +21,24 @@ UI, Workflows & Features
* Drop support for older libcURL and Perl.
+ * End-user experience of "git mergetool" when the command errors out
+ has been improved.
+
+ * "git bundle --unbundle" and "git clone" running on a bundle file
+ both learned to trigger fsck over the new objects with configurable
+ fck check levels.
+
+ * When "git fetch $remote" notices that refs/remotes/$remote/HEAD is
+ missing and discovers what branch the other side points with its
+ HEAD, refs/remotes/$remote/HEAD is updated to point to it.
+
+ * "git fetch" honors "remote.<remote>.followRemoteHEAD" settings to
+ tweak the remote-tracking HEAD in "refs/remotes/<remote>/HEAD".
+
+ * "git range-diff" learned to optionally show and compare merge
+ commits in the ranges being compared, with the --diff-merges
+ option.
+
Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------
@@ -29,15 +47,15 @@ Performance, Internal Implementation, Development Support etc.
* The way AsciiDoc is used for SYNOPSIS part of the manual pages has
been revamped. The sources, at least for the simple cases, got
- vastly pleasant to work with.
+ vastly more pleasant to work with.
* The reftable library is now prepared to expect that the memory
allocation function given to it may fail to allocate and to deal
with such an error.
* An extra worktree attached to a repository points at each other to
- allow finding the repository from the worktree and vice versa
- possible. Turn this linkage to relative paths.
+ allow finding the repository from the worktree (and vice versa)
+ possible. Use relative paths for this linkage.
* Enable Windows-based CI in GitLab.
@@ -76,7 +94,7 @@ Performance, Internal Implementation, Development Support etc.
* Update the project's CodingGuidelines to discourage naming functions
with a "_1()" suffix.
- * Updates the '.clang-format' to match project conventions.
+ * Update '.clang-format' to match project conventions.
* Centralize documentation for repository extensions into a single place.
@@ -98,7 +116,7 @@ Performance, Internal Implementation, Development Support etc.
* The migration procedure between two ref backends has been optimized.
* "git fsck" learned to issue warnings on "curiously formatted" ref
- contents that have always been taken valid but something Git
+ contents that have always been treated as valid but that Git
wouldn't have written itself (e.g., missing terminating end-of-line
after the full object name).
@@ -107,18 +125,61 @@ Performance, Internal Implementation, Development Support etc.
* Built-in Git subcommands are supplied the repository object to work
with; they learned to do the same when they invoke sub-subcommands.
+ * Drop support for ancient environments in various CI jobs.
+
+ * Isolate the reftable subsystem from the rest of Git's codebase by
+ using fewer pieces of Git's infrastructure.
+
+ * Optimize reading random references out of the reftable backend by
+ allowing reuse of iterator objects.
+
+ * Backport oss-fuzz tests to our codebase.
+
+ * Introduce a new repository extension to prevent older Git versions
+ from mis-interpreting worktrees created with relative paths.
+
+ * Yet another "pass the repository through the callchain" topic.
+
+ * "git describe" learned to stop digging the history needlessly
+ deeper.
+
+ * Build procedure update plus introduction of Meson based builds.
+
+ * Recent reftable updates mistook a NULL return from a request for
+ 0-byte allocation as OOM and died unnecessarily, which has been
+ corrected.
+
+ * Reftable backend adds check for upper limit of log's update_index.
+
+ * Start working to make the codebase buildable with -Wsign-compare.
+
+ * Regression fix for 'show-index' when run outside of a repository.
+
+ * The meson-build procedure is integrated into CI to catch and
+ prevent bitrotting.
+
+ * "git refs migrate" learned to also migrate the reflog data across
+ backends.
+
+ * The developer documentation has been updated to give the latest
+ info on gitk and git-gui maintainer.
+
+
+ * CI jobs that run threaded programs under LSan has been giving false
+ positives from time to time, which has been worked around.
+
Fixes since v2.47
-----------------
* Doc update to clarify how periodical maintenance are scheduled,
- spread across time to avoid thundering hurds.
+ spread across time to avoid thundering herds.
* Use after free and double freeing at the end in "git log -L... -p"
had been identified and fixed.
* On macOS, fsmonitor can fall into a race condition that results in
- a client waiting forever to be notified for an event that have
+ a client waiting forever to be notified about an event that has
already happened. This problem has been corrected.
* "git maintenance start" crashed due to an uninitialized variable
@@ -142,7 +203,7 @@ Fixes since v2.47
* The dumb-http code regressed when the result of re-indexing a pack
yielded an *.idx file that differs in content from the *.idx file
it downloaded from the remote. This has been corrected by no longer
- relying on: the *.idx file we got from the remote.
+ relying on the *.idx file we got from the remote.
* When called with '--left-right' and '--use-bitmap-index', 'rev-list'
will produce output without any left/right markers, which has been
@@ -166,7 +227,7 @@ Fixes since v2.47
* "git gc" discards any objects that are outside promisor packs that
are referred to by an object in a promisor pack, and we do not
refetch them from the promisor at runtime, resulting an unusable
- repository. Work it around by including these objects in the
+ repository. Work around it by including these objects in the
referring promisor pack at the receiving end of the fetch.
* Avoid build/test breakage on a system without working malloc debug
@@ -204,8 +265,66 @@ Fixes since v2.47
* The sequencer failed to honor core.commentString in some places.
+ * Describe a case where an option value needs to be spelled as a
+ separate argument, i.e. "--opt val", not "--opt=val".
+ (merge 1bc1e94091 jc/doc-opt-tilde-expand later to maint).
+
+ * Loosen overly strict ownership check introduced in the recent past,
+ to keep the promise "cloning a suspicious repository is a safe
+ first step to inspect it".
+ (merge 0ffb5a6bf1 bc/allow-upload-pack-from-other-people later to maint).
+
+ * "git fast-import" learned to reject paths with ".." and "." as
+ their components to avoid creating invalid tree objects.
+ (merge 8cb4c6e62f en/fast-import-verify-path later to maint).
+
+ * The --ancestry-path option is designed to be given a commit that is
+ on the path, which was not documented, which has been corrected.
+ (merge bc1a980759 kk/doc-ancestry-path later to maint).
+
+ * "git tag" has been taught to refuse to create refs/tags/HEAD
+ since such a tag will be confusing in the context of the UI provided by
+ the Git Porcelain commands.
+ (merge bbd445d5ef jc/forbid-head-as-tagname later to maint).
+
+ * The advice messages now tell the newer 'git config set' command to
+ set the advice.token configuration variable to squelch a message.
+ (merge 6c397d0104 bf/explicit-config-set-in-advice-messages later to maint).
+
+ * The syntax ":/<text>" to name the latest commit with the matching
+ text was broken with a recent change, which has been corrected.
+ (merge 0ff919e87a ps/commit-with-message-syntax-fix later to maint).
+
+ * Fix performance regression of a recent "fatten promisor pack with
+ local objects" protection against an unwanted gc.
+
+ * "git log -p --remerge-diff --reverse" was completely broken.
+ (merge f94bfa1516 js/log-remerge-keep-ancestry later to maint).
+
+ * "git bundle create" with an annotated tag on the positive end of
+ the revision range had a workaround code for older limitation in
+ the revision walker, which has become unnecessary.
+ (merge dd1072dfa8 tc/bundle-with-tag-remove-workaround later to maint).
+
+ * GitLab CI updates.
+ (merge c6b43f663e ps/ci-gitlab-update later to maint).
+
+ * Code to reuse objects based on bitmap contents have been tightened
+ to avoid race condition even when multiple packs are involved.
+ (merge 62b3ec8a3f tb/bitmap-fix-pack-reuse later to maint).
+
+ * An earlier "csum-file checksum does not have to be computed with
+ sha1dc" topic had a few code paths that had initialized an
+ implementation of a hash function to be used by an unmatching hash
+ by mistake, which have been corrected.
+ (merge 599a63409b ps/weak-sha1-for-tail-sum-fix later to maint).
+
* Other code cleanup, docfix, build fix, etc.
(merge 77af53f56f aa/t7300-modernize later to maint).
(merge dcd590a39d bf/t-readme-mention-reftable later to maint).
(merge 68e3c69efa kh/trailer-in-glossary later to maint).
(merge 91f88f76e6 tb/boundary-traversal-fix later to maint).
+ (merge 168ebb7159 jc/doc-error-message-guidelines later to maint).
+ (merge 18693d7d65 kh/doc-bundle-typofix later to maint).
+ (merge e2f5d3b491 kh/doc-update-ref-grammofix later to maint).
+ (merge 8525e92886 mh/doc-windows-home-env later to maint).
diff --git a/Documentation/RelNotes/2.48.1.txt b/Documentation/RelNotes/2.48.1.txt
new file mode 100644
index 0000000000..26c59b6e3b
--- /dev/null
+++ b/Documentation/RelNotes/2.48.1.txt
@@ -0,0 +1,7 @@
+Git v2.48.1 Release Notes
+=========================
+
+This release merges up the fix that appears in v2.40.4, v2.41.3,
+v2.42.4, v2.43.6, v2.44.3, v2.45.3, v2.46.3, and v2.47.2 to address
+the security issues CVE-2024-50349 and CVE-2024-52006; see the release
+notes for these versions for details.
diff --git a/Documentation/RelNotes/2.49.0.txt b/Documentation/RelNotes/2.49.0.txt
new file mode 100644
index 0000000000..72984fea5d
--- /dev/null
+++ b/Documentation/RelNotes/2.49.0.txt
@@ -0,0 +1,140 @@
+Git v2.49 Release Notes
+=======================
+
+UI, Workflows & Features
+------------------------
+
+ * Completion script updates for zsh
+
+
+Performance, Internal Implementation, Development Support etc.
+--------------------------------------------------------------
+
+ * More -Wsign-compare fixes.
+
+ * meson-based build now supports the unsafe-sha1 build knob.
+
+ * The code to check LSan results has been simplified and made more
+ robust.
+ (merge 164a2516eb jk/lsan-race-ignore-false-positive later to maint).
+
+ * More code paths have a repository passed through the callchain,
+ instead of assuming the primary the_repository object.
+
+ * Move a few more unit tests to the clar test framework.
+
+ * Introduce a new API to visit objects in batches based on a common
+ path, or by type.
+
+ * Following the procedure we established to introduce breaking
+ changes for Git 3.0, allow an early opt-in for removing support of
+ $GIT_DIR/branches/ and $GIT_DIR/remotes/ directories to configure
+ remotes.
+
+
+Fixes since v2.48
+-----------------
+
+ * "git submodule" learned various ways to spell the same option,
+ e.g. "--branch=B" can be spelled "--branch B" or "-bB".
+ (merge b86f0f9071 re/submodule-parse-opt later to maint).
+
+ * Tweak the help text used for the option value placeholders by
+ parse-options API so that translations can customize the "<>"
+ placeholder signal (e.g. "--option=<value>").
+ (merge 5b34dd08d0 as/long-option-help-i18n later to maint).
+
+ * CI jobs gave sporadic failures, which turns out that that the
+ object finalization code was giving an error when it did not have
+ to.
+ (merge d7fcbe2c56 ps/object-collision-check later to maint).
+
+ * The code to compute "unique" name used git_rand() which can fail or
+ get stuck; the callsite does not require cryptographic security.
+ Introduce the "insecure" mode and use it appropriately.
+ (merge 0b4f8afef6 ps/reftable-get-random-fix later to maint).
+
+ * A misconfigured "fsck.skiplist" configuration variable was not
+ diagnosed as an error, which has been corrected.
+ (merge ca7158076f jt/fsck-skiplist-parse-fix later to maint).
+
+ * Extended SHA-1 expression parser did not work well when a branch
+ with an unusual name (e.g. "foo{bar") is involved.
+ (merge 191f0c8db2 en/object-name-with-funny-refname-fix later to maint).
+
+ * The meson build procedure looked for the 'version-def.h' file in a
+ wrong directory, which has been corrected.
+ (merge 4771501c0a tc/meson-use-our-version-def-h later to maint).
+
+ * The meson build procedure for Documentation/technical/ hierarchy was
+ missing necessary dependencies, which has been corrected.
+ (merge 1dca492edd sj/meson-doc-technical-dependency-fix later to maint).
+
+ * The "instaweb" bound only to local IP address without "--local" and
+ to all addresses with "--local", which was the other way around, when
+ using Python's http.server class, which has been corrected.
+ (merge 76baf97fa1 ak/instaweb-python-port-binding-fix later to maint).
+
+ * Document that it is insecure to use Personal Access Tokens, which
+ some hosting providers take as username/password, embedded in URLs.
+ (merge a90ff409f0 mh/doc-credential-helpers-with-pat later to maint).
+
+ * The help text from "git $cmd -h" appear on the standard output for
+ some $cmd and the standard error for others. The built-in commands
+ have been fixed to show them on the standard output consistently.
+ (merge f66d1423f5 jc/show-usage-help later to maint).
+
+ * The meson-driven build is now aware of "git-subtree" housed in
+ contrib/subtree hierarchy.
+ (merge 8454b42f94 ps/build-meson-subtree later to maint).
+
+ * It was possible for "git unpack-objects" and "git index-pack" to
+ make an unaligned access, which has been corrected.
+ (merge 98046591b9 jk/pack-header-parse-alignment-fix later to maint).
+
+ * The "cache" credential back-end did not handle authtype correctly,
+ which has been corrected.
+ (merge 0b43274850 mh/credential-cache-authtype-request-fix later to maint).
+
+ * "git branch --sort=..." and "git for-each-ref --format=... --sort=..."
+ did not work as expected with some atoms, which has been corrected.
+ (merge c5490ce9d1 rs/ref-fitler-used-atoms-value-fix later to maint).
+
+ * reflog entries for symbolic ref updates were broken, which has been
+ corrected.
+ (merge 3519492430 kn/reflog-symref-fix later to maint).
+
+ * The trace2 code was not prepared to show a configuration variable
+ that is set to true using the valueless true syntax, which has been
+ corrected.
+ (merge 2fd367cf63 am/trace2-with-valueless-true later to maint).
+
+ * The "git refs migrate" command did not migrate the reflog for
+ refs/stash, which is the contents of the stashes, which has been
+ corrected.
+ (merge a0bea0978f ps/reflog-migration-with-logall-fix later to maint).
+
+ * Doc and short-help text for "show-index" has been clarified to
+ stress that the command reads its data from the standard input.
+ (merge 49edce4ff9 jc/show-index-h-update later to maint).
+
+ * The API around choosing to use unsafe variant of SHA-1
+ implementation has been updated in an attempt to make it harder to
+ abuse.
+ (merge 04292c3796 tb/unsafe-hash-cleanup later to maint).
+
+ * Fix bugs in an earlier attempt to fix "git refs migration".
+ (merge f11f0a5a2d kn/reflog-migration-fix-fix later to maint).
+
+ * Other code cleanup, docfix, build fix, etc.
+ (merge ddb5287894 jk/t7407-use-test-grep later to maint).
+ (merge 21e1b44865 aj/difftool-config-doc-fix later to maint).
+ (merge 6a63995335 mh/gitattr-doc-markup-fix later to maint).
+ (merge 43850dcf9c sk/unit-test-hash later to maint).
+ (merge 4ad47d2de3 jc/cli-doc-option-and-config later to maint).
+ (merge 2d0ff147e5 jp/t8002-printf-fix later to maint).
+ (merge 69666e6746 ja/doc-restore-markup-update later to maint).
+ (merge d11d003ba5 sk/strlen-returns-size_t later to maint).
+ (merge 77b2d29e91 ja/doc-notes-markup-updates later to maint).
+ (merge 6979bf6f8f jk/combine-diff-cleanup later to maint).
+ (merge 8705c9bd13 kn/pack-write-with-reduced-globals later to maint).
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index db17bc7fe2..958e3cc3d5 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -692,16 +692,17 @@ rebase when I receive your patches).
Some parts of the system have dedicated maintainers with their own
repositories.
-- `git-gui/` comes from git-gui project, maintained by Johannes Sixt:
+- `git-gui/` comes from the git-gui project, maintained by Johannes Sixt:
https://github.com/j6t/git-gui
-- `gitk-git/` comes from Paul Mackerras's gitk project:
+ Contibutions should go via the git mailing list.
- git://git.ozlabs.org/~paulus/gitk
+- `gitk-git/` comes from the gitk project, maintained by Johannes Sixt:
- Those who are interested in improving gitk can volunteer to help Paul
- maintain it, cf. <YntxL/fTplFm8lr6@cleo>.
+ https://github.com/j6t/gitk
+
+ Contibutions should go via the git mailing list.
- `po/` comes from the localization coordinator, Jiang Xin:
diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf.in
index f6da6d1fbd..f2aef6cb79 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf.in
@@ -21,13 +21,26 @@ tilde=&#126;
apostrophe=&#39;
backtick=&#96;
litdd=&#45;&#45;
+manmanual=Git Manual
+mansource=Git @GIT_VERSION@
+revdate=@GIT_DATE@
+
+ifdef::doctype-book[]
+[titles]
+ underlines="__","==","--","~~","^^"
+endif::doctype-book[]
ifdef::backend-docbook[]
[linkgit-inlinemacro]
+ifndef::doctype-book[]
{0%{target}}
{0#<citerefentry>}
{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
{0#</citerefentry>}
+endif::doctype-book[]
+ifdef::doctype-book[]
+<ulink url="{target}.html">{target}{0?({0})}</ulink>
+endif::doctype-book[]
[literal-inlinemacro]
{eval:re.sub(r'(&lt;[-a-zA-Z0-9.]+&gt;)', r'<emphasis>\1</emphasis>', re.sub(r'([\[\s|()>]|^|\]|&gt;)(\.?([-a-zA-Z0-9:+=~@,\/_^\$]+\.?)+)',r'\1<literal>\2</literal>', re.sub(r'(\.\.\.?)([^\]$.])', r'<literal>\1</literal>\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))}
diff --git a/Documentation/asciidoctor-extensions.rb b/Documentation/asciidoctor-extensions.rb.in
index cb24480b63..2494f17a51 100644
--- a/Documentation/asciidoctor-extensions.rb
+++ b/Documentation/asciidoctor-extensions.rb.in
@@ -29,13 +29,12 @@ module Git
class DocumentPostProcessor < Asciidoctor::Extensions::Postprocessor
def process document, output
if document.basebackend? 'docbook'
- mansource = document.attributes['mansource']
- manversion = document.attributes['manversion']
- manmanual = document.attributes['manmanual']
+ output = output.sub(/<refmiscinfo class="source">.*?<\/refmiscinfo>/, "")
+ output = output.sub(/<refmiscinfo class="manual">.*?<\/refmiscinfo>/, "")
+ output = output.sub(/<date>.*?<\/date>/, "<date>@GIT_DATE@</date>")
new_tags = "" \
- "<refmiscinfo class=\"source\">#{mansource}</refmiscinfo>\n" \
- "<refmiscinfo class=\"version\">#{manversion}</refmiscinfo>\n" \
- "<refmiscinfo class=\"manual\">#{manmanual}</refmiscinfo>\n"
+ "<refmiscinfo class=\"source\">Git @GIT_VERSION@</refmiscinfo>\n" \
+ "<refmiscinfo class=\"manual\">Git Manual</refmiscinfo>\n"
output = output.sub(/<\/refmeta>/, new_tags + "</refmeta>")
end
output
diff --git a/Documentation/build-docdep.perl b/Documentation/build-docdep.perl
index 1b3ac8fdd9..315efaa2fa 100755
--- a/Documentation/build-docdep.perl
+++ b/Documentation/build-docdep.perl
@@ -1,5 +1,6 @@
#!/usr/bin/perl
+my ($build_dir) = @ARGV;
my %include = ();
my %included = ();
@@ -10,6 +11,7 @@ for my $text (<*.txt>) {
chomp;
s/^include::\s*//;
s/\[\]//;
+ s/{build_dir}/${build_dir}/;
$include{$text}{$_} = 1;
$included{$_} = 1;
}
diff --git a/Documentation/cmd-list.perl b/Documentation/cmd-list.perl
index 755a110bc4..e260a98977 100755
--- a/Documentation/cmd-list.perl
+++ b/Documentation/cmd-list.perl
@@ -3,12 +3,13 @@
use File::Compare qw(compare);
sub format_one {
- my ($out, $nameattr) = @_;
+ my ($source_dir, $out, $nameattr) = @_;
my ($name, $attr) = @$nameattr;
+ my ($path) = "$source_dir/Documentation/$name.txt";
my ($state, $description);
my $mansection;
$state = 0;
- open I, '<', "$name.txt" or die "No such file $name.txt";
+ open I, '<', "$path" or die "No such file $path.txt";
while (<I>) {
if (/^(?:git|scalar)[a-z0-9-]*\(([0-9])\)$/) {
$mansection = $1;
@@ -29,7 +30,7 @@ sub format_one {
}
close I;
if (!defined $description) {
- die "No description found in $name.txt";
+ die "No description found in $path.txt";
}
if (my ($verify_name, $text) = ($description =~ /^($name) - (.*)/)) {
print $out "linkgit:$name\[$mansection\]::\n\t";
@@ -43,9 +44,9 @@ sub format_one {
}
}
-my ($input, @categories) = @ARGV;
+my ($source_dir, $build_dir, @categories) = @ARGV;
-open IN, "<$input";
+open IN, "<$source_dir/command-list.txt";
while (<IN>) {
last if /^### command list/;
}
@@ -63,17 +64,17 @@ close IN;
for my $out (@categories) {
my ($cat) = $out =~ /^cmds-(.*)\.txt$/;
- open O, '>', "$out+" or die "Cannot open output file $out+";
+ my ($path) = "$build_dir/$out";
+ open O, '>', "$path+" or die "Cannot open output file $out+";
for (@{$cmds{$cat}}) {
- format_one(\*O, $_);
+ format_one($source_dir, \*O, $_);
}
close O;
- if (-f "$out" && compare("$out", "$out+") == 0) {
- unlink "$out+";
+ if (-f "$path" && compare("$path", "$path+") == 0) {
+ unlink "$path+";
}
else {
- print STDERR "$out\n";
- rename "$out+", "$out";
+ rename "$path+", "$path";
}
}
diff --git a/Documentation/config/commit.txt b/Documentation/config/commit.txt
index 62f0d92fda..d3f4624fd2 100644
--- a/Documentation/config/commit.txt
+++ b/Documentation/config/commit.txt
@@ -1,29 +1,34 @@
-commit.cleanup::
+ifdef::git-commit[]
+:see-git-commit:
+endif::git-commit[]
+ifndef::git-commit[]
+:see-git-commit: See linkgit:git-commit[1] for details.
+endif::git-commit[]
+`commit.cleanup`::
This setting overrides the default of the `--cleanup` option in
- `git commit`. See linkgit:git-commit[1] for details. Changing the
- default can be useful when you always want to keep lines that begin
+ `git commit`. {see-git-commit} Changing the default can be useful
+ when you always want to keep lines that begin
with the comment character `#` in your log message, in which case you
would do `git config commit.cleanup whitespace` (note that you will
have to remove the help lines that begin with `#` in the commit log
template yourself, if you do this).
-commit.gpgSign::
-
+`commit.gpgSign`::
A boolean to specify whether all commits should be GPG signed.
Use of this option when doing operations such as rebase can
result in a large number of commits being signed. It may be
convenient to use an agent to avoid typing your GPG passphrase
several times.
-commit.status::
+`commit.status`::
A boolean to enable/disable inclusion of status information in the
commit message template when using an editor to prepare the commit
- message. Defaults to true.
+ message. Defaults to `true`.
-commit.template::
+`commit.template`::
Specify the pathname of a file to use as the template for
new commit messages.
-commit.verbose::
+`commit.verbose`::
A boolean or int to specify the level of verbosity with `git commit`.
- See linkgit:git-commit[1].
+ {see-git-commit}
diff --git a/Documentation/config/credential.txt b/Documentation/config/credential.txt
index 470482ff4c..80a7c77772 100644
--- a/Documentation/config/credential.txt
+++ b/Documentation/config/credential.txt
@@ -22,6 +22,17 @@ credential.useHttpPath::
or https URL to be important. Defaults to false. See
linkgit:gitcredentials[7] for more information.
+credential.sanitizePrompt::
+ By default, user names and hosts that are shown as part of the
+ password prompt are not allowed to contain control characters (they
+ will be URL-encoded by default). Configure this setting to `false` to
+ override that behavior.
+
+credential.protectProtocol::
+ By default, Carriage Return characters are not allowed in the protocol
+ that is used when Git talks to a credential helper. This setting allows
+ users to override this default.
+
credential.username::
If no username is set for a network authentication, use this username
by default. See credential.<context>.* below, and
diff --git a/Documentation/config/diff.txt b/Documentation/config/diff.txt
index 45f3fe855c..1135a62a0a 100644
--- a/Documentation/config/diff.txt
+++ b/Documentation/config/diff.txt
@@ -218,8 +218,6 @@ endif::git-diff[]
Set this option to `true` to make the diff driver cache the text
conversion outputs. See linkgit:gitattributes[5] for details.
-include::../mergetools-diff.txt[]
-
`diff.indentHeuristic`::
Set this option to `false` to disable the default heuristics
that shift diff hunk boundaries to make patches easier to read.
diff --git a/Documentation/config/difftool.txt b/Documentation/config/difftool.txt
index 447c40d85a..6cd47331a9 100644
--- a/Documentation/config/difftool.txt
+++ b/Documentation/config/difftool.txt
@@ -13,6 +13,8 @@ diff.guitool::
and requires that a corresponding difftool.<guitool>.cmd variable
is defined.
+include::{build_dir}/mergetools-diff.txt[]
+
difftool.<tool>.cmd::
Specify the command to invoke the specified diff tool.
The specified command is evaluated in shell with the following
diff --git a/Documentation/config/extensions.txt b/Documentation/config/extensions.txt
index 5dc569d1c9..5cb4721a0e 100644
--- a/Documentation/config/extensions.txt
+++ b/Documentation/config/extensions.txt
@@ -63,6 +63,12 @@ Note that this setting should only be set by linkgit:git-init[1] or
linkgit:git-clone[1]. Trying to change it after initialization will not
work and will produce hard-to-diagnose issues.
+relativeWorktrees::
+ If enabled, indicates at least one worktree has been linked with
+ relative paths. Automatically set if a worktree has been created or
+ repaired with either the `--relative-paths` option or with the
+ `worktree.useRelativePaths` config set to `true`.
+
worktreeConfig::
If enabled, then worktrees will load config settings from the
`$GIT_DIR/config.worktree` file in addition to the
diff --git a/Documentation/config/merge.txt b/Documentation/config/merge.txt
index 8851b6cede..82554d65a0 100644
--- a/Documentation/config/merge.txt
+++ b/Documentation/config/merge.txt
@@ -101,7 +101,7 @@ merge.guitool::
Any other value is treated as a custom merge tool and requires that a
corresponding mergetool.<guitool>.cmd variable is defined.
-include::../mergetools-merge.txt[]
+include::{build_dir}/mergetools-merge.txt[]
merge.verbosity::
Controls the amount of output shown by the recursive merge
diff --git a/Documentation/config/notes.txt b/Documentation/config/notes.txt
index 43db8e808d..b7e536496f 100644
--- a/Documentation/config/notes.txt
+++ b/Documentation/config/notes.txt
@@ -1,4 +1,4 @@
-notes.mergeStrategy::
+`notes.mergeStrategy`::
Which merge strategy to choose by default when resolving notes
conflicts. Must be one of `manual`, `ours`, `theirs`, `union`, or
`cat_sort_uniq`. Defaults to `manual`. See the "NOTES MERGE STRATEGIES"
@@ -7,17 +7,17 @@ notes.mergeStrategy::
This setting can be overridden by passing the `--strategy` option to
linkgit:git-notes[1].
-notes.<name>.mergeStrategy::
+`notes.<name>.mergeStrategy`::
Which merge strategy to choose when doing a notes merge into
- refs/notes/<name>. This overrides the more general
- "notes.mergeStrategy". See the "NOTES MERGE STRATEGIES" section in
+ `refs/notes/<name>`. This overrides the more general
+ `notes.mergeStrategy`. See the "NOTES MERGE STRATEGIES" section in
linkgit:git-notes[1] for more information on the available strategies.
-notes.displayRef::
+`notes.displayRef`::
Which ref (or refs, if a glob or specified more than once), in
addition to the default set by `core.notesRef` or
`GIT_NOTES_REF`, to read notes from when showing commit
- messages with the 'git log' family of commands.
+ messages with the `git log` family of commands.
+
This setting can be overridden with the `GIT_NOTES_DISPLAY_REF`
environment variable, which must be a colon separated list of refs or
@@ -26,27 +26,27 @@ globs.
A warning will be issued for refs that do not exist,
but a glob that does not match any refs is silently ignored.
+
-This setting can be disabled by the `--no-notes` option to the 'git
-log' family of commands, or by the `--notes=<ref>` option accepted by
+This setting can be disabled by the `--no-notes` option to the linkgit:git-log[1]
+family of commands, or by the `--notes=<ref>` option accepted by
those commands.
+
-The effective value of "core.notesRef" (possibly overridden by
-GIT_NOTES_REF) is also implicitly added to the list of refs to be
+The effective value of `core.notesRef` (possibly overridden by
+`GIT_NOTES_REF`) is also implicitly added to the list of refs to be
displayed.
-notes.rewrite.<command>::
- When rewriting commits with <command> (currently `amend` or
+`notes.rewrite.<command>`::
+ When rewriting commits with _<command>_ (currently `amend` or
`rebase`), if this variable is `false`, git will not copy
notes from the original to the rewritten commit. Defaults to
- `true`. See also "`notes.rewriteRef`" below.
+ `true`. See also `notes.rewriteRef` below.
+
This setting can be overridden with the `GIT_NOTES_REWRITE_REF`
environment variable, which must be a colon separated list of refs or
globs.
-notes.rewriteMode::
+`notes.rewriteMode`::
When copying notes during a rewrite (see the
- "notes.rewrite.<command>" option), determines what to do if
+ `notes.rewrite.<command>` option), determines what to do if
the target commit already has a note. Must be one of
`overwrite`, `concatenate`, `cat_sort_uniq`, or `ignore`.
Defaults to `concatenate`.
@@ -54,7 +54,7 @@ notes.rewriteMode::
This setting can be overridden with the `GIT_NOTES_REWRITE_MODE`
environment variable.
-notes.rewriteRef::
+`notes.rewriteRef`::
When copying notes during a rewrite, specifies the (fully
qualified) ref whose notes should be copied. May be a glob,
in which case notes in all matching refs will be copied. You
diff --git a/Documentation/config/remote.txt b/Documentation/config/remote.txt
index 6d8b7d6c63..4118c219c1 100644
--- a/Documentation/config/remote.txt
+++ b/Documentation/config/remote.txt
@@ -101,6 +101,19 @@ remote.<name>.serverOption::
The default set of server options used when fetching from this remote.
These server options can be overridden by the `--server-option=` command
line arguments.
+
+remote.<name>.followRemoteHEAD::
+ How linkgit:git-fetch[1] should handle updates to `remotes/<name>/HEAD`.
+ The default value is "create", which will create `remotes/<name>/HEAD`
+ if it exists on the remote, but not locally, but will not touch an
+ already existing local reference. Setting to "warn" will print
+ a message if the remote has a different value, than the local one and
+ in case there is no local reference, it behaves like "create".
+ A variant on "warn" is "warn-if-not-$branch", which behaves like
+ "warn", but if `HEAD` on the remote is `$branch` it will be silent.
+ Setting to "always" will silently update it to the value on the remote.
+ Finally, setting it to "never" will never change or create the local
+ reference.
+
This is a multi-valued variable, and an empty value can be used in a higher
priority configuration file (e.g. `.git/config` in a repository) to clear
diff --git a/Documentation/config/worktree.txt b/Documentation/config/worktree.txt
index 048e349482..5e35c7d018 100644
--- a/Documentation/config/worktree.txt
+++ b/Documentation/config/worktree.txt
@@ -7,3 +7,13 @@ worktree.guessRemote::
such a branch exists, it is checked out and set as "upstream"
for the new branch. If no such match can be found, it falls
back to creating a new branch from the current HEAD.
+
+worktree.useRelativePaths::
+ Link worktrees using relative paths (when "true") or absolute
+ paths (when "false"). This is particularly useful for setups
+ where the repository and worktrees may be moved between
+ different locations or environments. Defaults to "false".
++
+Note that setting `worktree.useRelativePaths` to "true" implies enabling the
+`extension.relativeWorktrees` config (see linkgit:git-config[1]),
+thus making it incompatible with older versions of Git.
diff --git a/Documentation/generate-mergetool-list.sh b/Documentation/generate-mergetool-list.sh
new file mode 100755
index 0000000000..6700498b93
--- /dev/null
+++ b/Documentation/generate-mergetool-list.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+if test "$#" -ne 3
+then
+ echo >&2 "USAGE: $0 <SOURCE_DIR> <MODE> <OUTPUT>"
+ exit 1
+fi
+
+SOURCE_DIR="$1"
+TOOL_MODE="$2"
+OUTPUT="$3"
+MERGE_TOOLS_DIR="$SOURCE_DIR/mergetools"
+
+(
+ . "$SOURCE_DIR"/git-mergetool--lib.sh &&
+ show_tool_names can_$TOOL_MODE
+) | sed -e "s/\([a-z0-9]*\)/\`\1\`;;/" >"$OUTPUT"
diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt
index 504b8a8143..03cd36fe8d 100644
--- a/Documentation/git-bundle.txt
+++ b/Documentation/git-bundle.txt
@@ -32,7 +32,7 @@ Git commands that fetch or otherwise "read" via protocols such as
possible linkgit:git-clone[1] a new repository from a bundle, to use
linkgit:git-fetch[1] to fetch from one, and to list the references
contained within it with linkgit:git-ls-remote[1]. There's no
-corresponding "write" support, i.e.a 'git push' into a bundle is not
+corresponding "write" support, i.e. a 'git push' into a bundle is not
supported.
BUNDLE FORMAT
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 7acb4cb176..de8d8f5893 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -63,6 +63,9 @@ symbolic link, the clone will fail. This is a security measure to
prevent the unintentional copying of files by dereferencing the symbolic
links.
+
+This option does not work with repositories owned by other users for security
+reasons, and `--no-local` must be specified for the clone to succeed.
++
*NOTE*: this operation can race with concurrent modification to the
source repository, similar to running `cp -r <src> <dst>` while modifying
_<src>_.
@@ -384,6 +387,12 @@ $ cd my-linux
$ git clone --bare -l /home/proj/.git /pub/scm/proj.git
------------
+* Clone a local repository from a different user:
++
+------------
+$ git clone --no-local /home/otheruser/proj.git /pub/scm/proj.git
+------------
+
CONFIGURATION
-------------
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index c822113c11..602e2f1200 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -7,8 +7,8 @@ git-commit - Record changes to the repository
SYNOPSIS
--------
-[verse]
-'git commit' [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend]
+[synopsis]
+git commit [-a | --interactive | --patch] [-s] [-v] [-u[<mode>]] [--amend]
[--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>]
[-F <file> | -m <msg>] [--reset-author] [--allow-empty]
[--allow-empty-message] [--no-verify] [-e] [--author=<author>]
@@ -23,31 +23,31 @@ Create a new commit containing the current contents of the index and
the given log message describing the changes. The new commit is a
direct child of HEAD, usually the tip of the current branch, and the
branch is updated to point to it (unless no branch is associated with
-the working tree, in which case HEAD is "detached" as described in
+the working tree, in which case `HEAD` is "detached" as described in
linkgit:git-checkout[1]).
The content to be committed can be specified in several ways:
1. by using linkgit:git-add[1] to incrementally "add" changes to the
- index before using the 'commit' command (Note: even modified files
+ index before using the `commit` command (Note: even modified files
must be "added");
2. by using linkgit:git-rm[1] to remove files from the working tree
- and the index, again before using the 'commit' command;
+ and the index, again before using the `commit` command;
-3. by listing files as arguments to the 'commit' command
- (without --interactive or --patch switch), in which
+3. by listing files as arguments to the `commit` command
+ (without `--interactive` or `--patch` switch), in which
case the commit will ignore changes staged in the index, and instead
record the current content of the listed files (which must already
be known to Git);
-4. by using the -a switch with the 'commit' command to automatically
+4. by using the `-a` switch with the `commit` command to automatically
"add" changes from all known files (i.e. all files that are already
listed in the index) and to automatically "rm" files in the index
that have been removed from the working tree, and then perform the
actual commit;
-5. by using the --interactive or --patch switches with the 'commit' command
+5. by using the `--interactive` or `--patch` switches with the `commit` command
to decide one by one which files or hunks should be part of the commit
in addition to contents in the index,
before finalizing the operation. See the ``Interactive Mode'' section of
@@ -58,139 +58,139 @@ summary of what is included by any of the above for the next
commit by giving the same set of parameters (options and paths).
If you make a commit and then find a mistake immediately after
-that, you can recover from it with 'git reset'.
+that, you can recover from it with `git reset`.
:git-commit: 1
OPTIONS
-------
--a::
---all::
- Tell the command to automatically stage files that have
+`-a`::
+`--all`::
+ Automatically stage files that have
been modified and deleted, but new files you have not
told Git about are not affected.
--p::
---patch::
+`-p`::
+`--patch`::
Use the interactive patch selection interface to choose
which changes to commit. See linkgit:git-add[1] for
details.
--C <commit>::
---reuse-message=<commit>::
- Take an existing commit object, and reuse the log message
+`-C <commit>`::
+`--reuse-message=<commit>`::
+ Take an existing _<commit>_ object, and reuse the log message
and the authorship information (including the timestamp)
when creating the commit.
--c <commit>::
---reedit-message=<commit>::
- Like '-C', but with `-c` the editor is invoked, so that
+`-c <commit>`::
+`--reedit-message=<commit>`::
+ Like `-C`, but with `-c` the editor is invoked, so that
the user can further edit the commit message.
---fixup=[(amend|reword):]<commit>::
- Create a new commit which "fixes up" `<commit>` when applied with
+`--fixup=[(amend|reword):]<commit>`::
+ Create a new commit which "fixes up" _<commit>_ when applied with
`git rebase --autosquash`. Plain `--fixup=<commit>` creates a
- "fixup!" commit which changes the content of `<commit>` but leaves
+ "fixup!" commit which changes the content of _<commit>_ but leaves
its log message untouched. `--fixup=amend:<commit>` is similar but
creates an "amend!" commit which also replaces the log message of
- `<commit>` with the log message of the "amend!" commit.
+ _<commit>_ with the log message of the "amend!" commit.
`--fixup=reword:<commit>` creates an "amend!" commit which
- replaces the log message of `<commit>` with its own log message
- but makes no changes to the content of `<commit>`.
+ replaces the log message of _<commit>_ with its own log message
+ but makes no changes to the content of _<commit>_.
+
The commit created by plain `--fixup=<commit>` has a subject
-composed of "fixup!" followed by the subject line from <commit>,
+composed of "fixup!" followed by the subject line from _<commit>_,
and is recognized specially by `git rebase --autosquash`. The `-m`
option may be used to supplement the log message of the created
commit, but the additional commentary will be thrown away once the
-"fixup!" commit is squashed into `<commit>` by
+"fixup!" commit is squashed into _<commit>_ by
`git rebase --autosquash`.
+
The commit created by `--fixup=amend:<commit>` is similar but its
subject is instead prefixed with "amend!". The log message of
-<commit> is copied into the log message of the "amend!" commit and
+_<commit>_ is copied into the log message of the "amend!" commit and
opened in an editor so it can be refined. When `git rebase
---autosquash` squashes the "amend!" commit into `<commit>`, the
-log message of `<commit>` is replaced by the refined log message
+--autosquash` squashes the "amend!" commit into _<commit>_, the
+log message of _<commit>_ is replaced by the refined log message
from the "amend!" commit. It is an error for the "amend!" commit's
log message to be empty unless `--allow-empty-message` is
specified.
+
`--fixup=reword:<commit>` is shorthand for `--fixup=amend:<commit>
---only`. It creates an "amend!" commit with only a log message
+ --only`. It creates an "amend!" commit with only a log message
(ignoring any changes staged in the index). When squashed by `git
-rebase --autosquash`, it replaces the log message of `<commit>`
+rebase --autosquash`, it replaces the log message of _<commit>_
without making any other changes.
+
Neither "fixup!" nor "amend!" commits change authorship of
-`<commit>` when applied by `git rebase --autosquash`.
+_<commit>_ when applied by `git rebase --autosquash`.
See linkgit:git-rebase[1] for details.
---squash=<commit>::
- Construct a commit message for use with `rebase --autosquash`.
+`--squash=<commit>`::
+ Construct a commit message for use with `git rebase --autosquash`.
The commit message subject line is taken from the specified
commit with a prefix of "squash! ". Can be used with additional
commit message options (`-m`/`-c`/`-C`/`-F`). See
linkgit:git-rebase[1] for details.
---reset-author::
- When used with -C/-c/--amend options, or when committing after a
+`--reset-author`::
+ When used with `-C`/`-c`/`--amend` options, or when committing after a
conflicting cherry-pick, declare that the authorship of the
resulting commit now belongs to the committer. This also renews
the author timestamp.
---short::
+`--short`::
When doing a dry-run, give the output in the short-format. See
linkgit:git-status[1] for details. Implies `--dry-run`.
---branch::
+`--branch`::
Show the branch and tracking info even in short-format.
---porcelain::
+`--porcelain`::
When doing a dry-run, give the output in a porcelain-ready
format. See linkgit:git-status[1] for details. Implies
`--dry-run`.
---long::
+`--long`::
When doing a dry-run, give the output in the long-format.
Implies `--dry-run`.
--z::
---null::
+`-z`::
+`--null`::
When showing `short` or `porcelain` status output, print the
- filename verbatim and terminate the entries with NUL, instead of LF.
+ filename verbatim and terminate the entries with _NUL_, instead of _LF_.
If no format is given, implies the `--porcelain` output format.
Without the `-z` option, filenames with "unusual" characters are
quoted as explained for the configuration variable `core.quotePath`
(see linkgit:git-config[1]).
--F <file>::
---file=<file>::
- Take the commit message from the given file. Use '-' to
+`-F <file>`::
+`--file=<file>`::
+ Take the commit message from _<file>_. Use '-' to
read the message from the standard input.
---author=<author>::
+`--author=<author>`::
Override the commit author. Specify an explicit author using the
- standard `A U Thor <author@example.com>` format. Otherwise <author>
+ standard `A U Thor <author@example.com>` format. Otherwise _<author>_
is assumed to be a pattern and is used to search for an existing
- commit by that author (i.e. rev-list --all -i --author=<author>);
+ commit by that author (i.e. `git rev-list --all -i --author=<author>`);
the commit author is then copied from the first such commit found.
---date=<date>::
+`--date=<date>`::
Override the author date used in the commit.
--m <msg>::
---message=<msg>::
- Use the given <msg> as the commit message.
+`-m <msg>`::
+`--message=<msg>`::
+ Use _<msg>_ as the commit message.
If multiple `-m` options are given, their values are
concatenated as separate paragraphs.
+
The `-m` option is mutually exclusive with `-c`, `-C`, and `-F`.
--t <file>::
---template=<file>::
+`-t <file>`::
+`--template=<file>`::
When editing the commit message, start the editor with the
- contents in the given file. The `commit.template` configuration
+ contents in _<file>_. The `commit.template` configuration
variable is often used to give this option implicitly to the
command. This mechanism can be used by projects that want to
guide participants with some hints on what to write in the message
@@ -200,56 +200,54 @@ The `-m` option is mutually exclusive with `-c`, `-C`, and `-F`.
include::signoff-option.txt[]
---trailer <token>[(=|:)<value>]::
- Specify a (<token>, <value>) pair that should be applied as a
+`--trailer <token>[(=|:)<value>]`::
+ Specify a (_<token>_, _<value>_) pair that should be applied as a
trailer. (e.g. `git commit --trailer "Signed-off-by:C O Mitter \
<committer@example.com>" --trailer "Helped-by:C O Mitter \
- <committer@example.com>"` will add the "Signed-off-by" trailer
- and the "Helped-by" trailer to the commit message.)
+ <committer@example.com>"` will add the `Signed-off-by` trailer
+ and the `Helped-by` trailer to the commit message.)
The `trailer.*` configuration variables
(linkgit:git-interpret-trailers[1]) can be used to define if
a duplicated trailer is omitted, where in the run of trailers
each trailer would appear, and other details.
--n::
---[no-]verify::
- By default, the pre-commit and commit-msg hooks are run.
- When any of `--no-verify` or `-n` is given, these are bypassed.
+`-n`::
+`--[no-]verify`::
+ Bypass the `pre-commit` and `commit-msg` hooks.
See also linkgit:githooks[5].
---allow-empty::
+`--allow-empty`::
Usually recording a commit that has the exact same tree as its
sole parent commit is a mistake, and the command prevents you
from making such a commit. This option bypasses the safety, and
is primarily for use by foreign SCM interface scripts.
---allow-empty-message::
- Like --allow-empty this command is primarily for use by foreign
- SCM interface scripts. It allows you to create a commit with an
- empty commit message without using plumbing commands like
- linkgit:git-commit-tree[1].
+`--allow-empty-message`::
+ Create a commit with an empty commit message without using plumbing
+ commands like linkgit:git-commit-tree[1]. Like `--allow-empty`, this
+ command is primarily for use by foreign SCM interface scripts.
---cleanup=<mode>::
- This option determines how the supplied commit message should be
+`--cleanup=<mode>`::
+ Determine how the supplied commit message should be
cleaned up before committing. The '<mode>' can be `strip`,
`whitespace`, `verbatim`, `scissors` or `default`.
+
--
-strip::
+`strip`::
Strip leading and trailing empty lines, trailing whitespace,
commentary and collapse consecutive empty lines.
-whitespace::
+`whitespace`::
Same as `strip` except #commentary is not removed.
-verbatim::
+`verbatim`::
Do not change the message at all.
-scissors::
+`scissors`::
Same as `whitespace` except that everything from (and including)
the line found below is truncated, if the message is to be edited.
- "`#`" can be customized with core.commentChar.
+ "`#`" can be customized with `core.commentChar`.
# ------------------------ >8 ------------------------
-default::
+`default`::
Same as `strip` if the message is to be edited.
Otherwise `whitespace`.
--
@@ -257,19 +255,18 @@ default::
The default can be changed by the `commit.cleanup` configuration
variable (see linkgit:git-config[1]).
--e::
---edit::
- The message taken from file with `-F`, command line with
- `-m`, and from commit object with `-C` are usually used as
- the commit log message unmodified. This option lets you
- further edit the message taken from these sources.
+`-e`::
+`--edit`::
+ Let the user further edit the message taken from _<file>_
+ with `-F <file>`, command line with `-m <message>`, and
+ from _<commit>_ with `-C <commit>`.
---no-edit::
+`--no-edit`::
Use the selected commit message without launching an editor.
For example, `git commit --amend --no-edit` amends a commit
without changing its commit message.
---amend::
+`--amend`::
Replace the tip of the current branch by creating a new
commit. The recorded tree is prepared as usual (including
the effect of the `-i` and `-o` options and explicit
@@ -295,23 +292,23 @@ You should understand the implications of rewriting history if you
amend a commit that has already been published. (See the "RECOVERING
FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].)
---no-post-rewrite::
- Bypass the post-rewrite hook.
+`--no-post-rewrite`::
+ Bypass the `post-rewrite` hook.
--i::
---include::
+`-i`::
+`--include`::
Before making a commit out of staged contents so far,
stage the contents of paths given on the command line
as well. This is usually not what you want unless you
are concluding a conflicted merge.
--o::
---only::
+`-o`::
+`--only`::
Make a commit by taking the updated working tree contents
of the paths specified on the
command line, disregarding any contents that have been
staged for other paths. This is the default mode of operation of
- 'git commit' if any paths are given on the command line,
+ `git commit` if any paths are given on the command line,
in which case this option can be omitted.
If this option is specified together with `--amend`, then
no paths need to be specified, which can be used to amend
@@ -319,48 +316,48 @@ FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].)
already been staged. If used together with `--allow-empty`
paths are also not required, and an empty commit will be created.
---pathspec-from-file=<file>::
- Pathspec is passed in `<file>` instead of commandline args. If
- `<file>` is exactly `-` then standard input is used. Pathspec
- elements are separated by LF or CR/LF. Pathspec elements can be
+`--pathspec-from-file=<file>`::
+ Pass pathspec in _<file>_ instead of commandline args. If
+ _<file>_ is exactly `-` then standard input is used. Pathspec
+ elements are separated by _LF_ or _CR_/_LF_. Pathspec elements can be
quoted as explained for the configuration variable `core.quotePath`
(see linkgit:git-config[1]). See also `--pathspec-file-nul` and
global `--literal-pathspecs`.
---pathspec-file-nul::
+`--pathspec-file-nul`::
Only meaningful with `--pathspec-from-file`. Pathspec elements are
- separated with NUL character and all other characters are taken
+ separated with _NUL_ character and all other characters are taken
literally (including newlines and quotes).
--u[<mode>]::
---untracked-files[=<mode>]::
+`-u[<mode>]`::
+`--untracked-files[=<mode>]`::
Show untracked files.
+
--
-The mode parameter is optional (defaults to 'all'), and is used to
-specify the handling of untracked files; when -u is not used, the
-default is 'normal', i.e. show untracked files and directories.
+The _<mode>_ parameter is optional (defaults to `all`), and is used to
+specify the handling of untracked files; when `-u` is not used, the
+default is `normal`, i.e. show untracked files and directories.
The possible options are:
- - 'no' - Show no untracked files
- - 'normal' - Shows untracked files and directories
- - 'all' - Also shows individual files in untracked directories.
+`no`:: Show no untracked files
+`normal`:: Shows untracked files and directories
+`all`:: Also shows individual files in untracked directories.
All usual spellings for Boolean value `true` are taken as `normal`
and `false` as `no`.
-The default can be changed using the status.showUntrackedFiles
+The default can be changed using the `status.showUntrackedFiles`
configuration variable documented in linkgit:git-config[1].
--
--v::
---verbose::
- Show unified diff between the HEAD commit and what
+`-v`::
+`--verbose`::
+ Show unified diff between the `HEAD` commit and what
would be committed at the bottom of the commit message
template to help the user describe the commit by reminding
what changes the commit has.
Note that this diff output doesn't have its
- lines prefixed with '#'. This diff will not be a part
+ lines prefixed with `#`. This diff will not be a part
of the commit message. See the `commit.verbose` configuration
variable in linkgit:git-config[1].
+
@@ -368,40 +365,40 @@ If specified twice, show in addition the unified diff between
what would be committed and the worktree files, i.e. the unstaged
changes to tracked files.
--q::
---quiet::
+`-q`::
+`--quiet`::
Suppress commit summary message.
---dry-run::
+`--dry-run`::
Do not create a commit, but show a list of paths that are
to be committed, paths with local changes that will be left
uncommitted and paths that are untracked.
---status::
+`--status`::
Include the output of linkgit:git-status[1] in the commit
message template when using an editor to prepare the commit
message. Defaults to on, but can be used to override
- configuration variable commit.status.
+ configuration variable `commit.status`.
---no-status::
+`--no-status`::
Do not include the output of linkgit:git-status[1] in the
commit message template when using an editor to prepare the
default commit message.
--S[<keyid>]::
---gpg-sign[=<keyid>]::
---no-gpg-sign::
- GPG-sign commits. The `keyid` argument is optional and
+`-S[<key-id>]`::
+`--gpg-sign[=<key-id>]`::
+`--no-gpg-sign`::
+ GPG-sign commits. The _<key-id>_ is optional and
defaults to the committer identity; if specified, it must be
stuck to the option without a space. `--no-gpg-sign` is useful to
countermand both `commit.gpgSign` configuration variable, and
earlier `--gpg-sign`.
-\--::
+`--`::
Do not interpret any more arguments as options.
-<pathspec>...::
- When pathspec is given on the command line, commit the contents of
+`<pathspec>...`::
+ When _<pathspec>_ is given on the command line, commit the contents of
the files that match the pathspec without recording the changes
already added to the index. The contents of these files are also
staged for the next commit on top of what have been staged before.
@@ -412,10 +409,10 @@ EXAMPLES
--------
When recording your own work, the contents of modified files in
your working tree are temporarily stored to a staging area
-called the "index" with 'git add'. A file can be
+called the "index" with `git add`. A file can be
reverted back, only in the index but not in the working tree,
to that of the last commit with `git restore --staged <file>`,
-which effectively reverts 'git add' and prevents the changes to
+which effectively reverts `git add` and prevents the changes to
this file from participating in the next commit. After building
the state to be committed incrementally with these commands,
`git commit` (without any pathname parameter) is used to record what
@@ -443,7 +440,7 @@ $ git commit -a
------------
The command `git commit -a` first looks at your working tree,
-notices that you have modified hello.c and removed goodbye.c,
+notices that you have modified `hello.c` and removed `goodbye.c`,
and performs necessary `git add` and `git rm` for you.
After staging changes to many files, you can alter the order the
@@ -471,13 +468,13 @@ $ git commit
this second commit would record the changes to `hello.c` and
`hello.h` as expected.
-After a merge (initiated by 'git merge' or 'git pull') stops
+After a merge (initiated by `git merge` or `git pull`) stops
because of conflicts, cleanly merged
paths are already staged to be committed for you, and paths that
conflicted are left in unmerged state. You would have to first
-check which paths are conflicting with 'git status'
+check which paths are conflicting with `git status`
and after fixing them manually in your working tree, you would
-stage the result as usual with 'git add':
+stage the result as usual with `git add`:
------------
$ git status | grep unmerged
@@ -507,12 +504,12 @@ COMMIT INFORMATION
Author and committer information is taken from the following environment
variables, if set:
- GIT_AUTHOR_NAME
- GIT_AUTHOR_EMAIL
- GIT_AUTHOR_DATE
- GIT_COMMITTER_NAME
- GIT_COMMITTER_EMAIL
- GIT_COMMITTER_DATE
+ * `GIT_AUTHOR_NAME`
+ * `GIT_AUTHOR_EMAIL`
+ * `GIT_AUTHOR_DATE`
+ * `GIT_COMMITTER_NAME`
+ * `GIT_COMMITTER_EMAIL`
+ * `GIT_COMMITTER_DATE`
(nb "<", ">" and "\n"s are stripped)
@@ -524,7 +521,7 @@ that, see the `credential.username` variable in linkgit:git-config[1].
In case (some of) these environment variables are not set, the information
is taken from the configuration items `user.name` and `user.email`, or, if not
-present, the environment variable EMAIL, or, if that is not set,
+present, the environment variable `EMAIL`, or, if that is not set,
system user name and the hostname used for outgoing mail (taken
from `/etc/mailname` and falling back to the fully qualified hostname when
that file does not exist).
@@ -555,7 +552,7 @@ include::i18n.txt[]
ENVIRONMENT AND CONFIGURATION VARIABLES
---------------------------------------
The editor used to edit the commit log message will be chosen from the
-`GIT_EDITOR` environment variable, the core.editor configuration variable, the
+`GIT_EDITOR` environment variable, the `core.editor` configuration variable, the
`VISUAL` environment variable, or the `EDITOR` environment variable (in that
order). See linkgit:git-var[1] for details.
diff --git a/Documentation/git-credential-cache.txt b/Documentation/git-credential-cache.txt
index 487cc557a8..54fa7a27e1 100644
--- a/Documentation/git-credential-cache.txt
+++ b/Documentation/git-credential-cache.txt
@@ -78,6 +78,23 @@ variable (this example increases the cache time to 1 hour):
$ git config credential.helper 'cache --timeout=3600'
-------------------------------------------------------
+PERSONAL ACCESS TOKENS
+----------------------
+
+Some remotes accept personal access tokens, which are randomly
+generated and hard to memorise. They typically have a lifetime of weeks
+or months.
+
+git-credential-cache is inherently unsuitable for persistent storage of
+personal access tokens. The credential will be forgotten after the cache
+timeout. Even if you configure a long timeout, credentials will be
+forgotten if the daemon dies.
+
+To avoid frequently regenerating personal access tokens, configure a
+credential helper with persistent storage. Alternatively, configure an
+OAuth credential helper to generate credentials automatically. See
+linkgit:gitcredentials[7], sections "Available helpers" and "OAuth".
+
GIT
---
Part of the linkgit:git[1] suite
diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index 84022f99d7..5c8e6ff566 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -7,19 +7,19 @@ git-notes - Add or inspect object notes
SYNOPSIS
--------
-[verse]
-'git notes' [list [<object>]]
-'git notes' add [-f] [--allow-empty] [--[no-]separator | --separator=<paragraph-break>] [--[no-]stripspace] [-F <file> | -m <msg> | (-c | -C) <object>] [-e] [<object>]
-'git notes' copy [-f] ( --stdin | <from-object> [<to-object>] )
-'git notes' append [--allow-empty] [--[no-]separator | --separator=<paragraph-break>] [--[no-]stripspace] [-F <file> | -m <msg> | (-c | -C) <object>] [-e] [<object>]
-'git notes' edit [--allow-empty] [<object>] [--[no-]stripspace]
-'git notes' show [<object>]
-'git notes' merge [-v | -q] [-s <strategy> ] <notes-ref>
-'git notes' merge --commit [-v | -q]
-'git notes' merge --abort [-v | -q]
-'git notes' remove [--ignore-missing] [--stdin] [<object>...]
-'git notes' prune [-n] [-v]
-'git notes' get-ref
+[synopsis]
+git notes [list [<object>]]
+git notes add [-f] [--allow-empty] [--[no-]separator | --separator=<paragraph-break>] [--[no-]stripspace] [-F <file> | -m <msg> | (-c | -C) <object>] [-e] [<object>]
+git notes copy [-f] ( --stdin | <from-object> [<to-object>] )
+git notes append [--allow-empty] [--[no-]separator | --separator=<paragraph-break>] [--[no-]stripspace] [-F <file> | -m <msg> | (-c | -C) <object>] [-e] [<object>]
+git notes edit [--allow-empty] [<object>] [--[no-]stripspace]
+git notes show [<object>]
+git notes merge [-v | -q] [-s <strategy> ] <notes-ref>
+git notes merge --commit [-v | -q]
+git notes merge --abort [-v | -q]
+git notes remove [--ignore-missing] [--stdin] [<object>...]
+git notes prune [-n] [-v]
+git notes get-ref
DESCRIPTION
@@ -33,34 +33,34 @@ ENVIRONMENT sections below. If this ref does not exist, it will be
quietly created when it is first needed to store a note.
A typical use of notes is to supplement a commit message without
-changing the commit itself. Notes can be shown by 'git log' along with
+changing the commit itself. Notes can be shown by `git log` along with
the original commit message. To distinguish these notes from the
message stored in the commit object, the notes are indented like the
-message, after an unindented line saying "Notes (<refname>):" (or
+message, after an unindented line saying "Notes (_<refname>_):" (or
"Notes:" for `refs/notes/commits`).
Notes can also be added to patches prepared with `git format-patch` by
using the `--notes` option. Such notes are added as a patch commentary
after a three dash separator line.
-To change which notes are shown by 'git log', see the
-"notes.displayRef" discussion in <<CONFIGURATION>>.
+To change which notes are shown by `git log`, see the
+`notes.displayRef` discussion in <<CONFIGURATION,CONFIGURATION>>.
-See the "notes.rewrite.<command>" configuration for a way to carry
+See the `notes.rewrite.<command>` configuration for a way to carry
notes across commands that rewrite commits.
SUBCOMMANDS
-----------
-list::
+`list`::
List the notes object for a given object. If no object is
given, show a list of all note objects and the objects they
- annotate (in the format "<note-object> <annotated-object>").
+ annotate (in the format "`<note-object> <annotated-object>`").
This is the default subcommand if no subcommand is given.
-add::
- Add notes for a given object (defaults to HEAD). Abort if the
+`add`::
+ Add notes for a given object (defaults to `HEAD`). Abort if the
object already has notes (use `-f` to overwrite existing notes).
However, if you're using `add` interactively (using an editor
to supply the notes contents), then - instead of aborting -
@@ -71,10 +71,10 @@ add::
fine-tune the message(s) supplied from `-m` and `-F` options
interactively (using an editor) before adding the note.
-copy::
+`copy`::
Copy the notes for the first object onto the second object (defaults to
- HEAD). Abort if the second object already has notes, or if the first
- object has none (use -f to overwrite existing notes to the
+ `HEAD`). Abort if the second object already has notes, or if the first
+ object has none (use `-f` to overwrite existing notes to the
second object). This subcommand is equivalent to:
`git notes add [-f] -C $(git notes list <from-object>) <to-object>`
+
@@ -84,27 +84,27 @@ In `--stdin` mode, take lines in the format
<from-object> SP <to-object> [ SP <rest> ] LF
----------
+
-on standard input, and copy the notes from each <from-object> to its
-corresponding <to-object>. (The optional `<rest>` is ignored so that
+on standard input, and copy the notes from each _<from-object>_ to its
+corresponding _<to-object>_. (The optional _<rest>_ is ignored so that
the command can read the input given to the `post-rewrite` hook.)
-append::
+`append`::
Append new message(s) given by `-m` or `-F` options to an
existing note, or add them as a new note if one does not
- exist, for the object (defaults to HEAD). When appending to
+ exist, for the object (defaults to `HEAD`). When appending to
an existing note, a blank line is added before each new
message as an inter-paragraph separator. The separator can
be customized with the `--separator` option.
Edit the notes to be appended given by `-m` and `-F` options with
`-e` interactively (using an editor) before appending the note.
-edit::
- Edit the notes for a given object (defaults to HEAD).
+`edit`::
+ Edit the notes for a given object (defaults to `HEAD`).
-show::
- Show the notes for a given object (defaults to HEAD).
+`show`::
+ Show the notes for a given object (defaults to `HEAD`).
-merge::
+`merge`::
Merge the given notes ref into the current notes ref.
This will try to merge the changes made by the given
notes ref (called "remote") since the merge-base (if
@@ -112,35 +112,35 @@ merge::
+
If conflicts arise and a strategy for automatically resolving
conflicting notes (see the "NOTES MERGE STRATEGIES" section) is not given,
-the "manual" resolver is used. This resolver checks out the
+the `manual` resolver is used. This resolver checks out the
conflicting notes in a special worktree (`.git/NOTES_MERGE_WORKTREE`),
and instructs the user to manually resolve the conflicts there.
When done, the user can either finalize the merge with
-'git notes merge --commit', or abort the merge with
-'git notes merge --abort'.
+`git notes merge --commit`, or abort the merge with
+`git notes merge --abort`.
-remove::
- Remove the notes for given objects (defaults to HEAD). When
+`remove`::
+ Remove the notes for given objects (defaults to `HEAD`). When
giving zero or one object from the command line, this is
equivalent to specifying an empty note message to
the `edit` subcommand.
-prune::
+`prune`::
Remove all notes for non-existing/unreachable objects.
-get-ref::
+`get-ref`::
Print the current notes ref. This provides an easy way to
retrieve the current notes ref (e.g. from scripts).
OPTIONS
-------
--f::
---force::
+`-f`::
+`--force`::
When adding notes to an object that already has notes,
overwrite the existing notes (instead of aborting).
--m <msg>::
---message=<msg>::
+`-m <msg>`::
+`--message=<msg>`::
Use the given note message (instead of prompting).
If multiple `-m` options are given, their values
are concatenated as separate paragraphs.
@@ -148,95 +148,96 @@ OPTIONS
single line between paragraphs will be stripped out.
If you wish to keep them verbatim, use `--no-stripspace`.
--F <file>::
---file=<file>::
- Take the note message from the given file. Use '-' to
+`-F <file>`::
+`--file=<file>`::
+ Take the note message from the given file. Use `-` to
read the note message from the standard input.
Lines starting with `#` and empty lines other than a
single line between paragraphs will be stripped out.
If you wish to keep them verbatim, use `--no-stripspace`.
--C <object>::
---reuse-message=<object>::
+`-C <object>`::
+`--reuse-message=<object>`::
Take the given blob object (for example, another note) as the
note message. (Use `git notes copy <object>` instead to
copy notes between objects.). By default, message will be
copied verbatim, but if you wish to strip out the lines
starting with `#` and empty lines other than a single line
- between paragraphs, use with`--stripspace` option.
+ between paragraphs, use with `--stripspace` option.
--c <object>::
---reedit-message=<object>::
- Like '-C', but with `-c` the editor is invoked, so that
+`-c <object>`::
+`--reedit-message=<object>`::
+ Like `-C`, but with `-c` the editor is invoked, so that
the user can further edit the note message.
---allow-empty::
+`--allow-empty`::
Allow an empty note object to be stored. The default behavior is
to automatically remove empty notes.
---[no-]separator, --separator=<paragraph-break>::
+`--[no-]separator`::
+`--separator=<paragraph-break>`::
Specify a string used as a custom inter-paragraph separator
(a newline is added at the end as needed). If `--no-separator`, no
separators will be added between paragraphs. Defaults to a blank
line.
---[no-]stripspace::
+`--[no-]stripspace`::
Strip leading and trailing whitespace from the note message.
Also strip out empty lines other than a single line between
paragraphs. Lines starting with `#` will be stripped out
in non-editor cases like `-m`, `-F` and `-C`, but not in
editor case like `git notes edit`, `-c`, etc.
---ref <ref>::
- Manipulate the notes tree in <ref>. This overrides
- `GIT_NOTES_REF` and the "core.notesRef" configuration. The ref
+`--ref <ref>`::
+ Manipulate the notes tree in _<ref>_. This overrides
+ `GIT_NOTES_REF` and the `core.notesRef` configuration. The ref
specifies the full refname when it begins with `refs/notes/`; when it
begins with `notes/`, `refs/` and otherwise `refs/notes/` is prefixed
to form a full name of the ref.
---ignore-missing::
+`--ignore-missing`::
Do not consider it an error to request removing notes from an
object that does not have notes attached to it.
---stdin::
+`--stdin`::
Also read the object names to remove notes from the standard
input (there is no reason you cannot combine this with object
names from the command line).
--n::
---dry-run::
+`-n`::
+`--dry-run`::
Do not remove anything; just report the object names whose notes
would be removed.
--s <strategy>::
---strategy=<strategy>::
+`-s <strategy>`::
+`--strategy=<strategy>`::
When merging notes, resolve notes conflicts using the given
- strategy. The following strategies are recognized: "manual"
- (default), "ours", "theirs", "union" and "cat_sort_uniq".
- This option overrides the "notes.mergeStrategy" configuration setting.
+ strategy. The following strategies are recognized: `manual`
+ (default), `ours`, `theirs`, `union` and `cat_sort_uniq`.
+ This option overrides the `notes.mergeStrategy` configuration setting.
See the "NOTES MERGE STRATEGIES" section below for more
information on each notes merge strategy.
---commit::
- Finalize an in-progress 'git notes merge'. Use this option
- when you have resolved the conflicts that 'git notes merge'
- stored in .git/NOTES_MERGE_WORKTREE. This amends the partial
- merge commit created by 'git notes merge' (stored in
- .git/NOTES_MERGE_PARTIAL) by adding the notes in
- .git/NOTES_MERGE_WORKTREE. The notes ref stored in the
- .git/NOTES_MERGE_REF symref is updated to the resulting commit.
-
---abort::
- Abort/reset an in-progress 'git notes merge', i.e. a notes merge
+`--commit`::
+ Finalize an in-progress `git notes merge`. Use this option
+ when you have resolved the conflicts that `git notes merge`
+ stored in `.git/NOTES_MERGE_WORKTREE`. This amends the partial
+ merge commit created by `git notes merge` (stored in
+ `.git/NOTES_MERGE_PARTIAL`) by adding the notes in
+ `.git/NOTES_MERGE_WORKTREE`. The notes ref stored in the
+ `.git/NOTES_MERGE_REF` symref is updated to the resulting commit.
+
+`--abort`::
+ Abort/reset an in-progress `git notes merge`, i.e. a notes merge
with conflicts. This simply removes all files related to the
notes merge.
--q::
---quiet::
+`-q`::
+`--quiet`::
When merging notes, operate quietly.
--v::
---verbose::
+`-v`::
+`--verbose`::
When merging notes, be more verbose.
When pruning notes, report all object names whose notes are
removed.
@@ -270,28 +271,28 @@ object, in which case the history of the notes can be read with
NOTES MERGE STRATEGIES
----------------------
-The default notes merge strategy is "manual", which checks out
+The default notes merge strategy is `manual`, which checks out
conflicting notes in a special work tree for resolving notes conflicts
(`.git/NOTES_MERGE_WORKTREE`), and instructs the user to resolve the
conflicts in that work tree.
When done, the user can either finalize the merge with
-'git notes merge --commit', or abort the merge with
-'git notes merge --abort'.
+`git notes merge --commit`, or abort the merge with
+`git notes merge --abort`.
Users may select an automated merge strategy from among the following using
-either -s/--strategy option or configuring notes.mergeStrategy accordingly:
+either `-s`/`--strategy` option or configuring `notes.mergeStrategy` accordingly:
-"ours" automatically resolves conflicting notes in favor of the local
+`ours` automatically resolves conflicting notes in favor of the local
version (i.e. the current notes ref).
-"theirs" automatically resolves notes conflicts in favor of the remote
+`theirs` automatically resolves notes conflicts in favor of the remote
version (i.e. the given notes ref being merged into the current notes
ref).
-"union" automatically resolves notes conflicts by concatenating the
+`union` automatically resolves notes conflicts by concatenating the
local and remote versions.
-"cat_sort_uniq" is similar to "union", but in addition to concatenating
+`cat_sort_uniq` is similar to `union`, but in addition to concatenating
the local and remote versions, this strategy also sorts the resulting
lines, and removes duplicate lines from the result. This is equivalent
to applying the "cat | sort | uniq" shell pipeline to the local and
@@ -320,7 +321,7 @@ Notes:
In principle, a note is a regular Git blob, and any kind of
(non-)format is accepted. You can binary-safely create notes from
-arbitrary files using 'git hash-object':
+arbitrary files using `git hash-object`:
------------
$ cc *.c
@@ -331,7 +332,7 @@ $ git notes --ref=built add --allow-empty -C "$blob" HEAD
(You cannot simply use `git notes --ref=built add -F a.out HEAD`
because that is not binary-safe.)
Of course, it doesn't make much sense to display non-text-format notes
-with 'git log', so if you use such notes, you'll probably need to write
+with `git log`, so if you use such notes, you'll probably need to write
some special-purpose tools to do something useful with them.
@@ -339,7 +340,7 @@ some special-purpose tools to do something useful with them.
CONFIGURATION
-------------
-core.notesRef::
+`core.notesRef`::
Notes ref to read and manipulate instead of
`refs/notes/commits`. Must be an unabbreviated ref name.
This setting can be overridden through the environment and
diff --git a/Documentation/git-range-diff.txt b/Documentation/git-range-diff.txt
index fbdbe0befe..db0e4279b5 100644
--- a/Documentation/git-range-diff.txt
+++ b/Documentation/git-range-diff.txt
@@ -10,7 +10,8 @@ SYNOPSIS
[verse]
'git range-diff' [--color=[<when>]] [--no-color] [<diff-options>]
[--no-dual-color] [--creation-factor=<factor>]
- [--left-only | --right-only]
+ [--left-only | --right-only] [--diff-merges=<format>]
+ [--remerge-diff]
( <range1> <range2> | <rev1>...<rev2> | <base> <rev1> <rev2> )
[[--] <path>...]
@@ -81,6 +82,20 @@ to revert to color all lines according to the outer diff markers
Suppress commits that are missing from the second specified range
(or the "right range" when using the `<rev1>...<rev2>` format).
+--diff-merges=<format>::
+ Instead of ignoring merge commits, generate diffs for them using the
+ corresponding `--diff-merges=<format>` option of linkgit:git-log[1],
+ and include them in the comparison.
++
+Note: In the common case, the `remerge` mode will be the most natural one
+to use, as it shows only the diff on top of what Git's merge machinery would
+have produced. In other words, if a merge commit is the result of a
+non-conflicting `git merge`, the `remerge` mode will represent it with an empty
+diff.
+
+--remerge-diff::
+ Convenience option, equivalent to `--diff-merges=remerge`.
+
--[no-]notes[=<ref>]::
This flag is passed to the `git log` program
(see linkgit:git-log[1]) that generates the patches.
diff --git a/Documentation/git-refs.txt b/Documentation/git-refs.txt
index ce31f93061..9829984b0a 100644
--- a/Documentation/git-refs.txt
+++ b/Documentation/git-refs.txt
@@ -57,8 +57,6 @@ KNOWN LIMITATIONS
The ref format migration has several known limitations in its current form:
-* It is not possible to migrate repositories that have reflogs.
-
* It is not possible to migrate repositories that have worktrees.
* There is no way to block concurrent writes to the repository during an
diff --git a/Documentation/git-restore.txt b/Documentation/git-restore.txt
index 975825b44a..751f01b441 100644
--- a/Documentation/git-restore.txt
+++ b/Documentation/git-restore.txt
@@ -7,10 +7,10 @@ git-restore - Restore working tree files
SYNOPSIS
--------
-[verse]
-'git restore' [<options>] [--source=<tree>] [--staged] [--worktree] [--] <pathspec>...
-'git restore' [<options>] [--source=<tree>] [--staged] [--worktree] --pathspec-from-file=<file> [--pathspec-file-nul]
-'git restore' (-p|--patch) [<options>] [--source=<tree>] [--staged] [--worktree] [--] [<pathspec>...]
+[synopsis]
+git restore [<options>] [--source=<tree>] [--staged] [--worktree] [--] <pathspec>...
+git restore [<options>] [--source=<tree>] [--staged] [--worktree] --pathspec-from-file=<file> [--pathspec-file-nul]
+git restore (-p|--patch) [<options>] [--source=<tree>] [--staged] [--worktree] [--] [<pathspec>...]
DESCRIPTION
-----------
@@ -32,8 +32,8 @@ THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
OPTIONS
-------
--s <tree>::
---source=<tree>::
+`-s <tree>`::
+`--source=<tree>`::
Restore the working tree files with the content from the given
tree. It is common to specify the source tree by naming a
commit, branch or tag associated with it.
@@ -41,79 +41,79 @@ OPTIONS
If not specified, the contents are restored from `HEAD` if `--staged` is
given, otherwise from the index.
+
-As a special case, you may use `"A...B"` as a shortcut for the
-merge base of `A` and `B` if there is exactly one merge base. You can
-leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
+As a special case, you may use `"<rev-A>...<rev-B>"` as a shortcut for the
+merge base of _<rev-A>_ and _<rev-B>_ if there is exactly one merge base. You can
+leave out at most one of _<rev-A>__ and _<rev-B>_, in which case it defaults to `HEAD`.
--p::
---patch::
+`-p`::
+`--patch`::
Interactively select hunks in the difference between the
- restore source and the restore location. See the ``Interactive
- Mode'' section of linkgit:git-add[1] to learn how to operate
+ restore source and the restore location. See the "Interactive
+ Mode" section of linkgit:git-add[1] to learn how to operate
the `--patch` mode.
+
Note that `--patch` can accept no pathspec and will prompt to restore
all modified paths.
--W::
---worktree::
--S::
---staged::
+`-W`::
+`--worktree`::
+`-S`::
+`--staged`::
Specify the restore location. If neither option is specified,
by default the working tree is restored. Specifying `--staged`
will only restore the index. Specifying both restores both.
--q::
---quiet::
+`-q`::
+`--quiet`::
Quiet, suppress feedback messages. Implies `--no-progress`.
---progress::
---no-progress::
+`--progress`::
+`--no-progress`::
Progress status is reported on the standard error stream
by default when it is attached to a terminal, unless `--quiet`
is specified. This flag enables progress reporting even if not
attached to a terminal, regardless of `--quiet`.
---ours::
---theirs::
+`--ours`::
+`--theirs`::
When restoring files in the working tree from the index, use
- stage #2 ('ours') or #3 ('theirs') for unmerged paths.
+ stage #2 (`ours`) or #3 (`theirs`) for unmerged paths.
This option cannot be used when checking out paths from a
tree-ish (i.e. with the `--source` option).
+
-Note that during `git rebase` and `git pull --rebase`, 'ours' and
-'theirs' may appear swapped. See the explanation of the same options
+Note that during `git rebase` and `git pull --rebase`, `ours` and
+`theirs` may appear swapped. See the explanation of the same options
in linkgit:git-checkout[1] for details.
--m::
---merge::
+`-m`::
+`--merge`::
When restoring files on the working tree from the index,
recreate the conflicted merge in the unmerged paths.
This option cannot be used when checking out paths from a
tree-ish (i.e. with the `--source` option).
---conflict=<style>::
+`--conflict=<style>`::
The same as `--merge` option above, but changes the way the
conflicting hunks are presented, overriding the
`merge.conflictStyle` configuration variable. Possible values
- are "merge" (default), "diff3", and "zdiff3".
+ are `merge` (default), `diff3`, and `zdiff3`.
---ignore-unmerged::
+`--ignore-unmerged`::
When restoring files on the working tree from the index, do
not abort the operation if there are unmerged entries and
neither `--ours`, `--theirs`, `--merge` or `--conflict` is
specified. Unmerged paths on the working tree are left alone.
---ignore-skip-worktree-bits::
+`--ignore-skip-worktree-bits`::
In sparse checkout mode, the default is to only update entries
- matched by `<pathspec>` and sparse patterns in
- $GIT_DIR/info/sparse-checkout. This option ignores the sparse
+ matched by _<pathspec>_ and sparse patterns in
+ `$GIT_DIR/info/sparse-checkout`. This option ignores the sparse
patterns and unconditionally restores any files in
- `<pathspec>`.
+ _<pathspec>_.
---recurse-submodules::
---no-recurse-submodules::
- If `<pathspec>` names an active submodule and the restore location
+`--recurse-submodules`::
+`--no-recurse-submodules`::
+ If _<pathspec>_ names an active submodule and the restore location
includes the working tree, the submodule will only be updated if
this option is given, in which case its working tree will be
restored to the commit recorded in the superproject, and any local
@@ -122,30 +122,30 @@ in linkgit:git-checkout[1] for details.
not be updated. Just like linkgit:git-checkout[1], this will detach
`HEAD` of the submodule.
---overlay::
---no-overlay::
- In overlay mode, the command never removes files when
- restoring. In no-overlay mode, tracked files that do not
- appear in the `--source` tree are removed, to make them match
- `<tree>` exactly. The default is no-overlay mode.
-
---pathspec-from-file=<file>::
- Pathspec is passed in `<file>` instead of commandline args. If
- `<file>` is exactly `-` then standard input is used. Pathspec
- elements are separated by LF or CR/LF. Pathspec elements can be
+`--overlay`::
+`--no-overlay`::
+ In overlay mode, never remove files when restoring. In no-overlay mode,
+ remove tracked files that do not appear in the _<tree>_ of
+ `--source=<tree>`, to make them match _<tree>_ exactly. The default
+ is no-overlay mode.
+
+`--pathspec-from-file=<file>`::
+ Pathspec is passed in _<file>_ instead of commandline args. If
+ _<file>_ is exactly `-` then standard input is used. Pathspec
+ elements are separated by _LF_ or _CR_/_LF_. Pathspec elements can be
quoted as explained for the configuration variable `core.quotePath`
(see linkgit:git-config[1]). See also `--pathspec-file-nul` and
global `--literal-pathspecs`.
---pathspec-file-nul::
+`--pathspec-file-nul`::
Only meaningful with `--pathspec-from-file`. Pathspec elements are
- separated with NUL character and all other characters are taken
+ separated with _NUL_ character and all other characters are taken
literally (including newlines and quotes).
-\--::
+`--`::
Do not interpret any more arguments as options.
-<pathspec>...::
+`<pathspec>...`::
Limits the paths affected by the operation.
+
For more details, see the 'pathspec' entry in linkgit:gitglossary[7].
@@ -154,7 +154,7 @@ EXAMPLES
--------
The following sequence switches to the `master` branch, reverts the
-`Makefile` to two revisions back, deletes hello.c by mistake, and gets
+`Makefile` to two revisions back, deletes `hello.c` by mistake, and gets
it back from the index.
------------
@@ -165,7 +165,7 @@ $ git restore hello.c <2>
------------
<1> take a file out of another commit
-<2> restore hello.c from the index
+<2> restore `hello.c` from the index
If you want to restore _all_ C source files to match the version in
the index, you can say
diff --git a/Documentation/git-show-index.txt b/Documentation/git-show-index.txt
index e49318a5a0..7e574ea243 100644
--- a/Documentation/git-show-index.txt
+++ b/Documentation/git-show-index.txt
@@ -9,7 +9,7 @@ git-show-index - Show packed archive index
SYNOPSIS
--------
[verse]
-'git show-index' [--object-format=<hash-algorithm>]
+'git show-index' [--object-format=<hash-algorithm>] < <pack-idx-file>
DESCRIPTION
diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt
index 8a4281cde9..9e6935d38d 100644
--- a/Documentation/git-update-ref.txt
+++ b/Documentation/git-update-ref.txt
@@ -93,11 +93,11 @@ update::
ref does not exist before the update.
create::
- Create <ref> with <new-oid> after verifying it does not
+ Create <ref> with <new-oid> after verifying that it does not
exist. The given <new-oid> may not be zero.
delete::
- Delete <ref> after verifying it exists with <old-oid>, if
+ Delete <ref> after verifying that it exists with <old-oid>, if
given. If given, <old-oid> may not be zero.
symref-update::
@@ -110,11 +110,11 @@ verify::
<old-oid> is zero or missing, the ref must not exist.
symref-create:
- Create symbolic ref <ref> with <new-target> after verifying
+ Create symbolic ref <ref> with <new-target> after verifying that
it does not exist.
symref-delete::
- Delete <ref> after verifying it exists with <old-target>, if given.
+ Delete <ref> after verifying that it exists with <old-target>, if given.
symref-verify::
Verify symbolic <ref> against <old-target> but do not change it.
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 70437c815f..8340b7f028 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -216,6 +216,14 @@ To remove a locked worktree, specify `--force` twice.
This can also be set up as the default behaviour by using the
`worktree.guessRemote` config option.
+--[no-]relative-paths::
+ Link worktrees using relative paths or absolute paths (default).
+ Overrides the `worktree.useRelativePaths` config option, see
+ linkgit:git-config[1].
++
+With `repair`, the linking files will be updated if there's an absolute/relative
+mismatch, even if the links are correct.
+
--[no-]track::
When creating a new branch, if `<commit-ish>` is a branch,
mark it as "upstream" from the new branch. This is the
diff --git a/Documentation/git.txt b/Documentation/git.txt
index d15a869762..e89a91dd0d 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -245,17 +245,17 @@ ancillary user utilities.
Main porcelain commands
~~~~~~~~~~~~~~~~~~~~~~~
-include::cmds-mainporcelain.txt[]
+include::{build_dir}/cmds-mainporcelain.txt[]
Ancillary Commands
~~~~~~~~~~~~~~~~~~
Manipulators:
-include::cmds-ancillarymanipulators.txt[]
+include::{build_dir}/cmds-ancillarymanipulators.txt[]
Interrogators:
-include::cmds-ancillaryinterrogators.txt[]
+include::{build_dir}/cmds-ancillaryinterrogators.txt[]
Interacting with Others
@@ -264,7 +264,7 @@ Interacting with Others
These commands are to interact with foreign SCM and with other
people via patch over e-mail.
-include::cmds-foreignscminterface.txt[]
+include::{build_dir}/cmds-foreignscminterface.txt[]
Reset, restore and revert
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -313,13 +313,13 @@ repositories.
Manipulation commands
~~~~~~~~~~~~~~~~~~~~~
-include::cmds-plumbingmanipulators.txt[]
+include::{build_dir}/cmds-plumbingmanipulators.txt[]
Interrogation commands
~~~~~~~~~~~~~~~~~~~~~~
-include::cmds-plumbinginterrogators.txt[]
+include::{build_dir}/cmds-plumbinginterrogators.txt[]
In general, the interrogate commands do not touch the files in
the working tree.
@@ -328,12 +328,12 @@ the working tree.
Syncing repositories
~~~~~~~~~~~~~~~~~~~~
-include::cmds-synchingrepositories.txt[]
+include::{build_dir}/cmds-synchingrepositories.txt[]
The following are helper commands used by the above; end users
typically do not use them directly.
-include::cmds-synchelpers.txt[]
+include::{build_dir}/cmds-synchelpers.txt[]
Internal helper commands
@@ -342,14 +342,14 @@ Internal helper commands
These are internal helper commands used by other commands; end
users typically do not use them directly.
-include::cmds-purehelpers.txt[]
+include::{build_dir}/cmds-purehelpers.txt[]
Guides
------
The following documentation pages are guides about Git concepts.
-include::cmds-guide.txt[]
+include::{build_dir}/cmds-guide.txt[]
Repository, command and file interfaces
---------------------------------------
@@ -358,7 +358,7 @@ This documentation discusses repository and command interfaces which
users are expected to interact with directly. See `--user-formats` in
linkgit:git-help[1] for more details on the criteria.
-include::cmds-userinterfaces.txt[]
+include::{build_dir}/cmds-userinterfaces.txt[]
File formats, protocols and other developer interfaces
------------------------------------------------------
@@ -367,7 +367,7 @@ This documentation discusses file formats, over-the-wire protocols and
other git developer interfaces. See `--developer-interfaces` in
linkgit:git-help[1].
-include::cmds-developerinterfaces.txt[]
+include::{build_dir}/cmds-developerinterfaces.txt[]
Configuration Mechanism
-----------------------
@@ -477,6 +477,14 @@ their values the same way as Boolean valued configuration variables, e.g.
Here are the variables:
+System
+~~~~~~
+`HOME`::
+ Specifies the path to the user's home directory. On Windows, if
+ unset, Git will set a process environment variable equal to:
+ `$HOMEDRIVE$HOMEPATH` if both `$HOMEDRIVE` and `$HOMEPATH` exist;
+ otherwise `$USERPROFILE` if `$USERPROFILE` exists.
+
The Git Repository
~~~~~~~~~~~~~~~~~~
These environment variables apply to 'all' core Git commands. Nb: it
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index e6150595af..5d12b78549 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -1166,7 +1166,7 @@ internal merge and the final merge.
The merge driver can learn the pathname in which the merged result
will be stored via placeholder `%P`. The conflict labels to be used
for the common ancestor, local head and other head can be passed by
-using '%S', '%X' and '%Y` respectively.
+using `%S`, `%X` and `%Y` respectively.
`conflict-marker-size`
^^^^^^^^^^^^^^^^^^^^^^
diff --git a/Documentation/gitcli.txt b/Documentation/gitcli.txt
index 7c709324ba..04193ec907 100644
--- a/Documentation/gitcli.txt
+++ b/Documentation/gitcli.txt
@@ -90,6 +90,15 @@ scripting Git:
for long options. An option that takes optional option-argument must be
written in the 'stuck' form.
+ * Despite the above suggestion, when Arg is a path relative to the
+ home directory of a user, e.g. `~/directory/file` or `~u/d/f`, you
+ may want to use the separate form, e.g. `git foo --file ~/mine`,
+ not `git foo --file=~/mine`. The shell will expand `~/` in the
+ former to your home directory, but most shells keep the tilde in
+ the latter. Some of our commands know how to tilde-expand the
+ option value even when given in the stuck form, but not all of
+ them do.
+
* When you give a revision parameter to a command, make sure the parameter is
not ambiguous with a name of a file in the work tree. E.g. do not write
`git log -1 HEAD` but write `git log -1 HEAD --`; the former will not work
@@ -152,6 +161,23 @@ can use `--no-track` to override that behaviour. The same goes for `--color`
and `--no-color`.
+Options trump configuration and environment
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When there is a configuration variable or an environment variable
+that tweak the behaviour of an aspect of a Git command, and also a
+command line option that tweaks the same, the command line option
+overrides what the configuration and/or environment variable say.
+
+For example, the `user.name` configuration variable is used to
+specify the human-readable name used by the `git commit` command to
+record the author and the committer name in a newly created commit.
+The `GIT_AUTHOR_NAME` environment variable, if set, takes precedence
+when deciding what author name to record. The `--author=<author>`
+command line option of the `git commit` command, when given, takes
+precedence over these two sources of information.
+
+
Aggregating short options
~~~~~~~~~~~~~~~~~~~~~~~~~
Commands that support the enhanced option parser allow you to aggregate short
diff --git a/Documentation/gitcredentials.txt b/Documentation/gitcredentials.txt
index 71dd19731a..3337bb475d 100644
--- a/Documentation/gitcredentials.txt
+++ b/Documentation/gitcredentials.txt
@@ -66,18 +66,7 @@ storage provided by the OS or other programs. Alternatively, a
credential-generating helper might generate credentials for certain servers via
some API.
-To use a helper, you must first select one to use. Git currently
-includes the following helpers:
-
-cache::
-
- Cache credentials in memory for a short period of time. See
- linkgit:git-credential-cache[1] for details.
-
-store::
-
- Store credentials indefinitely on disk. See
- linkgit:git-credential-store[1] for details.
+To use a helper, you must first select one to use (see below for a list).
You may also have third-party helpers installed; search for
`credential-*` in the output of `git help -a`, and consult the
@@ -106,6 +95,28 @@ $ git config --global credential.helper foo
=== Available helpers
+Git currently includes the following helpers:
+
+cache::
+
+ Cache credentials in memory for a short period of time. See
+ linkgit:git-credential-cache[1] for details.
+
+store::
+
+ Store credentials indefinitely on disk. See
+ linkgit:git-credential-store[1] for details.
+
+Popular helpers with secure persistent storage include:
+
+ - git-credential-libsecret (Linux)
+
+ - git-credential-osxkeychain (macOS)
+
+ - git-credential-wincred (Windows)
+
+ - https://github.com/git-ecosystem/git-credential-manager[Git Credential Manager] (cross platform, included in Git for Windows)
+
The community maintains a comprehensive list of Git credential helpers at
https://git-scm.com/doc/credential-helpers.
@@ -116,6 +127,12 @@ OAuth credential helper. Initial authentication opens a browser window to the
host. Subsequent authentication happens in the background. Many popular Git
hosts support OAuth.
+Popular helpers with OAuth support include:
+
+ - https://github.com/git-ecosystem/git-credential-manager[Git Credential Manager] (cross platform, included in Git for Windows)
+
+ - https://github.com/hickford/git-credential-oauth[git-credential-oauth] (cross platform, included in many Linux distributions)
+
CREDENTIAL CONTEXTS
-------------------
@@ -242,6 +259,12 @@ Here are some example specifications:
[credential]
helper = "foo --bar='whitespace arg'"
+# store helper (discouraged) with custom location for the db file;
+# use `--file ~/.git-secret.txt`, rather than `--file=~/.git-secret.txt`,
+# to allow the shell to expand tilde to the home directory.
+[credential]
+ helper = "store --file ~/.git-secret.txt"
+
# you can also use an absolute path, which will not use the git wrapper
[credential]
helper = "/path/to/my/helper --with-arguments"
diff --git a/Documentation/gitrepository-layout.txt b/Documentation/gitrepository-layout.txt
index fa8b51daf0..85911ca8ea 100644
--- a/Documentation/gitrepository-layout.txt
+++ b/Documentation/gitrepository-layout.txt
@@ -153,7 +153,7 @@ config.worktree::
linkgit:git-worktree[1]).
branches::
- A slightly deprecated way to store shorthands to be used
+ A deprecated way to store shorthands to be used
to specify a URL to 'git fetch', 'git pull' and 'git push'.
A file can be stored as `branches/<name>` and then
'name' can be given to these commands in place of
@@ -162,7 +162,8 @@ branches::
and not likely to be found in modern repositories. This
directory is ignored if $GIT_COMMON_DIR is set and
"$GIT_COMMON_DIR/branches" will be used instead.
-
++
+Git will stop reading remotes from this directory in Git 3.0.
hooks::
Hooks are customization scripts used by various Git
@@ -238,6 +239,8 @@ remotes::
and not likely to be found in modern repositories. This
directory is ignored if $GIT_COMMON_DIR is set and
"$GIT_COMMON_DIR/remotes" will be used instead.
++
+Git will stop reading remotes from this directory in Git 3.0.
logs::
Records of changes made to refs are stored in this directory.
diff --git a/Documentation/howto-index.sh b/Documentation/howto/howto-index.sh
index 167b363668..eecd123a93 100755
--- a/Documentation/howto-index.sh
+++ b/Documentation/howto/howto-index.sh
@@ -48,7 +48,7 @@ do
file="$txt"
fi
- echo "* link:$file[$title] $from
+ echo "* link:howto/$(basename "$file")[$title] $from
$abstract
"
diff --git a/Documentation/howto/meson.build b/Documentation/howto/meson.build
new file mode 100644
index 0000000000..c023c10416
--- /dev/null
+++ b/Documentation/howto/meson.build
@@ -0,0 +1,62 @@
+howto_sources = [
+ 'coordinate-embargoed-releases.txt',
+ 'keep-canonical-history-correct.txt',
+ 'maintain-git.txt',
+ 'new-command.txt',
+ 'rebase-from-internal-branch.txt',
+ 'rebuild-from-update-hook.txt',
+ 'recover-corrupted-blob-object.txt',
+ 'recover-corrupted-object-harder.txt',
+ 'revert-a-faulty-merge.txt',
+ 'revert-branch-rebase.txt',
+ 'separating-topic-branches.txt',
+ 'setup-git-server-over-http.txt',
+ 'update-hook-example.txt',
+ 'use-git-daemon.txt',
+ 'using-merge-subtree.txt',
+ 'using-signed-tag-in-pull-request.txt',
+]
+
+howto_index = custom_target(
+ command: [
+ shell,
+ meson.current_source_dir() / 'howto-index.sh',
+ '@INPUT@',
+ ],
+ env: script_environment,
+ capture: true,
+ input: howto_sources,
+ output: 'howto-index.txt',
+)
+
+custom_target(
+ command: asciidoc_html_options,
+ input: howto_index,
+ output: 'howto-index.html',
+ depends: documentation_deps,
+ install: true,
+ install_dir: get_option('datadir') / 'doc/git-doc',
+)
+
+foreach howto : howto_sources
+ howto_stripped = custom_target(
+ command: [
+ find_program('sed'),
+ '-e',
+ '1,/^$/d',
+ '@INPUT@',
+ ],
+ input: howto,
+ output: fs.stem(howto) + '.stripped',
+ capture: true,
+ )
+
+ custom_target(
+ command: asciidoc_html_options,
+ input: howto_stripped,
+ output: fs.stem(howto_stripped.full_path()) + '.html',
+ depends: documentation_deps,
+ install: true,
+ install_dir: get_option('datadir') / 'doc/git-doc/howto',
+ )
+endforeach
diff --git a/Documentation/i18n.txt b/Documentation/i18n.txt
index 3a866af4a4..baff780a7e 100644
--- a/Documentation/i18n.txt
+++ b/Documentation/i18n.txt
@@ -34,7 +34,7 @@ project find it more convenient to use legacy encodings, Git
does not forbid it. However, there are a few things to keep in
mind.
-. 'git commit' and 'git commit-tree' issue
+. `git commit` and `git commit-tree` issue
a warning if the commit log message given to it does not look
like a valid UTF-8 string, unless you explicitly say your
project uses a legacy encoding. The way to say this is to
@@ -50,7 +50,7 @@ of `i18n.commitEncoding` in their `encoding` header. This is to
help other people who look at them later. Lack of this header
implies that the commit log message is encoded in UTF-8.
-. 'git log', 'git show', 'git blame' and friends look at the
+. `git log`, `git show`, `git blame` and friends look at the
`encoding` header of a commit object, and try to re-code the
log message into UTF-8 unless otherwise specified. You can
specify the desired output encoding with
diff --git a/Documentation/meson.build b/Documentation/meson.build
new file mode 100644
index 0000000000..2a26fa8a5f
--- /dev/null
+++ b/Documentation/meson.build
@@ -0,0 +1,504 @@
+manpages = {
+ # Category 1.
+ 'git-add.txt' : 1,
+ 'git-am.txt' : 1,
+ 'git-annotate.txt' : 1,
+ 'git-apply.txt' : 1,
+ 'git-archimport.txt' : 1,
+ 'git-archive.txt' : 1,
+ 'git-bisect.txt' : 1,
+ 'git-blame.txt' : 1,
+ 'git-branch.txt' : 1,
+ 'git-bugreport.txt' : 1,
+ 'git-bundle.txt' : 1,
+ 'git-cat-file.txt' : 1,
+ 'git-check-attr.txt' : 1,
+ 'git-check-ignore.txt' : 1,
+ 'git-check-mailmap.txt' : 1,
+ 'git-checkout-index.txt' : 1,
+ 'git-checkout.txt' : 1,
+ 'git-check-ref-format.txt' : 1,
+ 'git-cherry-pick.txt' : 1,
+ 'git-cherry.txt' : 1,
+ 'git-citool.txt' : 1,
+ 'git-clean.txt' : 1,
+ 'git-clone.txt' : 1,
+ 'git-column.txt' : 1,
+ 'git-commit-graph.txt' : 1,
+ 'git-commit-tree.txt' : 1,
+ 'git-commit.txt' : 1,
+ 'git-config.txt' : 1,
+ 'git-count-objects.txt' : 1,
+ 'git-credential-cache--daemon.txt' : 1,
+ 'git-credential-cache.txt' : 1,
+ 'git-credential-store.txt' : 1,
+ 'git-credential.txt' : 1,
+ 'git-cvsexportcommit.txt' : 1,
+ 'git-cvsimport.txt' : 1,
+ 'git-cvsserver.txt' : 1,
+ 'git-daemon.txt' : 1,
+ 'git-describe.txt' : 1,
+ 'git-diagnose.txt' : 1,
+ 'git-diff-files.txt' : 1,
+ 'git-diff-index.txt' : 1,
+ 'git-difftool.txt' : 1,
+ 'git-diff-tree.txt' : 1,
+ 'git-diff.txt' : 1,
+ 'git-fast-export.txt' : 1,
+ 'git-fast-import.txt' : 1,
+ 'git-fetch-pack.txt' : 1,
+ 'git-fetch.txt' : 1,
+ 'git-filter-branch.txt' : 1,
+ 'git-fmt-merge-msg.txt' : 1,
+ 'git-for-each-ref.txt' : 1,
+ 'git-for-each-repo.txt' : 1,
+ 'git-format-patch.txt' : 1,
+ 'git-fsck-objects.txt' : 1,
+ 'git-fsck.txt' : 1,
+ 'git-fsmonitor--daemon.txt' : 1,
+ 'git-gc.txt' : 1,
+ 'git-get-tar-commit-id.txt' : 1,
+ 'git-grep.txt' : 1,
+ 'git-gui.txt' : 1,
+ 'git-hash-object.txt' : 1,
+ 'git-help.txt' : 1,
+ 'git-hook.txt' : 1,
+ 'git-http-backend.txt' : 1,
+ 'git-http-fetch.txt' : 1,
+ 'git-http-push.txt' : 1,
+ 'git-imap-send.txt' : 1,
+ 'git-index-pack.txt' : 1,
+ 'git-init-db.txt' : 1,
+ 'git-init.txt' : 1,
+ 'git-instaweb.txt' : 1,
+ 'git-interpret-trailers.txt' : 1,
+ 'git-log.txt' : 1,
+ 'git-ls-files.txt' : 1,
+ 'git-ls-remote.txt' : 1,
+ 'git-ls-tree.txt' : 1,
+ 'git-mailinfo.txt' : 1,
+ 'git-mailsplit.txt' : 1,
+ 'git-maintenance.txt' : 1,
+ 'git-merge-base.txt' : 1,
+ 'git-merge-file.txt' : 1,
+ 'git-merge-index.txt' : 1,
+ 'git-merge-one-file.txt' : 1,
+ 'git-mergetool--lib.txt' : 1,
+ 'git-mergetool.txt' : 1,
+ 'git-merge-tree.txt' : 1,
+ 'git-merge.txt' : 1,
+ 'git-mktag.txt' : 1,
+ 'git-mktree.txt' : 1,
+ 'git-multi-pack-index.txt' : 1,
+ 'git-mv.txt' : 1,
+ 'git-name-rev.txt' : 1,
+ 'git-notes.txt' : 1,
+ 'git-p4.txt' : 1,
+ 'git-pack-objects.txt' : 1,
+ 'git-pack-redundant.txt' : 1,
+ 'git-pack-refs.txt' : 1,
+ 'git-patch-id.txt' : 1,
+ 'git-prune-packed.txt' : 1,
+ 'git-prune.txt' : 1,
+ 'git-pull.txt' : 1,
+ 'git-push.txt' : 1,
+ 'git-quiltimport.txt' : 1,
+ 'git-range-diff.txt' : 1,
+ 'git-read-tree.txt' : 1,
+ 'git-rebase.txt' : 1,
+ 'git-receive-pack.txt' : 1,
+ 'git-reflog.txt' : 1,
+ 'git-refs.txt' : 1,
+ 'git-remote-ext.txt' : 1,
+ 'git-remote-fd.txt' : 1,
+ 'git-remote.txt' : 1,
+ 'git-repack.txt' : 1,
+ 'git-replace.txt' : 1,
+ 'git-replay.txt' : 1,
+ 'git-request-pull.txt' : 1,
+ 'git-rerere.txt' : 1,
+ 'git-reset.txt' : 1,
+ 'git-restore.txt' : 1,
+ 'git-revert.txt' : 1,
+ 'git-rev-list.txt' : 1,
+ 'git-rev-parse.txt' : 1,
+ 'git-rm.txt' : 1,
+ 'git-send-email.txt' : 1,
+ 'git-send-pack.txt' : 1,
+ 'git-shell.txt' : 1,
+ 'git-sh-i18n--envsubst.txt' : 1,
+ 'git-sh-i18n.txt' : 1,
+ 'git-shortlog.txt' : 1,
+ 'git-show-branch.txt' : 1,
+ 'git-show-index.txt' : 1,
+ 'git-show-ref.txt' : 1,
+ 'git-show.txt' : 1,
+ 'git-sh-setup.txt' : 1,
+ 'git-sparse-checkout.txt' : 1,
+ 'git-stage.txt' : 1,
+ 'git-stash.txt' : 1,
+ 'git-status.txt' : 1,
+ 'git-stripspace.txt' : 1,
+ 'git-submodule.txt' : 1,
+ 'git-svn.txt' : 1,
+ 'git-switch.txt' : 1,
+ 'git-symbolic-ref.txt' : 1,
+ 'git-tag.txt' : 1,
+ 'git-unpack-file.txt' : 1,
+ 'git-unpack-objects.txt' : 1,
+ 'git-update-index.txt' : 1,
+ 'git-update-ref.txt' : 1,
+ 'git-update-server-info.txt' : 1,
+ 'git-upload-archive.txt' : 1,
+ 'git-upload-pack.txt' : 1,
+ 'git-var.txt' : 1,
+ 'git-verify-commit.txt' : 1,
+ 'git-verify-pack.txt' : 1,
+ 'git-verify-tag.txt' : 1,
+ 'git-version.txt' : 1,
+ 'git-web--browse.txt' : 1,
+ 'git-whatchanged.txt' : 1,
+ 'git-worktree.txt' : 1,
+ 'git-write-tree.txt' : 1,
+ 'git.txt' : 1,
+ 'gitk.txt' : 1,
+ 'gitweb.txt' : 1,
+ 'scalar.txt' : 1,
+
+ # Category 5.
+ 'gitattributes.txt' : 5,
+ 'gitformat-bundle.txt' : 5,
+ 'gitformat-chunk.txt' : 5,
+ 'gitformat-commit-graph.txt' : 5,
+ 'gitformat-index.txt' : 5,
+ 'gitformat-pack.txt' : 5,
+ 'gitformat-signature.txt' : 5,
+ 'githooks.txt' : 5,
+ 'gitignore.txt' : 5,
+ 'gitmailmap.txt' : 5,
+ 'gitmodules.txt' : 5,
+ 'gitprotocol-capabilities.txt' : 5,
+ 'gitprotocol-common.txt' : 5,
+ 'gitprotocol-http.txt' : 5,
+ 'gitprotocol-pack.txt' : 5,
+ 'gitprotocol-v2.txt' : 5,
+ 'gitrepository-layout.txt' : 5,
+ 'gitweb.conf.txt' : 5,
+
+ # Category 7.
+ 'gitcli.txt' : 7,
+ 'gitcore-tutorial.txt' : 7,
+ 'gitcredentials.txt' : 7,
+ 'gitcvs-migration.txt' : 7,
+ 'gitdiffcore.txt' : 7,
+ 'giteveryday.txt' : 7,
+ 'gitfaq.txt' : 7,
+ 'gitglossary.txt' : 7,
+ 'gitpacking.txt' : 7,
+ 'gitnamespaces.txt' : 7,
+ 'gitremote-helpers.txt' : 7,
+ 'gitrevisions.txt' : 7,
+ 'gitsubmodules.txt' : 7,
+ 'gittutorial-2.txt' : 7,
+ 'gittutorial.txt' : 7,
+ 'gitworkflows.txt' : 7,
+}
+
+docs_backend = get_option('docs_backend')
+if docs_backend == 'auto'
+ if find_program('asciidoc', required: false).found()
+ docs_backend = 'asciidoc'
+ elif find_program('asciidoctor', required: false).found()
+ docs_backend = 'asciidoctor'
+ else
+ error('Neither asciidoc nor asciidoctor were found.')
+ endif
+endif
+
+if docs_backend == 'asciidoc'
+ asciidoc = find_program('asciidoc', required: true)
+ asciidoc_html = 'xhtml11'
+ asciidoc_docbook = 'docbook'
+ xmlto_extra = [ ]
+
+ asciidoc_conf = custom_target(
+ command: [
+ shell,
+ meson.project_source_root() / 'GIT-VERSION-GEN',
+ meson.project_source_root(),
+ '@INPUT@',
+ '@OUTPUT@',
+ ],
+ input: 'asciidoc.conf.in',
+ output: 'asciidoc.conf',
+ depends: [git_version_file],
+ env: version_gen_environment,
+ )
+
+ asciidoc_common_options = [
+ asciidoc,
+ '--conf-file=' + asciidoc_conf.full_path(),
+ '--attribute=build_dir=' + meson.current_build_dir(),
+ ]
+
+ documentation_deps = [
+ asciidoc_conf,
+ ]
+elif docs_backend == 'asciidoctor'
+ asciidoctor = find_program('asciidoctor', required: true)
+ asciidoc_html = 'xhtml5'
+ asciidoc_docbook = 'docbook5'
+ xmlto_extra = [
+ '--skip-validation',
+ '-x', meson.current_source_dir() / 'manpage.xsl',
+ ]
+
+ asciidoctor_extensions = custom_target(
+ command: [
+ shell,
+ meson.project_source_root() / 'GIT-VERSION-GEN',
+ meson.project_source_root(),
+ '@INPUT@',
+ '@OUTPUT@',
+ ],
+ input: 'asciidoctor-extensions.rb.in',
+ output: 'asciidoctor-extensions.rb',
+ depends: [git_version_file],
+ env: version_gen_environment,
+ )
+
+ asciidoc_common_options = [
+ asciidoctor,
+ '--attribute', 'compat-mode',
+ '--attribute', 'tabsize=8',
+ '--attribute', 'litdd=&#x2d;&#x2d;',
+ '--attribute', 'docinfo=shared',
+ '--attribute', 'build_dir=' + meson.current_build_dir(),
+ '--load-path', meson.current_build_dir(),
+ '--require', 'asciidoctor-extensions',
+ ]
+
+ documentation_deps = [
+ asciidoctor_extensions,
+ ]
+endif
+
+git = find_program('git', required: false)
+xmlto = find_program('xmlto')
+
+cmd_lists = [
+ 'cmds-ancillaryinterrogators.txt',
+ 'cmds-ancillarymanipulators.txt',
+ 'cmds-mainporcelain.txt',
+ 'cmds-plumbinginterrogators.txt',
+ 'cmds-plumbingmanipulators.txt',
+ 'cmds-synchingrepositories.txt',
+ 'cmds-synchelpers.txt',
+ 'cmds-guide.txt',
+ 'cmds-developerinterfaces.txt',
+ 'cmds-userinterfaces.txt',
+ 'cmds-purehelpers.txt',
+ 'cmds-foreignscminterface.txt',
+]
+
+documentation_deps += custom_target(
+ command: [
+ perl,
+ '@INPUT@',
+ meson.project_source_root(),
+ meson.current_build_dir(),
+ ] + cmd_lists,
+ input: 'cmd-list.perl',
+ output: cmd_lists
+)
+
+foreach mode : [ 'diff', 'merge' ]
+ documentation_deps += custom_target(
+ command: [
+ shell,
+ '@INPUT@',
+ '..',
+ mode,
+ '@OUTPUT@'
+ ],
+ env: [
+ 'MERGE_TOOLS_DIR=' + meson.project_source_root() / 'mergetools',
+ ],
+ input: 'generate-mergetool-list.sh',
+ output: 'mergetools-' + mode + '.txt',
+ )
+endforeach
+
+foreach manpage, category : manpages
+ if get_option('docs').contains('man')
+ manpage_xml_target = custom_target(
+ command: asciidoc_common_options + [
+ '--backend=' + asciidoc_docbook,
+ '--doctype=manpage',
+ '--out-file=@OUTPUT@',
+ '@INPUT@',
+ ],
+ depends: documentation_deps,
+ input: manpage,
+ output: fs.stem(manpage) + '.xml',
+ )
+
+ manpage_path = fs.stem(manpage) + '.' + category.to_string()
+ manpage_target = custom_target(
+ command: [
+ xmlto,
+ '-m', '@INPUT0@',
+ '-m', '@INPUT1@',
+ '--stringparam',
+ 'man.base.url.for.relative.links=' + get_option('prefix') / get_option('mandir'),
+ 'man',
+ manpage_xml_target,
+ '-o',
+ meson.current_build_dir(),
+ ] + xmlto_extra,
+ input: [
+ 'manpage-normal.xsl',
+ 'manpage-bold-literal.xsl',
+ ],
+ output: manpage_path,
+ install: true,
+ install_dir: get_option('mandir') / 'man' + category.to_string(),
+ )
+ endif
+
+ if get_option('docs').contains('html')
+ custom_target(
+ command: asciidoc_common_options + [
+ '--backend=' + asciidoc_html,
+ '--doctype=manpage',
+ '--out-file=@OUTPUT@',
+ '@INPUT@',
+ ],
+ depends: documentation_deps,
+ input: manpage,
+ output: fs.stem(manpage) + '.html',
+ install: true,
+ install_dir: get_option('datadir') / 'doc/git-doc',
+ )
+ endif
+endforeach
+
+if get_option('docs').contains('html')
+ configure_file(
+ input: 'docinfo-html.in',
+ output: 'docinfo.html',
+ copy: true,
+ install: true,
+ install_dir: get_option('datadir') / 'doc/git-doc',
+ )
+
+ configure_file(
+ input: 'docbook-xsl.css',
+ output: 'docbook-xsl.css',
+ copy: true,
+ install: true,
+ install_dir: get_option('datadir') / 'doc/git-doc',
+ )
+
+ install_symlink('index.html',
+ install_dir: get_option('datadir') / 'doc/git-doc',
+ pointing_to: 'git.html',
+ )
+
+ xsltproc = find_program('xsltproc')
+
+ user_manual_xml = custom_target(
+ command: asciidoc_common_options + [
+ '--backend=' + asciidoc_docbook,
+ '--doctype=book',
+ '--out-file=@OUTPUT@',
+ '@INPUT@',
+ ],
+ input: 'user-manual.txt',
+ output: 'user-manual.xml',
+ depends: documentation_deps,
+ )
+
+ custom_target(
+ command: [
+ xsltproc,
+ '--xinclude',
+ '--stringparam', 'html.stylesheet', 'docbook-xsl.css',
+ '--param', 'generate.consistent.ids', '1',
+ '--output', '@OUTPUT@',
+ '@INPUT@',
+ user_manual_xml,
+ ],
+ input: 'docbook.xsl',
+ output: 'user-manual.html',
+ install: true,
+ install_dir: get_option('datadir') / 'doc/git-doc',
+ )
+
+ articles = [
+ 'DecisionMaking.txt',
+ 'MyFirstContribution.txt',
+ 'MyFirstObjectWalk.txt',
+ 'ReviewingGuidelines.txt',
+ 'SubmittingPatches',
+ 'ToolsForGit.txt',
+ 'git-bisect-lk2009.txt',
+ 'git-tools.txt',
+ ]
+
+ foreach article : articles
+ custom_target(
+ command: asciidoc_common_options + [
+ '--backend=' + asciidoc_html,
+ '--out-file=@OUTPUT@',
+ '@INPUT@',
+ ],
+ input: article,
+ output: fs.stem(article) + '.html',
+ depends: documentation_deps,
+ install: true,
+ install_dir: get_option('datadir') / 'doc/git-doc',
+ )
+ endforeach
+
+ asciidoc_html_options = asciidoc_common_options + [
+ '--backend=' + asciidoc_html,
+ '--out-file=@OUTPUT@',
+ '--attribute', 'git-relative-html-prefix=../',
+ '@INPUT@',
+ ]
+
+ subdir('howto')
+ subdir('technical')
+endif
+
+# Sanity check that we are not missing any tests present in 't/'. This check
+# only runs once at configure time and is thus best-effort, only. Furthermore,
+# it only verifies man pages for the sake of simplicity.
+configured_manpages = manpages.keys() + [ 'git-bisect-lk2009.txt', 'git-tools.txt' ]
+actual_manpages = run_command(shell, '-c', 'ls git*.txt scalar.txt',
+ check: true,
+ env: script_environment,
+).stdout().strip().split('\n')
+
+if configured_manpages != actual_manpages
+ missing_manpage = [ ]
+ foreach actual_manpage : actual_manpages
+ if actual_manpage not in configured_manpages
+ missing_manpage += actual_manpage
+ endif
+ endforeach
+ if missing_manpage.length() > 0
+ error('Man page found, but not configured:\n\n - ' + '\n - '.join(missing_manpage))
+ endif
+
+ superfluous_manpage = [ ]
+ foreach configured_manpage : configured_manpages
+ if configured_manpage not in actual_manpages
+ superfluous_manpage += configured_manpage
+ endif
+ endforeach
+ if superfluous_manpage.length() > 0
+ error('Man page configured, but not found:\n\n - ' + '\n - '.join(superfluous_manpage))
+ endif
+endif
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 00ccf68744..459e5a02f5 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -412,7 +412,8 @@ Default mode::
--ancestry-path[=<commit>]::
When given a range of commits to display (e.g. 'commit1..commit2'
- or 'commit2 {caret}commit1'), only display commits in that range
+ or 'commit2 {caret}commit1'), and a commit <commit> in that range,
+ only display commits in that range
that are ancestors of <commit>, descendants of <commit>, or
<commit> itself. If no commit is specified, use 'commit1' (the
excluded part of the range) as <commit>. Can be passed multiple
diff --git a/Documentation/signoff-option.txt b/Documentation/signoff-option.txt
index d98758f3cb..cddfb225d1 100644
--- a/Documentation/signoff-option.txt
+++ b/Documentation/signoff-option.txt
@@ -1,8 +1,8 @@
ifdef::git-commit[]
--s::
+`-s`::
endif::git-commit[]
---signoff::
---no-signoff::
+`--signoff`::
+`--no-signoff`::
Add a `Signed-off-by` trailer by the committer at the end of the commit
log message. The meaning of a signoff depends on the project
to which you're committing. For example, it may certify that
@@ -14,5 +14,5 @@ endif::git-commit[]
leadership of the project to which you're contributing to
understand how the signoffs are used in that project.
+
-The --no-signoff option can be used to countermand an earlier --signoff
+The `--no-signoff` option can be used to countermand an earlier `--signoff`
option on the command line.
diff --git a/Documentation/technical/api-index.sh b/Documentation/technical/api-index.sh
index 9c3f4131b8..2964885574 100755
--- a/Documentation/technical/api-index.sh
+++ b/Documentation/technical/api-index.sh
@@ -1,6 +1,17 @@
#!/bin/sh
+if test $# -ne 2
+then
+ echo >&2 "USAGE: $0 <SOURCE_DIR> <OUTPUT>"
+ exit 1
+fi
+
+SOURCE_DIR="$1"
+OUTPUT="$2"
+
(
+ cd "$SOURCE_DIR"
+
c=////////////////////////////////////////////////////////////////
skel=api-index-skel.txt
sed -e '/^\/\/ table of contents begin/q' "$skel"
@@ -18,11 +29,11 @@
done
echo "$c"
sed -n -e '/^\/\/ table of contents end/,$p' "$skel"
-) >api-index.txt+
+) >"$OUTPUT"+
-if test -f api-index.txt && cmp api-index.txt api-index.txt+ >/dev/null
+if test -f "$OUTPUT" && cmp "$OUTPUT" "$OUTPUT"+ >/dev/null
then
- rm -f api-index.txt+
+ rm -f "$OUTPUT"+
else
- mv api-index.txt+ api-index.txt
+ mv "$OUTPUT"+ "$OUTPUT"
fi
diff --git a/Documentation/technical/build-systems.txt b/Documentation/technical/build-systems.txt
new file mode 100644
index 0000000000..d9dafb407c
--- /dev/null
+++ b/Documentation/technical/build-systems.txt
@@ -0,0 +1,224 @@
+= Build Systems
+
+The build system is the primary way for both developers and system integrators
+to interact with the Git project. As such, being easy to use and extend for
+those who are not directly developing Git itself is just as important as other
+requirements we have on any potential build system.
+
+This document outlines the different requirements that we have for the build
+system and then compares available build systems using these criteria.
+
+== Requirements
+
+The following subsections present a list of requirements that we have for any
+potential build system. Sections are sorted by decreasing priority.
+
+=== Platform support
+
+The build system must have support for all of our platforms that we continually
+test against as outlined by our platform support policy. These platforms are:
+
+ - Linux
+ - Windows
+ - macOS
+
+Furthermore, the build system should have support for the following platforms
+that generally have somebody running test pipelines against regularly:
+
+ - AIX
+ - FreeBSD
+ - NetBSD
+ - NonStop
+ - OpenBSD
+
+The platforms which must be supported by the tool should be aligned with our
+[platform support policy](platform-support.txt).
+
+=== Auto-detection of supported features
+
+The build system must support auto-detection of features which are or aren't
+available on the current platform. Platform maintainers should not be required
+to manually configure the complete build.
+
+Auto-detection of the following items is considered to be important:
+
+ - Check for the existence of headers.
+ - Check for the existence of libraries.
+ - Check for the existence of exectuables.
+ - Check for the runtime behavior of specific functions.
+ - Check for specific link order requirements when multiple libraries are
+ involved.
+
+=== Ease of use
+
+The build system should be both easy to use and easy to extend. While this is
+naturally a subjective metric it is likely not controversial to say that some
+build systems are considerably harder to use than others.
+
+=== IDE support
+
+The build system should integrate with well-known IDEs. Well-known IDEs include:
+
+ - Microsoft Visual Studio
+ - Visual Studio Code
+ - Xcode
+
+There are four levels of support:
+
+ - Native integration into the IDE.
+ - Integration into the IDE via a plugin.
+ - Integration into the IDE via generating a project description with the build
+ system.
+ - No integration.
+
+Native integration is preferable, but integration via either a plugin or by
+generating a project description via the build system are considered feasible
+alternatives.
+
+Another important distinction is the level of integration. There are two
+features that one generally wants to have:
+
+ - Integration of build targets.
+ - Automatic setup of features like code completion with detected build
+ dependencies.
+
+The first bullet point is the bare minimum, but is not sufficient to be
+considered proper integration.
+
+=== Out-of-tree builds
+
+The build system should support out-of-tree builds. Out-of-tree builds allow a
+developer to configure multiple different build directories with different
+configuration, e.g. one "debug" build and one "release" build.
+
+=== Cross-platform builds
+
+The build system should support cross-platform builds, e.g. building for arm on
+an x86-64 host.
+
+=== Language support
+
+The following languages and toolchains are of relevance and should be supported
+by the build system:
+
+ - C: the primary compiled language used by Git, must be supported. Relevant
+ toolchains are GCC, Clang and MSVC.
+ - Rust: candidate as a second compiled lanugage, should be supported. Relevant
+ toolchains is the LLVM-based rustc.
+
+Built-in support for the respective languages is preferred over support that
+needs to be wired up manually to avoid unnecessary complexity. Native support
+includes the following features:
+
+ - Compiling objects.
+ - Dependency tracking.
+ - Detection of available features.
+ - Discovery of relevant toolchains.
+ - Linking libraries and executables.
+ - Templating placeholders in scripts.
+
+=== Test integration
+
+It should be possible to integrate tests into the build system such that it is
+possible to build and test Git within the build system. Features which are nice
+to have:
+
+ - Track build-time dependencies for respective tests. Unit tests have
+ different requirements than integration tests.
+ - Allow filtering of which tests to run.
+ - Allow running tests such that utilities like `test_pause` or `debug` work.
+
+== Comparison
+
+The following list of build systems are considered:
+
+- GNU Make
+- autoconf
+- CMake
+- Meson
+
+=== GNU Make
+
+- Platform support: ubitquitous on all platforms, but not well-integrated into Windows.
+- Auto-detection: no built-in support for auto-detection of features.
+- Ease of use: easy to use, but discovering available options is hard. Makefile
+ rules can quickly get out of hand once reaching a certain scope.
+- IDE support: execution of Makefile targets is supported by many IDEs
+- Out-of-tree builds: supported in theory, not wired up in practice.
+- Cross-platform builds: supported in theory, not wired up in practice.
+- Language support:
+ - C: Limited built-in support, many parts need to be wired up manually.
+ - Rust: No built-in support, needs to be wired up manually.
+- Test integration: partially supported, many parts need to be wired up
+ manually.
+
+=== autoconf
+
+- Platform support: ubiquitous on all platforms, but not well-integrated into Windows.
+- Auto-detection: supported.
+- Ease of use: easy to use, discovering available options is comparatively
+ easy. The autoconf syntax is prohibitively hard to extend though due to its
+ complex set of interacting files and the hard-to-understand M4 language.
+- IDE support: no integration into IDEs at generation time. The generated
+ Makefiles have the same level of support as GNU Make.
+- Out-of-tree builds: supported in theory, not wired up in practice.
+- Cross-platform builds: supported.
+- Language support:
+ - C: Limited built-in support, many parts need to be wired up manually.
+ - Rust: No built-in support, needs to be wired up manually.
+- Test integration: partially supported, many parts need to be wired up
+ manually.
+
+=== CMake
+
+- Platform support: not as extensive as GNU Make or autoconf, but all major
+ platforms are supported.
+ - AIX
+ - Cygwin
+ - FreeBSD
+ - Linux
+ - OpenBSD
+ - Solaris
+ - Windows
+ - macOS
+- Ease of use: easy to use, discovering available options is not always
+ trivial. The scripting language used by CMake is somewhat cumbersome to use,
+ but extending CMake build instructions is doable.
+- IDE support: natively integrated into Microsoft Visual Studio. Can generate
+ project descriptions for Xcode. An extension is available for Visual Studio
+ Code. Many other IDEs have plugins for CMake.
+- Out-of-tree builds: supported.
+- Cross-platform builds: supported.
+- Language support:
+ - C: Supported for GCC, Clang, MSVC and other toolchains.
+ - Rust: No built-in support, needs to be wired up manually.
+- Test integration: supported, even though test dependencies are a bit
+ cumbersome to use via "test fixtures". Interactive test runs are not
+ supported.
+
+=== Meson
+
+- Platform: not as extensive as GNU Make or autoconf, but all major platforms
+ and some smaller ones are supported.
+ - AIX
+ - Cygwin
+ - DragonflyBSD
+ - FreeBSD
+ - Haiku
+ - Linux
+ - NetBSD
+ - OpenBSD
+ - Solaris
+ - Windows
+ - macOS
+- Ease of use: easy to use, discovering available options is easy. The
+ scripting language is straight-forward to use.
+- IDE support: Supports generating build instructions for Xcode and Microsoft
+ Visual Studio, a plugin exists for Visual Studio Code.
+- Out-of-tree builds: supported.
+- Cross-platform builds: supported.
+- Language support:
+ - C: Supported for GCC, Clang, MSVC and other toolchains.
+ - Rust: Supported for rustc.
+- Test integration: supported. Interactive tests are supported starting with
+ Meson 1.5.0 via the `--interactive` flag.
diff --git a/Documentation/technical/meson.build b/Documentation/technical/meson.build
new file mode 100644
index 0000000000..3a65ee59b3
--- /dev/null
+++ b/Documentation/technical/meson.build
@@ -0,0 +1,67 @@
+api_docs = [
+ 'api-error-handling.txt',
+ 'api-merge.txt',
+ 'api-parse-options.txt',
+ 'api-simple-ipc.txt',
+ 'api-trace2.txt',
+]
+
+articles = [
+ 'bitmap-format.txt',
+ 'build-systems.txt',
+ 'bundle-uri.txt',
+ 'commit-graph.txt',
+ 'directory-rename-detection.txt',
+ 'hash-function-transition.txt',
+ 'long-running-process-protocol.txt',
+ 'multi-pack-index.txt',
+ 'packfile-uri.txt',
+ 'pack-heuristics.txt',
+ 'parallel-checkout.txt',
+ 'partial-clone.txt',
+ 'platform-support.txt',
+ 'racy-git.txt',
+ 'reftable.txt',
+ 'remembering-renames.txt',
+ 'repository-version.txt',
+ 'rerere.txt',
+ 'scalar.txt',
+ 'send-pack-pipeline.txt',
+ 'shallow.txt',
+ 'sparse-checkout.txt',
+ 'sparse-index.txt',
+ 'trivial-merge.txt',
+ 'unit-tests.txt',
+]
+
+api_index = custom_target(
+ command: [
+ shell,
+ meson.current_source_dir() / 'api-index.sh',
+ meson.current_source_dir(),
+ '@OUTPUT@',
+ ],
+ env: script_environment,
+ input: api_docs,
+ output: 'api-index.txt',
+)
+
+custom_target(
+ command: asciidoc_html_options,
+ input: api_index,
+ output: 'api-index.html',
+ depends: documentation_deps,
+ install: true,
+ install_dir: get_option('datadir') / 'doc/git-doc/technical',
+)
+
+foreach article : api_docs + articles
+ custom_target(
+ command: asciidoc_html_options,
+ input: article,
+ output: fs.stem(article) + '.html',
+ depends: documentation_deps,
+ install: true,
+ install_dir: get_option('datadir') / 'doc/git-doc/technical',
+ )
+endforeach
diff --git a/Documentation/user-manual.conf b/Documentation/user-manual.conf
deleted file mode 100644
index 0148f126dc..0000000000
--- a/Documentation/user-manual.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-[titles]
- underlines="__","==","--","~~","^^"
-
-[attributes]
-caret=^
-startsb=&#91;
-endsb=&#93;
-tilde=&#126;
-
-[linkgit-inlinemacro]
-<ulink url="{target}.html">{target}{0?({0})}</ulink>