summaryrefslogtreecommitdiff
path: root/Documentation/config.adoc
AgeCommit message (Collapse)AuthorFilesLines
2026-08-11Merge branch 'kh/doc-replay-config'Junio C Hamano1-0/+2
Documentation for 'git replay' has been updated to refer to its configuration variables. * kh/doc-replay-config: doc: replay: move “default” to the right-hand side doc: replay: use a nested description list doc: replay: improve config description doc: link to config for git-replay(1)
2026-07-30doc: link to config for git-replay(1)Kristoffer Haugsbakk1-0/+2
This config doc was added in 336ac90c (replay: add replay.refAction config option, 2025-11-06) but never included anywhere. Include it in git-replay(1) and git-config(1). Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-07-10config: add "worktree" and "worktree/i" includeIf conditionsChen Linxuan1-0/+53
The includeIf mechanism already supports matching on the .git directory path (gitdir) and the currently checked out branch (onbranch). But in multi-worktree setups the .git directory of a linked worktree points into the main repository's .git/worktrees/ area, which makes gitdir patterns cumbersome when one wants to include config based on the working tree's checkout path instead. Introduce two new condition keywords: - worktree:<pattern> matches the realpath of the current worktree's working directory (i.e. repo_get_work_tree()) against a glob pattern. This is the path returned by git rev-parse --show-toplevel. - worktree/i:<pattern> is the case-insensitive variant. The implementation reuses the include_by_path() helper introduced in the previous commit, passing the worktree path in place of the gitdir. The condition never matches in bare repositories (where there is no worktree) or during early config reading (where no repository is available). Add documentation describing the new conditions, including a comparison with extensions.worktreeConfig and a note that worktree matching currently uses the realpath-resolved worktree location. Add tests covering bare repositories, multiple worktrees, realpath-resolved symlinked worktree paths, case-sensitive and case-insensitive matching, early config reading, and non-repository scenarios. Signed-off-by: Chen Linxuan <me@black-desk.cn> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17Merge branch 'ta/doc-config-adoc-fixes'Junio C Hamano1-1/+3
Various AsciiDoc markup fixes in 'git config' documentation and related files to ensure lists and formatting are rendered correctly. * ta/doc-config-adoc-fixes: doc: git-config: escape erroneous highlight markup doc: config/sideband: fix description list delimiter doc: config: terminate runaway lists
2026-06-11doc: config: terminate runaway listsTuomas Ahola1-1/+3
There are many places in git-config(1) where paragraphs that should logically come after a list are instead appended to the last item of the list. This is a well-documented quirk of AsciiDoc, and can be mitigated by enclosing the list in an open block: -- * first item * last item -- + New paragraph after the list. Fix the issue accordingly. Signed-off-by: Tuomas Ahola <taahol@utu.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-05-22doc: config: include existing git-hook(1) sectionKristoffer Haugsbakk1-0/+2
It is already included in git-hook(1) but missing from git-config(1). Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-03-06sideband: introduce an "escape hatch" to allow control charactersJohannes Schindelin1-0/+2
The preceding commit fixed the vulnerability whereas sideband messages (that are under the control of the remote server) could contain ANSI escape sequences that would be sent to the terminal verbatim. However, this fix may not be desirable under all circumstances, e.g. when remote servers deliberately add coloring to their messages to increase their urgency. To help with those use cases, give users a way to opt-out of the protections: `sideband.allowControlCharacters`. Suggested-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-14Merge branch 'jc/optional-path'Junio C Hamano1-1/+3
Configuration variables that take a pathname as a value (e.g. blame.ignorerevsfile) can be marked as optional by prefixing ":(optoinal)" before its value. * jc/optional-path: parseopt: values of pathname type can be prefixed with :(optional) config: values of pathname type can be prefixed with :(optional) t7500: fix GIT_EDITOR shell snippet t7500: make each piece more independent
2025-10-07config: values of pathname type can be prefixed with :(optional)Junio C Hamano1-1/+3
Sometimes people want to specify additional configuration data as "best effort" basis. Maybe commit.template configuration file points at somewhere in ~/template/ but on a particular system, the file may not exist and the user may be OK without using the template in such a case. When the value given to a configuration variable whose type is pathname wants to signal such an optional file, it can be marked by prepending ":(optional)" in front of it. Such a setting that is marked optional would avoid getting the command barf for a missing file, as an optional configuration setting that names a missing file is not even seen. cf. <xmqq5ywehb69.fsf@gitster.g> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-18Merge branch 'jc/doc-includeif-hasconfig-remote-url-fix'Junio C Hamano1-5/+4
Doc mark-up fix. * jc/doc-includeif-hasconfig-remote-url-fix: config: document includeIf conditions consistently
2025-02-14Merge branch 'bc/doc-adoc-not-txt'Junio C Hamano1-0/+559
All the documentation .txt files have been renamed to .adoc to help content aware editors. * bc/doc-adoc-not-txt: Remove obsolete ".txt" extensions for AsciiDoc files doc: use .adoc extension for AsciiDoc files gitattributes: mark AsciiDoc files as LF-only editorconfig: add .adoc extension doc: update gitignore for .adoc extension
2025-01-21doc: use .adoc extension for AsciiDoc filesbrian m. carlson1-0/+557
We presently use the ".txt" extension for our AsciiDoc files. While not wrong, most editors do not associate this extension with AsciiDoc, meaning that contributors don't get automatic editor functionality that could be useful, such as syntax highlighting and prose linting. It is much more common to use the ".adoc" extension for AsciiDoc files, since this helps editors automatically detect files and also allows various forges to provide rich (HTML-like) rendering. Let's do that here, renaming all of the files and updating the includes where relevant. Adjust the various build scripts and makefiles to use the new extension as well. Note that this should not result in any user-visible changes to the documentation. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>