Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refs.h: make all flags arguments unsigned #1210

Closed
wants to merge 188 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
279e008
t7400-submodule-basic: modernize inspect() helper
nasamuffin Oct 14, 2021
2660789
fsmonitor: enhance existing comments
jeffhostetler Oct 13, 2021
656efc5
fsmonitor-ipc: create client routines for git-fsmonitor--daemon
jeffhostetler Oct 13, 2021
d5a8573
fsmonitor: config settings are repository-specific
jeffhostetler Oct 13, 2021
101fd33
fsmonitor: use IPC to query the builtin FSMonitor daemon
jeffhostetler Oct 13, 2021
15a30a3
fsmonitor: document builtin fsmonitor
jeffhostetler Oct 21, 2021
8142440
fsmonitor--daemon: add a built-in fsmonitor daemon
jeffhostetler Oct 21, 2021
7c49474
fsmonitor--daemon: implement 'stop' and 'status' commands
jeffhostetler Oct 21, 2021
2411a88
compat/fsmonitor/fsm-listen-win32: stub in backend for Windows
jeffhostetler Oct 21, 2021
12f8d45
compat/fsmonitor/fsm-listen-darwin: stub in backend for Darwin
jeffhostetler Oct 21, 2021
884ae3f
fsmonitor--daemon: implement 'run' command
jeffhostetler Oct 21, 2021
44be368
fsmonitor--daemon: implement 'start' command
jeffhostetler Oct 21, 2021
6ced6e2
fsmonitor--daemon: add pathname classification
jeffhostetler Oct 21, 2021
492a65b
fsmonitor--daemon: define token-ids
jeffhostetler Oct 21, 2021
eac8ea8
fsmonitor--daemon: create token-based changed path cache
jeffhostetler Oct 21, 2021
b73aeb6
compat/fsmonitor/fsm-listen-win32: implement FSMonitor backend on Win…
jeffhostetler Oct 21, 2021
f5dc5dd
compat/fsmonitor/fsm-listen-darwin: add macos header files for FSEvent
jeffhostetler Oct 21, 2021
cd5beb2
compat/fsmonitor/fsm-listen-darwin: implement FSEvent listener on MacOS
jeffhostetler Oct 21, 2021
9623fe9
fsmonitor--daemon: implement handle_client callback
jeffhostetler Oct 21, 2021
cd6d50b
help: include fsmonitor--daemon feature flag in version info
jeffhostetler Oct 21, 2021
866d64c
t/helper/fsmonitor-client: create IPC client to talk to FSMonitor Daemon
jeffhostetler Oct 21, 2021
2136985
t7527: create test for fsmonitor--daemon
jeffhostetler Oct 21, 2021
c8c2657
t/perf: avoid copying builtin fsmonitor files into test repo
jeffhostetler Oct 21, 2021
81cc7cd
t/helper/test-chmtime: skip directories on Windows
jeffhostetler Oct 21, 2021
ebc550a
t/perf/p7519: speed up test on Windows
jeffhostetler Oct 21, 2021
07fecc7
t/perf/p7519: add fsmonitor--daemon test cases
jeffhostetler Oct 21, 2021
8e16a9c
fsmonitor--daemon: periodically truncate list of modified files
jeffhostetler Oct 21, 2021
9ab6e3c
fsmonitor--daemon: use a cookie file to sync with file system
jeffhostetler Oct 21, 2021
8b213c4
fsmonitor: force update index after large responses
jeffhostetler Oct 21, 2021
e89980f
t7527: test status with untracked-cache and fsmonitor--daemon
jeffhostetler Oct 21, 2021
e62a7db
introduce submodule.superprojectGitDir record
nasamuffin Nov 17, 2021
3b2a0f3
submodule: record superproject gitdir during absorbgitdirs
nasamuffin Nov 17, 2021
588504b
submodule: record superproject gitdir during 'update'
nasamuffin Nov 17, 2021
2e5b7d4
submodule: use config to find superproject worktree
nasamuffin Nov 17, 2021
e0b9248
terminal: teach save_term to fail when not foreground
carenas Dec 2, 2021
b371c1b
editor: allow for saving/restoring terminal state
gitster Dec 2, 2021
86a3696
fixup! editor: allow for saving/restoring terminal state
carenas Dec 2, 2021
d3ebf1f
fetch-pack: parameterize message containing 'ready' keyword
bagasme Dec 22, 2021
a631cd4
fixup! fetch-pack: parameterize message containing 'ready' keyword
gitster Dec 23, 2021
c58b72f
fixup! t/perf/p7519: speed up test on Windows
gitster Dec 26, 2021
976a6d6
fixup! t7527: create test for fsmonitor--daemon
gitster Dec 26, 2021
a7e6a9c
leak tests: fix a memory leak in "test-progress" helper
avar Dec 28, 2021
31efeb9
progress.c test helper: add missing braces
avar Dec 28, 2021
e9b3e61
progress.c tests: make start/stop commands on stdin
avar Dec 28, 2021
3bd92ed
progress.c tests: test some invalid usage
avar Dec 28, 2021
0dd1448
progress.c: add temporary variable from progress struct
avar Dec 28, 2021
5a4128c
pack-bitmap-write.c: don't return without stop_progress()
avar Dec 28, 2021
af5d71b
*.c: use isatty(0|2), not isatty(STDIN_FILENO|STDERR_FILENO)
avar Dec 28, 2021
d482fbc
sparse-checkout: custom tab completion tests
ldennington Jan 10, 2022
a4143e0
sparse-checkout: custom tab completion
ldennington Jan 10, 2022
a5dea2c
sparse-checkout: limit tab completion to a single level
ldennington Jan 10, 2022
18b01b0
ls-tree: remove commented-out code
avar Jan 13, 2022
6b1796b
ls-tree: add missing braces to "else" arms
avar Jan 13, 2022
9dc969c
ls-tree: use "enum object_type", not {blob,tree,commit}_type
avar Jan 13, 2022
a3385c8
ls-tree: use "size_t", not "int" for "struct strbuf"'s "len"
avar Jan 13, 2022
d5e7af7
ls-tree: optimize naming and handling of "return" in show_tree()
dyrone Jan 13, 2022
45c4575
ls-tree.c: support --object-only option for "git-ls-tree"
dyrone Jan 13, 2022
799b5e1
ls-tree.c: introduce struct "show_tree_data"
dyrone Jan 13, 2022
6601264
cocci: allow padding with `strbuf_addf()`
dyrone Jan 13, 2022
d4c1fd2
ls-tree.c: introduce "--format" option
dyrone Jan 13, 2022
9e21083
clone, submodule: pass partial clone filters to submodules
steadmon Jan 21, 2022
52b5201
grep.h: remove unused "regex_t regexp" from grep_opt
avar Jan 27, 2022
36874cf
log tests: check if grep_config() is called by "log"-like cmds
avar Jan 27, 2022
5b439bc
grep tests: add missing "grep.patternType" config tests
avar Jan 27, 2022
6e58817
built-ins: trust the "prefix" from run_builtin()
avar Jan 27, 2022
1996304
grep.c: don't pass along NULL callback value
avar Jan 27, 2022
3573b8d
grep API: call grep_config() after grep_init()
avar Jan 27, 2022
d2b419d
grep.h: make "grep_opt.pattern_type_option" use its enum
avar Jan 27, 2022
947435d
grep.c: do "if (bool && memchr())" not "if (memchr() && bool)"
avar Jan 27, 2022
0e54b0d
grep: simplify config parsing and option parsing
avar Jan 27, 2022
72dfa29
SQUASH???
gitster Jan 27, 2022
d77c4bb
receive-pack: check if client is alive before completing the push
rjarry Jan 28, 2022
5ba4c12
Documentation: add extensions.worktreeConfig details
derrickstolee Jan 31, 2022
c702a06
worktree: create init_worktree_config()
derrickstolee Jan 31, 2022
43e0ef6
config: add repo_config_set_worktree_gently()
derrickstolee Jan 31, 2022
bc169c7
sparse-checkout: set worktree-config correctly
derrickstolee Jan 31, 2022
2b5fcef
worktree: copy sparse-checkout patterns and config on add
derrickstolee Jan 31, 2022
380e9a3
i18n: factorize more 'incompatible options' messages
jnavila Jan 31, 2022
471920e
SQUASH???
gitster Jan 31, 2022
8196df3
i18n: factorize "invalid value" messages
jnavila Jan 31, 2022
2c45d31
i18n: remove from i18n strings that do not hold translatable parts
jnavila Jan 31, 2022
758e8a2
i18n: fix some misformated placeholders in command synopsis
jnavila Jan 31, 2022
1ed500c
object-file.c: split up declaration of unrelated variables
avar Feb 1, 2022
6d146b4
object-file API: return "void", not "int" from hash_object_file()
avar Feb 1, 2022
94ab7d4
object-file API: add a format_object_header() function
avar Feb 1, 2022
f540dce
object-file API: have write_object_file() take "enum object_type"
avar Feb 1, 2022
4593f34
object-file API: provide a hash_object_file_oideq()
avar Feb 1, 2022
4db518b
object-file API: replace some use of check_object_signature()
avar Feb 1, 2022
1563068
object-file API: have hash_object_file() take "enum object_type"
avar Feb 1, 2022
8ddbcf3
object-file API: replace check_object_signature() with stream_*
avar Feb 1, 2022
799be44
object-file.c: add a literal version of write_object_file_prepare()
avar Feb 1, 2022
54c7ff5
object-file API: pass an enum to read_object_with_reference()
avar Feb 1, 2022
ab7bdda
branch: add --recurse-submodules option for branch creation
chooglen Jan 29, 2022
847e0ed
branch.c: use 'goto cleanup' in setup_tracking() to fix memory leaks
chooglen Jan 29, 2022
52b4a07
Merge branch 'en/remerge-diff' into en/merge-trees
gitster Feb 2, 2022
d53e4dc
merge-tree: rename merge_trees() to trivial_merge_trees()
newren Feb 2, 2022
8b8b776
merge-tree: move logic for existing merge into new function
newren Feb 2, 2022
26634d4
merge-tree: add option parsing and initial shell for real merge function
newren Feb 2, 2022
b22e7bb
merge-tree: implement real merges
newren Feb 2, 2022
de0c743
Introduce a variant of the `warning()` function that takes a `FILE *`
dscho Feb 2, 2022
11c5ce2
diff: allow diff_warn_rename_limit to write somewhere besides stderr
dscho Feb 2, 2022
10b930d
merge-ort: split out a separate display_update_messages() function
newren Feb 2, 2022
e93cb88
merge-ort: allow update messages to be written to different file stream
newren Feb 2, 2022
ea09a08
merge-tree: support including merge messages in output
newren Feb 2, 2022
46d1456
merge-ort: provide a merge_get_conflicted_files() helper function
newren Feb 2, 2022
ed6b436
merge-tree: provide a list of which files have conflicts
newren Feb 2, 2022
c048a4b
merge-tree: provide easy access to `ls-files -u` style info
newren Feb 2, 2022
bf8f5f5
merge-tree: allow `ls-files -u` style info to be NUL terminated
newren Feb 2, 2022
dca8a41
merge-tree: add a --allow-unrelated-histories flag
newren Feb 2, 2022
bc113d9
git-merge-tree.txt: add a section on potentional usage mistakes
newren Feb 2, 2022
1010ec7
Merge branch 'js/test-unset-trace2-parents' into jch
gitster Feb 2, 2022
ed7299c
Merge branch 'pb/pull-rebase-autostash-fix' into jch
gitster Feb 2, 2022
7525c77
Merge branch 'jc/find-header' into jch
gitster Feb 2, 2022
f8e397d
Merge branch 'jh/p4-fix-use-of-process-error-exception' into jch
gitster Feb 2, 2022
5223314
Merge branch 'jh/p4-spawning-external-commands-cleanup' into jch
gitster Feb 2, 2022
6592911
Merge branch 'rs/grep-expr-cleanup' into jch
gitster Feb 2, 2022
e65474e
Merge branch 'rs/apply-symlinks-use-strset' into jch
gitster Feb 2, 2022
232d48e
Merge branch 'jc/qsort-s-alignment-fix' into jch
gitster Feb 2, 2022
348b0e9
Merge branch 'ab/cat-file' into jch
gitster Feb 2, 2022
e9cf89b
Merge branch 'jc/reflog-parse-options' into jch
gitster Feb 2, 2022
c81942a
Merge branch 'ms/update-index-racy' into jch
gitster Feb 2, 2022
103e669
Merge branch 'en/merge-ort-restart-optim-fix' into jch
gitster Feb 2, 2022
c574d3c
Merge branch 'jt/conditional-config-on-remote-url' into jch
gitster Feb 2, 2022
6d58801
Merge branch 'po/readme-mention-contributor-hints' into jch
gitster Feb 2, 2022
66fbae8
Merge branch 'tl/doc-cli-options-first' into jch
gitster Feb 2, 2022
927cbec
Merge branch 'pw/add-p-hunk-split-fix' into jch
gitster Feb 2, 2022
dcfabf6
Merge branch 'gc/fetch-negotiate-only-early-return' into jch
gitster Feb 2, 2022
0df1839
Merge branch 'jc/name-rev-stdin' into jch
gitster Feb 2, 2022
60884e2
Merge branch 'fs/ssh-signing-crlf' into jch
gitster Feb 2, 2022
e67a274
Merge branch 'ab/config-based-hooks-2' into jch
gitster Feb 2, 2022
904138c
Merge branch 'en/plug-leaks-in-merge' into jch
gitster Feb 2, 2022
de7c743
Merge branch 'jt/sparse-checkout-leading-dir-fix' into jch
gitster Feb 2, 2022
479a7a8
Merge branch 'jt/clone-not-quite-empty' into jch
gitster Feb 2, 2022
e115833
Merge branch 'js/sparse-vs-split-index' into jch
gitster Feb 2, 2022
4f331b3
Merge branch 'jc/mem-pool-alignment' into jch
gitster Feb 2, 2022
6dac95a
### match next
gitster Feb 2, 2022
49b5dc4
Merge branch 'bc/clarify-eol-attr' into jch
gitster Feb 2, 2022
1aa4501
Merge branch 'hn/reftable-coverity-fixes' into jch
gitster Feb 2, 2022
0293774
Merge branch 'js/use-builtin-add-i' into jch
gitster Feb 2, 2022
e0634b7
Merge branch 'en/remerge-diff' into jch
gitster Feb 2, 2022
1a5e353
Merge branch 'ab/ambiguous-object-name' into jch
gitster Feb 2, 2022
6d7b464
Merge branch 'bc/csprng-mktemps' into jch
gitster Feb 2, 2022
9b71d5a
Merge branch 'tb/midx-bitmap-corruption-fix' into jch
gitster Feb 2, 2022
a0d1658
Merge branch 'rs/parse-options-lithelp-help' into jch
gitster Feb 2, 2022
cc3e9e1
Merge branch 'ab/auto-detect-zlib-compress2' into jch
gitster Feb 2, 2022
a68f09e
Merge branch 'gh/doc-typos' into jch
gitster Feb 2, 2022
467f1ec
Merge branch 'ab/no-errno-from-resolve-ref-unsafe' into jch
gitster Feb 2, 2022
1c3ffe8
Merge branch 'jc/doc-log-messages' into jch
gitster Feb 2, 2022
f3f4033
Merge branch 'rc/negotiate-only-typofix' into jch
gitster Feb 2, 2022
5b44536
Merge branch 'en/sparse-checkout-leakfix' into jch
gitster Feb 2, 2022
e2a55cc
Merge branch 'en/fetch-negotiation-default-fix' into jch
gitster Feb 2, 2022
5d31f95
Merge branch 'js/diff-filter-negation-fix' into jch
gitster Feb 2, 2022
39b5533
Merge branch 'js/no-more-legacy-stash' into jch
gitster Feb 2, 2022
543fca9
Merge branch 'rj/receive-pack-abort-upon-disconnect' into jch
gitster Feb 2, 2022
0381b35
Merge branch 'tg/fetch-prune-exit-code-fix' into jch
gitster Feb 2, 2022
284a85a
Merge branch 'ds/sparse-checkout-requires-per-worktree-config' into jch
gitster Feb 2, 2022
b829607
Merge branch 'ab/do-not-hide-failures-in-git-dot-pm' into jch
gitster Feb 2, 2022
69a2760
Merge branch 'cb/clear-quarantine-early-on-all-ref-update-errors' int…
gitster Feb 2, 2022
81f7508
Merge branch 'gc/branch-recurse-submodules' into jch
gitster Feb 2, 2022
2169875
Merge branch 'tk/subtree-merge-not-ff-only' into jch
gitster Feb 2, 2022
d8c29e1
Merge branch 'hn/reftable-tests' into jch
gitster Feb 2, 2022
45c2986
Merge branch 'sy/modernize-t-lib-read-tree-m-3way' into jch
gitster Feb 2, 2022
a0a8c70
Merge branch 'jz/patch-id-hunk-header-parsing-fix' into jch
gitster Feb 2, 2022
73b74f6
Merge branch 'sy/diff-usage-typofix' into jch
gitster Feb 2, 2022
b76aa42
Merge branch 'ab/complete-show-all-commands' into jch
gitster Feb 2, 2022
e5af02a
Merge branch 'll/doc-mktree-typofix' into seen
gitster Feb 2, 2022
1016e4d
Merge branch 'en/merge-tree' into seen
gitster Feb 2, 2022
3fbdf05
Merge branch 'cb/save-term-across-editor-invocation' into seen
gitster Feb 2, 2022
03c08d4
Merge branch 'ab/only-single-progress-at-once' into seen
gitster Feb 2, 2022
0273a98
Merge branch 'es/superproject-aware-submodules' into seen
gitster Feb 2, 2022
a90c6eb
Merge branch 'pw/fix-some-issues-in-reset-head' into seen
gitster Feb 2, 2022
958bdbf
Merge branch 'jh/builtin-fsmonitor-part2' (early part) into seen
gitster Feb 2, 2022
13f4467
Merge branch 'bs/forbid-i18n-of-protocol-token-in-fetch-pack' into seen
gitster Feb 2, 2022
d5a6ec1
Merge branch 'jh/builtin-fsmonitor-part2' into seen
gitster Feb 2, 2022
c20613c
Merge branch 'tl/ls-tree-oid-only' into seen
gitster Feb 2, 2022
440b654
Merge branch 'ld/sparse-index-bash-completion' into seen
gitster Feb 2, 2022
97914e8
Merge branch 'jz/rev-list-exclude-first-parent-only' into seen
gitster Feb 2, 2022
3b8eca5
Merge branch 'vd/sparse-clean-etc' into seen
gitster Feb 2, 2022
f7f5460
Merge branch 'en/present-despite-skipped' into seen
gitster Feb 2, 2022
75dbad8
Merge branch 'ps/avoid-unnecessary-hook-invocation-with-packed-refs' …
gitster Feb 2, 2022
de08ace
Merge branch 'ab/grep-patterntype' into seen
gitster Feb 2, 2022
41aef92
Merge branch 'rs/bisect-executable-not-found' into seen
gitster Feb 2, 2022
cd52bb4
Merge branch 'js/apply-partial-clone-filters-recursively' into seen
gitster Feb 2, 2022
61e0226
Merge branch 'js/scalar-global-options' into seen
gitster Feb 2, 2022
77f1140
Merge branch 'ja/i18n-common-messages' into seen
gitster Feb 2, 2022
fde6c44
Merge branch 'ab/object-file-api-updates' into seen
gitster Feb 2, 2022
54dfe8d
refs.h: make all flags arguments unsigned
hanwen Feb 3, 2022
e94a923
Uniformize flag argument naming to `flags` or `unused_flags`
hanwen Feb 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -72,11 +72,13 @@
/git-format-patch
/git-fsck
/git-fsck-objects
/git-fsmonitor--daemon
/git-gc
/git-get-tar-commit-id
/git-grep
/git-hash-object
/git-help
/git-hook
/git-http-backend
/git-http-fetch
/git-http-push
Expand Down
7 changes: 7 additions & 0 deletions Documentation/CodingGuidelines
Expand Up @@ -26,6 +26,13 @@ code. For Git in general, a few rough rules are:
go and fix it up."
Cf. http://lkml.iu.edu/hypermail/linux/kernel/1001.3/01069.html

- Log messages to explain your changes are as important as the
changes themselves. Clearly written code and in-code comments
explain how the code works and what is assumed from the surrounding
context. The log messages explain what the changes wanted to
achieve and why the changes were necessary (more on this in the
accompanying SubmittingPatches document).

Make your code readable and sensible, and don't try to be clever.

As for more concrete guidelines, just imitate the existing code
Expand Down
36 changes: 36 additions & 0 deletions Documentation/SubmittingPatches
Expand Up @@ -110,6 +110,35 @@ run `git diff --check` on your changes before you commit.
[[describe-changes]]
=== Describe your changes well.

The log message that explains your changes is just as important as the
changes themselves. Your code may be clearly written with in-code
comment to sufficiently explain how it works with the surrounding
code, but those who need to fix or enhance your code in the future
will need to know _why_ your code does what it does, for a few
reasons:

. Your code may be doing something differently from what you wanted it
to do. Writing down what you actually wanted to achieve will help
them fix your code and make it do what it should have been doing
(also, you often discover your own bugs yourself, while writing the
log message to summarize the thought behind it).

. Your code may be doing things that were only necessary for your
immediate needs (e.g. "do X to directories" without implementing or
even designing what is to be done on files). Writing down why you
excluded what the code does not do will help guide future developers.
Writing down "we do X to directories, because directories have
characteristic Y" would help them infer "oh, files also have the same
characteristic Y, so perhaps doing X to them would also make sense?".
Saying "we don't do the same X to files, because ..." will help them
decide if the reasoning is sound (in which case they do not waste
time extending your code to cover files), or reason differently (in
which case, they can explain why they extend your code to cover
files, too).

The goal of your log message is to convey the _why_ behind your
change to help future developers.

The first line of the commit message should be a short description (50
characters is the soft limit, see DISCUSSION in linkgit:git-commit[1]),
and should skip the full stop. It is also conventional in most cases to
Expand Down Expand Up @@ -142,6 +171,13 @@ The body should provide a meaningful commit message, which:

. alternate solutions considered but discarded, if any.

[[present-tense]]
The problem statement that describes the status quo is written in the
present tense. Write "The code does X when it is given input Y",
instead of "The code used to do Y when given input X". You do not
have to say "Currently"---the status quo in the problem statement is
about the code _without_ your change, by project convention.

[[imperative-mood]]
Describe your changes in imperative mood, e.g. "make xyzzy do frotz"
instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy
Expand Down
37 changes: 37 additions & 0 deletions Documentation/config.txt
Expand Up @@ -159,6 +159,33 @@ all branches that begin with `foo/`. This is useful if your branches are
organized hierarchically and you would like to apply a configuration to
all the branches in that hierarchy.

`hasconfig:remote.*.url:`::
The data that follows this keyword is taken to
be a pattern with standard globbing wildcards and two
additional ones, `**/` and `/**`, that can match multiple
components. The first time this keyword is seen, the rest of
the config files will be scanned for remote URLs (without
applying any values). If there exists at least one remote URL
that matches this pattern, the include condition is met.
+
Files included by this option (directly or indirectly) are not allowed
to contain remote URLs.
+
Note that unlike other includeIf conditions, resolving this condition
relies on information that is not yet known at the point of reading the
condition. A typical use case is this option being present as a
system-level or global-level config, and the remote URL being in a
local-level config; hence the need to scan ahead when resolving this
condition. In order to avoid the chicken-and-egg problem in which
potentially-included files can affect whether such files are potentially
included, Git breaks the cycle by prohibiting these files from affecting
the resolution of these conditions (thus, prohibiting them from
declaring remote URLs).
+
As for the naming of this keyword, it is for forwards compatibiliy with
a naming scheme that supports more variable-based include conditions,
but currently Git only supports the exact keyword described above.

A few more notes on matching via `gitdir` and `gitdir/i`:

* Symlinks in `$GIT_DIR` are not resolved before matching.
Expand Down Expand Up @@ -226,6 +253,14 @@ Example
; currently checked out
[includeIf "onbranch:foo-branch"]
path = foo.inc

; include only if a remote with the given URL exists (note
; that such a URL may be provided later in a file or in a
; file read after this file is read, as seen in this example)
[includeIf "hasconfig:remote.*.url:https://example.com/**"]
path = foo.inc
[remote "origin"]
url = https://example.com/git
----

Values
Expand Down Expand Up @@ -374,6 +409,8 @@ include::config/diff.txt[]

include::config/difftool.txt[]

include::config/editor.txt[]

include::config/extensions.txt[]

include::config/fastimport.txt[]
Expand Down
6 changes: 3 additions & 3 deletions Documentation/config/add.txt
Expand Up @@ -7,6 +7,6 @@ add.ignore-errors (deprecated)::
variables.

add.interactive.useBuiltin::
[EXPERIMENTAL] Set to `true` to use the experimental built-in
implementation of the interactive version of linkgit:git-add[1]
instead of the Perl script version. Is `false` by default.
Set to `false` to fall back to the original Perl implementation of
the interactive version of linkgit:git-add[1] instead of the built-in
version. Is `true` by default.
3 changes: 3 additions & 0 deletions Documentation/config/advice.txt
Expand Up @@ -116,6 +116,9 @@ advice.*::
submoduleAlternateErrorStrategyDie::
Advice shown when a submodule.alternateErrorStrategy option
configured to "die" causes a fatal error.
submodulesNotUpdated::
Advice shown when a user runs a submodule command that fails
because `git submodule update --init` was not run.
addIgnoredFile::
Advice shown if a user attempts to add an ignored file to
the index.
Expand Down
56 changes: 42 additions & 14 deletions Documentation/config/core.txt
Expand Up @@ -62,22 +62,50 @@ core.protectNTFS::
Defaults to `true` on Windows, and `false` elsewhere.

core.fsmonitor::
If set, the value of this variable is used as a command which
will identify all files that may have changed since the
requested date/time. This information is used to speed up git by
avoiding unnecessary processing of files that have not changed.
See the "fsmonitor-watchman" section of linkgit:githooks[5].
If set, this variable contains the pathname of the "fsmonitor"
hook command.
+
This hook command is used to identify all files that may have changed
since the requested date/time. This information is used to speed up
git by avoiding unnecessary scanning of files that have not changed.
+
See the "fsmonitor-watchman" section of linkgit:githooks[5].
+
Note: The value of this config setting is ignored if the
built-in file system monitor is enabled (see `core.useBuiltinFSMonitor`).

core.fsmonitorHookVersion::
Sets the version of hook that is to be used when calling fsmonitor.
There are currently versions 1 and 2. When this is not set,
version 2 will be tried first and if it fails then version 1
will be tried. Version 1 uses a timestamp as input to determine
which files have changes since that time but some monitors
like watchman have race conditions when used with a timestamp.
Version 2 uses an opaque string so that the monitor can return
something that can be used to determine what files have changed
without race conditions.
Sets the protocol version to be used when invoking the
"fsmonitor" hook.
+
There are currently versions 1 and 2. When this is not set,
version 2 will be tried first and if it fails then version 1
will be tried. Version 1 uses a timestamp as input to determine
which files have changes since that time but some monitors
like Watchman have race conditions when used with a timestamp.
Version 2 uses an opaque string so that the monitor can return
something that can be used to determine what files have changed
without race conditions.
+
Note: The value of this config setting is ignored if the
built-in file system monitor is enabled (see `core.useBuiltinFSMonitor`).

core.useBuiltinFSMonitor::
If set to true, enable the built-in file system monitor
daemon for this working directory (linkgit:git-fsmonitor--daemon[1]).
+
Like hook-based file system monitors, the built-in file system monitor
can speed up Git commands that need to refresh the Git index
(e.g. `git status`) in a working directory with many files. The
built-in monitor eliminates the need to install and maintain an
external third-party tool.
+
The built-in file system monitor is currently available only on a
limited set of supported platforms. Currently, this includes Windows
and MacOS.
+
Note: if this config setting is set to `true`, the values of
`core.fsmonitor` and `core.fsmonitorHookVersion` are ignored.

core.trustctime::
If false, the ctime differences between the index and the
Expand Down
8 changes: 8 additions & 0 deletions Documentation/config/editor.txt
@@ -0,0 +1,8 @@
editor.stty::
A boolean variable that tells git to save and restore its
terminal settings when the editor is invoked, to avoid
being affected by garbled input/output, if it misbehaves.
+
It defaults to 'true' if your editor is "vi" (which is
also the default if there is no `core.editor`), or to
'false' otherwise.
31 changes: 31 additions & 0 deletions Documentation/config/extensions.txt
Expand Up @@ -6,3 +6,34 @@ extensions.objectFormat::
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.

extensions.worktreeConfig::
If enabled, then worktrees will load config settings from the
`$GIT_DIR/config.worktree` file in addition to the
`$GIT_COMMON_DIR/config` file. Note that `$GIT_COMMON_DIR` and
`$GIT_DIR` are the same for the main worktree, while other
worktrees have `$GIT_DIR` equal to
`$GIT_COMMON_DIR/worktrees/<worktree-name>/`. The settings in the
`config.worktree` file will override settings from any other
config files.
+
When enabling `extensions.worktreeConfig`, you must be careful to move
certain values from the common config file to the main worktree's
`config.worktree` file, if present:
+
* `core.worktree` must be moved from `$GIT_COMMON_DIR/config` to
`$GIT_COMMON_DIR/config.worktree`.
* If `core.bare` is true, then it must be moved from `$GIT_COMMON_DIR/config`
to `$GIT_COMMON_DIR/config.worktree`.
+
It may also be beneficial to adjust the locations of `core.sparseCheckout`
and `core.sparseCheckoutCone` depending on your desire for customizable
sparse-checkout settings for each worktree. By default, the `git
sparse-checkout` builtin enables `extensions.worktreeConfig`, assigns
these config values on a per-worktree basis, and uses the
`$GIT_DIR/info/sparse-checkout` file to specify the sparsity for each
worktree independently. See linkgit:git-sparse-checkout[1] for more
details.
+
For historical reasons, `extensions.worktreeConfig` is respected
regardless of the `core.repositoryFormatVersion` setting.
25 changes: 13 additions & 12 deletions Documentation/config/fetch.txt
Expand Up @@ -56,18 +56,19 @@ fetch.output::
OUTPUT in linkgit:git-fetch[1] for detail.

fetch.negotiationAlgorithm::
Control how information about the commits in the local repository is
sent when negotiating the contents of the packfile to be sent by the
server. Set to "skipping" to use an algorithm that skips commits in an
effort to converge faster, but may result in a larger-than-necessary
packfile; or set to "noop" to not send any information at all, which
will almost certainly result in a larger-than-necessary packfile, but
will skip the negotiation step.
The default is "default" which instructs Git to use the default algorithm
that never skips commits (unless the server has acknowledged it or one
of its descendants). If `feature.experimental` is enabled, then this
setting defaults to "skipping".
Unknown values will cause 'git fetch' to error out.
Control how information about the commits in the local repository
is sent when negotiating the contents of the packfile to be sent by
the server. Set to "consecutive" to use an algorithm that walks
over consecutive commits checking each one. Set to "skipping" to
use an algorithm that skips commits in an effort to converge
faster, but may result in a larger-than-necessary packfile; or set
to "noop" to not send any information at all, which will almost
certainly result in a larger-than-necessary packfile, but will skip
the negotiation step. Set to "default" to override settings made
previously and use the default behaviour. The default is normally
"consecutive", but if `feature.experimental` is true, then the
default is "skipping". Unknown values will cause 'git fetch' to
error out.
+
See also the `--negotiate-only` and `--negotiation-tip` options to
linkgit:git-fetch[1].
Expand Down
4 changes: 2 additions & 2 deletions Documentation/config/gpg.txt
Expand Up @@ -37,7 +37,7 @@ gpg.minTrustLevel::
gpg.ssh.defaultKeyCommand::
This command that will be run when user.signingkey is not set and a ssh
signature is requested. On successful exit a valid ssh public key is
expected in the first line of its output. To automatically use the first
expected in the first line of its output. To automatically use the first
available key from your ssh-agent set this to "ssh-add -L".

gpg.ssh.allowedSignersFile::
Expand Down Expand Up @@ -66,7 +66,7 @@ This way only committers with an already valid key can add or change keys in the
+
Since OpensSSH 8.8 this file allows specifying a key lifetime using valid-after &
valid-before options. Git will mark signatures as valid if the signing key was
valid at the time of the signatures creation. This allows users to change a
valid at the time of the signature's creation. This allows users to change a
signing key without invalidating all previously made signatures.
+
Using a SSH CA key with the cert-authority option
Expand Down
7 changes: 0 additions & 7 deletions Documentation/config/stash.txt
@@ -1,10 +1,3 @@
stash.useBuiltin::
Unused configuration variable. Used in Git versions 2.22 to
2.26 as an escape hatch to enable the legacy shellscript
implementation of stash. Now the built-in rewrite of it in C
is always used. Setting this will emit a warning, to alert any
remaining users that setting this now does nothing.

stash.showIncludeUntracked::
If this is set to true, the `git stash show` command will show
the untracked files of a stash entry. Defaults to false. See
Expand Down
49 changes: 38 additions & 11 deletions Documentation/config/submodule.txt
Expand Up @@ -59,18 +59,33 @@ submodule.active::

submodule.recurse::
A boolean indicating if commands should enable the `--recurse-submodules`
option by default.
Applies to all commands that support this option
(`checkout`, `fetch`, `grep`, `pull`, `push`, `read-tree`, `reset`,
`restore` and `switch`) except `clone` and `ls-files`.
option by default. Defaults to false.
+
When set to true, it can be deactivated via the
`--no-recurse-submodules` option. Note that some Git commands
lacking this option may call some of the above commands affected by
`submodule.recurse`; for instance `git remote update` will call
`git fetch` but does not have a `--no-recurse-submodules` option.
For these commands a workaround is to temporarily change the
configuration value by using `git -c submodule.recurse=0`.
+
The following list shows the commands that accept
`--recurse-submodules` and whether they are supported by this
setting.

* `checkout`, `fetch`, `grep`, `pull`, `push`, `read-tree`,
`reset`, `restore` and `switch` are always supported.
* `clone` and `ls-files` are not supported.
* `branch` is supported only if `submodule.propagateBranches` is
enabled

submodule.propagateBranches::
[EXPERIMENTAL] A boolean that enables branching support when
using `--recurse-submodules` or `submodule.recurse=true`.
Enabling this will allow certain commands to accept
`--recurse-submodules` and certain commands that already accept
`--recurse-submodules` will now consider branches.
Defaults to false.
When set to true, it can be deactivated via the
`--no-recurse-submodules` option. Note that some Git commands
lacking this option may call some of the above commands affected by
`submodule.recurse`; for instance `git remote update` will call
`git fetch` but does not have a `--no-recurse-submodules` option.
For these commands a workaround is to temporarily change the
configuration value by using `git -c submodule.recurse=0`.

submodule.fetchJobs::
Specifies how many submodules are fetched/cloned at the same time.
Expand All @@ -91,3 +106,15 @@ submodule.alternateErrorStrategy::
`ignore`, `info`, `die`. Default is `die`. Note that if set to `ignore`
or `info`, and if there is an error with the computed alternate, the
clone proceeds as if no alternate was specified.

submodule.superprojectGitDir::
The relative path from the submodule's gitdir to its superproject's
gitdir. When Git is run in a repository, it usually makes no
difference whether this repository is standalone or a submodule, but if
this configuration variable is present, additional behavior may be
possible, such as "git status" printing additional information about
this submodule's status with respect to its superproject. This config
should only be present in projects which are submodules, but is not
guaranteed to be present in every submodule, so only optional
value-added behavior should be linked to it. It is set automatically
during submodule creation.