aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
AgeCommit message (Collapse)AuthorFilesLines
2023-01-13docs: link generating patch sectionsJohn Cai2-1/+8
Currently, in the git-log documentation, the reference to generating patches does not match the section title. This can make the section "Generating patch text with -p" hard to find, since typically readers of the documentation will copy and paste to search the page. Let's make this more convenient for readers by linking it directly to the section. Since git-log pulls in diff-generate-patch.txt, we can provide a direct link to the section. Otherwise, change the verbiage to match exactly what the section title is, to at least make searching for it an easier task. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-12-11Sync with Git 2.38.2Junio C Hamano1-0/+7
2022-12-11Git 2.38.2v2.38.2Junio C Hamano1-0/+7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-12-09RelNotes: a couple of typofixesJohannes Schindelin1-2/+2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-12-06Git 2.39-rc2v2.39.0-rc2Junio C Hamano1-3/+3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-30Git 2.39-rc1v2.39.0-rc1Junio C Hamano1-0/+4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-30Merge branch 'ps/gnumake-4.4-fix'Junio C Hamano1-2/+10
* ps/gnumake-4.4-fix: Makefile: avoid multiple patterns when recipes generate one file
2022-11-29A bit more before -rc1Junio C Hamano1-0/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-29Merge branch 'ab/doc-synopsis-and-cmd-usage'Junio C Hamano1-1/+1
Doc and message fix. * ab/doc-synopsis-and-cmd-usage: i18n: fix command template placeholder format
2022-11-28Another batch before -rc1Junio C Hamano1-0/+20
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-28Makefile: avoid multiple patterns when recipes generate one filePaul Smith1-2/+10
A GNU make pattern rule with multiple targets has always meant that a single invocation of the recipe will build all the targets. However in older versions of GNU make a recipe that did not really build all the targets would be tolerated. Starting with GNU make 4.4 this behavior is deprecated and pattern rules are expected to generate files to match all the patterns. If not all targets are created then GNU make will not consider any target up to date and will re-run the recipe when it is run again. Modify Documentation/Makefile to split the man page-creating pattern rule into a separate pattern rule for each pattern. Reported-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Paul Smith <psmith@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-27i18n: fix command template placeholder formatJean-Noël Avila1-1/+1
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-23Git 2.39-rc0v2.39.0-rc0Junio C Hamano1-0/+37
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-23Merge branch 'mh/gitcredentials-generate'Junio C Hamano1-3/+5
Doc update. * mh/gitcredentials-generate: Docs: describe how a credential-generating helper works
2022-11-23Merge branch 'ps/receive-use-only-advertised'Junio C Hamano2-0/+14
"git receive-pack" used to use all the local refs as the boundary for checking connectivity of the data "git push" sent, but now it uses only the refs that it advertised to the pusher. In a repository with the .hideRefs configuration, this reduces the resources needed to perform the check. cf. <221028.86bkpw805n.gmgdl@evledraar.gmail.com> cf. <xmqqr0yrizqm.fsf@gitster.g> * ps/receive-use-only-advertised: receive-pack: only use visible refs for connectivity check rev-parse: add `--exclude-hidden=` option revision: add new parameter to exclude hidden refs revision: introduce struct to handle exclusions revision: move together exclusion-related functions refs: get rid of global list of hidden refs refs: fix memory leak when parsing hideRefs config
2022-11-23Merge branch 'jt/submodule-on-demand'Junio C Hamano2-13/+7
Push all submodules recursively with '--recurse-submodules=on-demand'. * jt/submodule-on-demand: Doc: document push.recurseSubmodules=only
2022-11-23Merge branch 'tb/howto-maintain-git-fixes'Junio C Hamano1-2/+7
A pair of bugfixes to the Documentation/howto/maintain-git.txt guide. * tb/howto-maintain-git-fixes: Documentation: build redo-seen.sh from jch..seen Documentation: build redo-jch.sh from master..jch
2022-11-23Merge branch 'rp/maintenance-qol'Junio C Hamano1-7/+7
'git maintenance register' is taught to write configuration to an arbitrary path, and 'git for-each-repo' is taught to expand tilde characters in paths. * rp/maintenance-qol: builtin/gc.c: fix use-after-free in maintenance_unregister() maintenance --unregister: fix uninit'd data use & -Wdeclaration-after-statement maintenance: add option to register in a specific config for-each-repo: interpolate repo path arguments
2022-11-18The thirteenth batchTaylor Blau1-0/+21
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-11-18Merge branch 'en/sparse-checkout-design'Taylor Blau1-0/+1103
Design doc. * en/sparse-checkout-design: sparse-checkout.txt: new document with sparse-checkout directions
2022-11-18Merge branch 'mh/credential-unrecognized-attrs'Taylor Blau2-0/+3
Docfix. * mh/credential-unrecognized-attrs: docs: clarify that credential discards unrecognised attributes
2022-11-18Merge branch 'mh/increase-credential-cache-timeout'Taylor Blau1-2/+2
Update the credential-cache documentation to provide a more realistic example. * mh/increase-credential-cache-timeout: Documentation: increase example cache timeout to 1 hour
2022-11-18Merge branch 'tb/repack-expire-to'Taylor Blau1-0/+6
"git repack" learns to send cruft objects out of the way into packfiles outside the repository. * tb/repack-expire-to: builtin/repack.c: implement `--expire-to` for storing pruned objects builtin/repack.c: write cruft packs to arbitrary locations builtin/repack.c: pass "cruft_expiration" to `write_cruft_pack` builtin/repack.c: pass "out" to `prepare_pack_objects`
2022-11-17rev-parse: add `--exclude-hidden=` optionPatrick Steinhardt1-0/+7
Add a new `--exclude-hidden=` option that is similar to the one we just added to git-rev-list(1). Given a section name `uploadpack` or `receive` as argument, it causes us to exclude all references that would be hidden by the respective `$section.hideRefs` configuration. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-11-17revision: add new parameter to exclude hidden refsPatrick Steinhardt1-0/+7
Users can optionally hide refs from remote users in git-upload-pack(1), git-receive-pack(1) and others via the `transfer.hideRefs`, but there is not an easy way to obtain the list of all visible or hidden refs right now. We'll require just that though for a performance improvement in our connectivity check. Add a new option `--exclude-hidden=` that excludes any hidden refs from the next pseudo-ref like `--all` or `--branches`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-11-14maintenance: add option to register in a specific configRonan Pigott1-7/+7
maintenance register currently records the maintenance repo exclusively within the user's global configuration, but other configuration files may be relevant when running maintenance if they are included from the global config. This option allows the user to choose where maintenance repos are recorded. Signed-off-by: Ronan Pigott <ronan@rjp.ie> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-11-14The twelfth batchTaylor Blau1-0/+11
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-11-14Merge branch 'vh/my-first-contribution-typo'Taylor Blau1-1/+1
Documentation fix. * vh/my-first-contribution-typo: Documentation: fix typo
2022-11-14Merge branch 'ks/partialclone-casing'Taylor Blau1-2/+2
Documentation fix. * ks/partialclone-casing: repository-version.txt: partialClone casing change
2022-11-14Merge branch 'mh/password-can-be-pat'Taylor Blau1-3/+4
Documentation update to git-credential(1). * mh/password-can-be-pat: Documentation/gitcredentials.txt: mention password alternatives
2022-11-14Docs: describe how a credential-generating helper worksM Hickford1-3/+5
Previously the docs only described storage helpers. A concrete example: Git Credential Manager can generate credentials for GitHub and GitLab via OAuth. https://github.com/GitCredentialManager/git-credential-manager Signed-off-by: M Hickford <mirth.hickford@gmail.com> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-11-14Documentation: fix typoVlad-Stefan Harbuz1-1/+1
Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-11-14Doc: document push.recurseSubmodules=onlyJonathan Tan2-13/+7
Git learned pushing submodules without pushing the superproject by the user specifying --recurse-submodules=only through 6c656c3fe4 ("submodules: add RECURSE_SUBMODULES_ONLY value", 2016-12-20) and 225e8bf778 ("push: add option to push only submodules", 2016-12-20). For users who use this feature regularly, it is desirable to have an equivalent configuration. It turns out that such a configuration (push.recurseSubmodules=only) is already supported, even though it is neither documented nor mentioned in the commit messages, due to the way the --recurse-submodules=only feature was implemented (a function used to parse --recurse-submodules was updated to support "only", but that same function is used to parse push.recurseSubmodules too). What is left is to document it and test it, which is what this commit does. There is a possible point of confusion when recursing into a submodule that itself has the push.recurseSubmodules=only configuration, because if a repository has only its submodules pushed and not itself, its superproject can never be pushed. Therefore, treat such configurations as being "on-demand", and print a warning message. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-11-12docs: clarify that credential discards unrecognised attributesM Hickford2-0/+3
It was previously unclear how unrecognised attributes are handled. Signed-off-by: M Hickford <mirth.hickford@gmail.com> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-11-11repository-version.txt: partialClone casing changeKousik Sanagavarapu1-2/+2
Remotes are considered "promisor" if extensions.partialClone and some other configuration variables are set. The casing for this in Documentation/technical/repository-version.txt is not proper and may cause confusion. This change corrects this casing. Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-11-09Documentation: increase example cache timeout to 1 hourM Hickford1-2/+2
Previously, the example *decreased* the cache timeout compared to the default, making it less user friendly. Instead, nudge users to make cache more usable. Many users choose store over cache. https://lore.kernel.org/git/CAGJzqskRYN49SeS8kSEN5-vbB_Jt1QvAV9QhS6zNuKh0u8wxPQ@mail.gmail.com/ The default timeout remains 15 minutes. A stronger nudge would be to increase that. Signed-off-by: M Hickford <mirth.hickford@gmail.com> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-11-08The eleventh batchTaylor Blau1-0/+20
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-11-08Merge branch 'vb/ls-files-docfix'Taylor Blau1-2/+2
Docfix. * vb/ls-files-docfix: ls-files: fix --ignored and --killed flags in synopsis
2022-11-08Merge branch 'po/glossary-around-traversal'Taylor Blau6-12/+35
The glossary entries for "commit-graph file" and "reachability bitmap" have been added. * po/glossary-around-traversal: glossary: add reachability bitmap description glossary: add "commit graph" description doc: use 'object database' not ODB or abbreviation doc: use "commit-graph" hyphenation consistently
2022-11-08Merge branch 'es/mark-gc-cruft-as-experimental'Taylor Blau1-0/+3
Enable gc.cruftpacks by default for those who opt into feature.experimental setting. * es/mark-gc-cruft-as-experimental: config: let feature.experimental imply gc.cruftPacks=true gc: add tests for --cruft and friends
2022-11-08Merge branch 'tb/howto-using-redo-script'Taylor Blau1-1/+1
Doc update. * tb/howto-using-redo-script: Documentation/howto/maintain-git.txt: fix Meta/redo-jch.sh invocation
2022-11-08Documentation/gitcredentials.txt: mention password alternativesM Hickford1-3/+4
Git asks for a "password", but the user might use a personal access token or OAuth access token instead. Example: Password for 'https://AzureDiamond@github.com': Signed-off-by: M Hickford <mirth.hickford@gmail.com> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-11-07ls-files: fix --ignored and --killed flags in synopsisVincent Bernat1-2/+2
Signed-off-by: Vincent Bernat <vincent@bernat.ch> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-11-07sparse-checkout.txt: new document with sparse-checkout directionsElijah Newren1-0/+1103
Once upon a time, Matheus wrote some patches to make git grep [--cached | <REVISION>] ... restrict its output to the sparsity specification when working in a sparse checkout[1]. That effort got derailed by two things: (1) The --sparse-index work just beginning which we wanted to avoid creating conflicts for (2) Never deciding on flag and config names and planned high level behavior for all commands. More recently, Shaoxuan implemented a more limited form of Matheus' patches that only affected --cached, using a different flag name, but also changing the default behavior in line with what Matheus did. This again highlighted the fact that we never decided on command line flag names, config option names, and the big picture path forward. The --sparse-index work has been mostly complete (or at least released into production even if some small edges remain) for quite some time now. We have also had several discussions on flag and config names, though we never came to solid conclusions. Stolee once upon a time suggested putting all these into some document in Documentation/technical[3], which Victoria recently also requested[4]. I'm behind the times, but here's a patch attempting to finally do that. [1] https://lore.kernel.org/git/5f3f7ac77039d41d1692ceae4b0c5df3bb45b74a.1612901326.git.matheus.bernardino@usp.br/ (See his second link in that email in particular) [2] https://lore.kernel.org/git/20220908001854.206789-2-shaoxuan.yuan02@gmail.com/ [3] https://lore.kernel.org/git/CABPp-BHwNoVnooqDFPAsZxBT9aR5Dwk5D9sDRCvYSb8akxAJgA@mail.gmail.com/ (Scroll to the very end for the final few paragraphs) [4] https://lore.kernel.org/git/cafcedba-96a2-cb85-d593-ef47c8c8397c@github.com/ Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-11-03The tenth batchTaylor Blau1-0/+4
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-31Documentation: build redo-seen.sh from jch..seenTaylor Blau1-1/+1
In a similar spirit as the previous commit, the 'seen' branch gets rebuilt by reintegrating topics between 'jch' and the (old) tip of 'seen'. Update the instructions on how to generate Meta/redo-seen.sh for the first time to reflect this. Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-31Documentation: build redo-jch.sh from master..jchTaylor Blau1-1/+6
Rebuilding the 'jch' branch begins by reintegrating any topics between 'master' and 'jch', not 'master' and 'seen'. In the maintainer guide, the documentation isn't quite right, since the initial input to Meta/Reintegrate is "master..seen", not "master..jch". This can lead to confusing results when generating the Meta/redo-jch.sh script for the first time. Additionally, rebuilding 'jch' takes place in two steps. First, running the script up to the first "### match next" cut-line, and then comparing the result with what's on 'next' (i.e. with "git diff jch next"). Then, the remaining set of topics get merged down to 'jch' (which aren't on 'next') by running the entire "redo-jch.sh" script. Clarify the documentation to reflect this. Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-30The ninth batchTaylor Blau1-0/+53
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-30Merge branch 'jc/doc-fsck-msgids'Taylor Blau5-0/+258
Add documentation for message IDs in fsck error messages. * jc/doc-fsck-msgids: Documentation: add lint-fsck-msgids fsck: document msg-id fsck: remove the unused MISSING_TREE_OBJECT fsck: remove the unused BAD_TAG_OBJECT
2022-10-30Merge branch 'en/merge-tree-sequence'Taylor Blau1-8/+68
"git merge-tree --stdin" is a new way to request a series of merges and report the merge results. * en/merge-tree-sequence: merge-tree: support multiple batched merges with --stdin merge-tree: update documentation for differences in -z output
2022-10-30Merge branch 'ds/bundle-uri-3'Taylor Blau2-0/+26
Define the logical elements of a "bundle list", data structure to store them in-core, format to transfer them, and code to parse them. * ds/bundle-uri-3: bundle-uri: suppress stderr from remote-https bundle-uri: quiet failed unbundlings bundle: add flags to verify_bundle() bundle-uri: fetch a list of bundles bundle: properly clear all revision flags bundle-uri: limit recursion depth for bundle lists bundle-uri: parse bundle list in config format bundle-uri: unit test "key=value" parsing bundle-uri: create "key=value" line parsing bundle-uri: create base key-value pair parsing bundle-uri: create bundle_list struct and helpers bundle-uri: use plain string in find_temp_filename()
2022-10-30Merge branch 'jr/embargoed-releases-doc'Taylor Blau1-25/+140
The role the security mailing list plays in an embargoed release has been documented. * jr/embargoed-releases-doc: embargoed releases: also describe the git-security list and the process
2022-10-30Merge branch 'pw/rebase-keep-base-fixes'Taylor Blau1-13/+19
"git rebase --keep-base" used to discard the commits that are already cherry-picked to the upstream, even when "keep-base" meant that the base, on top of which the history is being rebuilt, does not yet include these cherry-picked commits. The --keep-base option now implies --reapply-cherry-picks and --no-fork-point options. * pw/rebase-keep-base-fixes: rebase --keep-base: imply --no-fork-point rebase --keep-base: imply --reapply-cherry-picks rebase: factor out branch_base calculation rebase: rename merge_base to branch_base rebase: store orig_head as a commit rebase: be stricter when reading state files containing oids t3416: set $EDITOR in subshell t3416: tighten two tests
2022-10-30Merge branch 'jh/trace2-timers-and-counters'Taylor Blau1-58/+132
Two new facilities, "timer" and "counter", are introduced to the trace2 API. * jh/trace2-timers-and-counters: trace2: add global counter mechanism trace2: add stopwatch timers trace2: convert ctx.thread_name from strbuf to pointer trace2: improve thread-name documentation in the thread-context trace2: rename the thread_name argument to trace2_thread_start api-trace2.txt: elminate section describing the public trace2 API tr2tls: clarify TLS terminology trace2: use size_t alloc,nr_open_regions in tr2tls_thread_ctx
2022-10-30Merge branch 'tb/shortlog-group'Taylor Blau1-0/+8
"git shortlog" learned to group by the "format" string. * tb/shortlog-group: shortlog: implement `--group=committer` in terms of `--group=<format>` shortlog: implement `--group=author` in terms of `--group=<format>` shortlog: extract `shortlog_finish_setup()` shortlog: support arbitrary commit format `--group`s shortlog: extract `--group` fragment for translation shortlog: make trailer insertion a noop when appropriate shortlog: accept `--date`-related options
2022-10-30Merge branch 'sg/stable-docdep'Taylor Blau1-2/+3
Make sure generated dependency file is stably sorted to help developers debugging their build issues. * sg/stable-docdep: Documentation/build-docdep.perl: generate sorted output
2022-10-30Merge branch 'sd/doc-smtp-encryption'Taylor Blau1-3/+12
* sd/doc-smtp-encryption: docs: git-send-email: difference between ssl and tls smtp-encryption
2022-10-30Merge branch 'jz/patch-id'Taylor Blau1-8/+16
A new "--include-whitespace" option is added to "git patch-id", and existing bugs in the internal patch-id logic that did not match what "git patch-id" produces have been corrected. * jz/patch-id: builtin: patch-id: remove unused diff-tree prefix builtin: patch-id: add --verbatim as a command mode patch-id: fix patch-id for mode changes builtin: patch-id: fix patch-id with binary diffs patch-id: use stable patch-id for rebases patch-id: fix stable patch id for binary / header-only
2022-10-30glossary: add reachability bitmap descriptionPhilip Oakley1-0/+8
Describe the purpose of the reachability bitmap. Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-30glossary: add "commit graph" descriptionPhilip Oakley1-1/+16
Git has an additional "commit graph" capability that supplements the normal commit object's directed acyclic graph (DAG). The supplemental commit graph file is designed for speed of access. Describe the commit graph both from the normative DAG view point and from the commit graph file perspective. Also, clarify the link between the branch ref and branch tip by linking to the `ref` glossary entry, matching this commit graph entry. The commit-graph file is also distinguished by its hyphenation. Subsequent commit catches the few cases where the hyphenation of commit-graph was missing. Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-30doc: use 'object database' not ODB or abbreviationPhilip Oakley4-4/+4
The abbreviation 'ODB' is used in the technical documentation sections for commit-graph and parallel-checkout, along with an 'odb' option in `git-pack-redundant`, without expansion. Use 'object database' in full, in those entries. The text has not been reflowed to keep the changes minimal. While in the glossary for `object` terms, add the common`oid` abbreviation to its entry. Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-30doc: use "commit-graph" hyphenation consistentlyPhilip Oakley3-7/+7
Note, historical release notes have not been updated. Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-28The eighth batchJunio C Hamano1-15/+15
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-28Merge branch 'ab/doc-synopsis-and-cmd-usage'Junio C Hamano32-69/+92
The short-help text shown by "git cmd -h" and the synopsis text shown at the beginning of "git help cmd" have been made more consistent. * ab/doc-synopsis-and-cmd-usage: (34 commits) tests: assert consistent whitespace in -h output tests: start asserting that *.txt SYNOPSIS matches -h output doc txt & -h consistency: make "worktree" consistent worktree: define subcommand -h in terms of command -h reflog doc: list real subcommands up-front doc txt & -h consistency: make "commit" consistent doc txt & -h consistency: make "diff-tree" consistent doc txt & -h consistency: use "[<label>...]" for "zero or more" doc txt & -h consistency: make "annotate" consistent doc txt & -h consistency: make "stash" consistent doc txt & -h consistency: add missing options doc txt & -h consistency: use "git foo" form, not "git-foo" doc txt & -h consistency: make "bundle" consistent doc txt & -h consistency: make "read-tree" consistent doc txt & -h consistency: make "rerere" consistent doc txt & -h consistency: add missing options and labels doc txt & -h consistency: make output order consistent doc txt & -h consistency: add or fix optional "--" syntax doc txt & -h consistency: fix mismatching labels doc SYNOPSIS & -h: use "-" to separate words in labels, not "_" ...
2022-10-27The seventh batchJunio C Hamano1-0/+19
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-27Sync with 'maint'Junio C Hamano1-0/+13
2022-10-27Downmerge a bit more for 2.38.2Junio C Hamano1-0/+13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-27Merge branch 'jc/use-of-uc-in-log-messages' into maint-2.38Junio C Hamano1-1/+3
Clarify that "the sentence after <area>: prefix does not begin with a capital letter" rule applies only to the commit title. * jc/use-of-uc-in-log-messages: SubmittingPatches: use usual capitalization in the log message body
2022-10-27Merge branch 'tb/midx-repack-ignore-cruft-packs' into maint-2.38Junio C Hamano1-3/+4
"git multi-pack-index repack/expire" used to repack unreachable cruft into a new pack, which have been corrected. cf. <63a1c3d4-eff3-af10-4263-058c88e74594@github.com> * tb/midx-repack-ignore-cruft-packs: midx.c: avoid cruft packs with non-zero `repack --batch-size` midx.c: remove unnecessary loop condition midx.c: replace `xcalloc()` with `CALLOC_ARRAY()` midx.c: avoid cruft packs with `repack --batch-size=0` midx.c: prevent `expire` from removing the cruft pack Documentation/git-multi-pack-index.txt: clarify expire behavior Documentation/git-multi-pack-index.txt: fix typo
2022-10-27Merge branch 'so/diff-merges-cleanup' into maint-2.38Junio C Hamano1-3/+3
Code clean-up. * so/diff-merges-cleanup: diff-merges: clarify log.diffMerges documentation diff-merges: cleanup set_diff_merges() diff-merges: cleanup func_by_opt()
2022-10-27Merge branch 'jc/environ-docs' into maint-2.38Junio C Hamano1-16/+27
Documentation on various Boolean GIT_* environment variables have been clarified. * jc/environ-docs: environ: GIT_INDEX_VERSION affects not just a new repository environ: simplify description of GIT_INDEX_FILE environ: GIT_FLUSH should be made a usual Boolean environ: explain Boolean environment variables environ: document GIT_SSL_NO_VERIFY
2022-10-26config: let feature.experimental imply gc.cruftPacks=trueEmily Shaffer1-0/+3
We are interested in exploring whether gc.cruftPacks=true should become the default value. To determine whether it is safe to do so, let's encourage more users to try it out. Users who have set feature.experimental=true have already volunteered to try new and possibly-breaking config changes, so let's try this new default with that set of users. Signed-off-by: Emily Shaffer <emilyshaffer@google.com> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-26Documentation/howto/maintain-git.txt: fix Meta/redo-jch.sh invocationTaylor Blau1-1/+1
The Meta/redo-jch.sh script is generated a few lines earlier by running: $ Meta/Reintegrate master..seen >Meta/redo-jch.sh But the resulting script is not necessarily executable. Later mentions of this script invoke it with sh (instead of directly), but this one is an odd one out. Update the documentation to invoke the Meta/redo-jch.sh script with sh in case the maintainer has not made the script executable. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-26Sync with 'maint'Junio C Hamano2-19/+47
2022-10-25The sixth batchJunio C Hamano1-0/+14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-25Merge branch 'rs/diff-caret-bang-with-parents'Junio C Hamano2-5/+5
"git diff rev^!" did not show combined diff to go to the rev from its parents. * rs/diff-caret-bang-with-parents: diff: support ^! for merges revisions.txt: unspecify order of resolved parts of ^! revision: use strtol_i() for exclude_parent
2022-10-25Downmerge a handful of topics for 2.38.2Junio C Hamano1-0/+47
2022-10-25Merge branch 'nb/doc-mergetool-typofix' into maint-2.38Junio C Hamano1-1/+1
Typofix. * nb/doc-mergetool-typofix: mergetool.txt: typofix 'overwriten' -> 'overwritten'
2022-10-25Merge branch 'ds/bundle-uri-docfix' into maint-2.38Junio C Hamano1-4/+4
Doc formatting fix. * ds/bundle-uri-docfix: bundle-uri: fix technical doc issues
2022-10-25Merge branch 'ab/coding-guidelines-c99' into maint-2.38Junio C Hamano1-10/+25
Update CodingGuidelines to clarify what features to use and avoid in C99. * ab/coding-guidelines-c99: CodingGuidelines: recommend against unportable C99 struct syntax CodingGuidelines: mention C99 features we can't use CodingGuidelines: allow declaring variables in for loops CodingGuidelines: mention dynamic C99 initializer elements CodingGuidelines: update for C99
2022-10-25Documentation: add lint-fsck-msgidsJunio C Hamano2-0/+81
During the initial development of the fsck-msgids.txt feature, it has become apparent that it is very much error prone to make sure the description in the documentation file are sorted and correctly match what is in the fsck.h header file. Add a quick-and-dirty Perl script and doc-lint target to sanity check that the fsck-msgids.txt is consistent with the error type list in the fsck.h header file. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-25fsck: document msg-idJohn Cai3-0/+177
The documentation lacks mention of specific <msg-id> that are supported. While git-help --config will display a list of these options, often developers' first instinct is to consult the git docs to find valid config values. Add a list of fsck error messages, and link to it from the git-fsck documentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-24embargoed releases: also describe the git-security list and the processJulia Ramer1-25/+140
With the recent turnover on the git-security list, questions came up how things are usually run. Rather than answering questions individually, extend Git's existing documentation about security vulnerabilities to describe the git-security mailing list, how things are run on that list, and what to expect throughout the process from the time a security bug is reported all the way to the time when a fix is released. Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Julia Ramer <gitprplr@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-24builtin: patch-id: add --verbatim as a command modeJerry Zhang1-8/+16
There are situations where the user might not want the default setting where patch-id strips all whitespace. They might be working in a language where white space is syntactically important, or they might have CI testing that enforces strict whitespace linting. In these cases, a whitespace change would result in the patch fundamentally changing, and thus deserving of a different id. Add a new mode that is exclusive of --stable and --unstable called --verbatim. It also corresponds to the config patchid.verbatim = true. In this mode, the stable algorithm is used and whitespace is not stripped from the patch text. Users of --unstable mainly care about compatibility with old git versions, which unstripping the whitespace would break. Thus there isn't a usecase for the combination of --verbatim and --unstable, and we don't expose this so as to not add maintainence burden. Signed-off-by: Jerry Zhang <jerry@skydio.com> fixes https://github.com/Skydio/revup/issues/2 Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-24shortlog: support arbitrary commit format `--group`sTaylor Blau1-1/+4
In addition to generating a shortlog based on committer, author, or the identity in one or more specified trailers, it can be useful to generate a shortlog based on an arbitrary commit format. This can be used, for example, to generate a distribution of commit activity over time, like so: $ git shortlog --group='%cd' --date='format:%Y-%m' -s v2.37.0.. 117 2022-06 274 2022-07 324 2022-08 263 2022-09 7 2022-10 Arbitrary commit formats can be used. In fact, `git shortlog`'s default behavior (to count by commit authors) can be emulated as follows: $ git shortlog --group='%aN <%aE>' ... and future patches will make the default behavior (as well as `--committer`, and `--group=trailer:<trailer>`) special cases of the more flexible `--group` option. Note also that the SHORTLOG_GROUP_FORMAT enum value is used only to designate that `--group:<format>` is in use when in stdin mode to declare that the combination is invalid. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-24shortlog: accept `--date`-related optionsJeff King1-0/+5
Prepare for a future patch which will introduce arbitrary pretty formats via the `--group` argument. To allow additional customizability (for example, to support something like `git shortlog -s --group='%aD' --date='format:%Y-%m' ...` (which groups commits by the datestring 'YYYY-mm' according to author date), we must store off the `--date` parsed from calling `parse_revision_opt()`. Note that this also affects custom output `--format` strings in `git shortlog`. Though this is a behavior change, this is arguably fixing a long-standing bug (ie., that `--format` strings are not affected by `--date` specifiers as they should be). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-24builtin/repack.c: implement `--expire-to` for storing pruned objectsTaylor Blau1-0/+6
When pruning objects with `--cruft`, `git repack` offers some flexibility when selecting the set of which objects are pruned via the `--cruft-expiration` option. This is useful for expiring objects which are older than the grace period, making races where to-be-pruned objects become reachable and then ancestors of freshly pushed objects, leaving the repository in a corrupt state after pruning substantially less likely [1]. But in practice, such races are impossible to avoid entirely, no matter how long the grace period is. To prevent this race, it is often advisable to temporarily put a repository into a read-only state. But in practice, this is not always practical, and so some middle ground would be nice. This patch introduces a new option, `--expire-to`, which teaches `git repack` to write an additional cruft pack containing just the objects which were pruned from the repository. The caller can specify a directory outside of the current repository as the destination for this second cruft pack. This makes it possible to prune objects from a repository, while still holding onto a supplemental copy of them outside of the original repository. Having this copy on-disk makes it substantially easier to recover objects when the aforementioned race is encountered. `--expire-to` is implemented in a somewhat convoluted manner, which is to take advantage of the fact that the first time `write_cruft_pack()` is called, it adds the name of the cruft pack to the `names` string list. That means the second time we call `write_cruft_pack()`, objects in the previously-written cruft pack will be excluded. As long as the caller ensures that no objects are expired during the second pass, this is sufficient to generate a cruft pack containing all objects which don't appear in any of the new packs written by `git repack`, including the cruft pack. In other words, all of the objects which are about to be pruned from the repository. It is important to note that the destination in `--expire-to` does not necessarily need to be a Git repository (though it can be) Notably, the expired packs do not contain all ancestors of expired objects. So if the source repository contains something like: <unreachable> / C1 --- C2 \ refs/heads/master where C2 is unreachable, but has a parent (C1) which is reachable, and C2 would be pruned, then the expiry pack will contain only C2, not C1. [1]: https://lore.kernel.org/git/20190319001829.GL29661@sigill.intra.peff.net/ Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-24trace2: add global counter mechanismJeff Hostetler1-0/+31
Add global counters mechanism to Trace2. The Trace2 counters mechanism adds the ability to create a set of global counter variables and an API to increment them efficiently. Counters can optionally report per-thread usage in addition to the sum across all threads. Counter events are emitted to the Trace2 logs when a thread exits and at process exit. Counters are an alternative to `data` and `data_json` events. Counters are useful when you want to measure something across the life of the process, when you don't want per-measurement events for performance reasons, when the data does not fit conveniently within a region, or when your control flow does not easily let you write the final total. For example, you might use this to report the number of calls to unzip() or the number of de-delta steps during a checkout. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-24trace2: add stopwatch timersJeff Hostetler1-0/+90
Add stopwatch timer mechanism to Trace2. Timers are an alternative to Trace2 Regions. Regions are useful for measuring the time spent in various computation phases, such as the time to read the index, time to scan for unstaged files, time to scan for untracked files, and etc. However, regions are not appropriate in all places. For example, during a checkout, it would be very inefficient to use regions to measure the total time spent inflating objects from the ODB from across the entire lifetime of the process; a per-unzip() region would flood the output and significantly slow the command; and some form of post-processing would be requried to compute the time spent in unzip(). Timers can be used to measure a series of timer intervals and emit a single summary event (at thread and/or process exit). Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-24api-trace2.txt: elminate section describing the public trace2 APIJeff Hostetler1-54/+7
Eliminate the mostly obsolete `Public API` sub-section from the `Trace2 API` section in the documentation. Strengthen the referral to `trace2.h`. Most of the technical information in this sub-section was moved to `trace2.h` in 6c51cb525d (trace2: move doc to trace2.h, 2019-11-17) to be adjacent to the function prototypes. The remaining text wasn't that useful by itself. Furthermore, the text would need a bit of overhaul to add routines that do not immediately generate a message, such as stopwatch timers. So it seemed simpler to just get rid of it. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-24tr2tls: clarify TLS terminologyJeff Hostetler1-4/+4
Reduce or eliminate use of the term "TLS" in the Trace2 code. The term "TLS" has two popular meanings: "thread-local storage" and "transport layer security". In the Trace2 source, the term is associated with the former. There was concern on the mailing list about it refering to the latter. Update the source and documentation to eliminate the use of the "TLS" term or replace it with the phrase "thread-local storage" to reduce ambiguity. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-22merge-tree: support multiple batched merges with --stdinElijah Newren1-1/+29
Add an option, --stdin, to merge-tree which will accept lines of input with two branches to merge per line, and which will perform all the merges and give output for each in turn. This option implies -z, and modifies the output to also include a merge status since the exit code of the program can no longer convey that information now that multiple merges are involved. This could be useful, for example, by Git hosting providers. When one branch is updated, one may want to check whether all code reviews targetting that branch can still cleanly merge. Avoiding the overhead of starting up a separate process for each of those code reviews might provide significant savings in a repository with many code reviews. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-22merge-tree: update documentation for differences in -z outputElijah Newren1-7/+39
The Informational Messages was updated in de90581141 ("merge-ort: optionally produce machine-readable output", 2022-06-18) to provide more detailed and machine parseable output when `-z` is passed, but the Documentation was not updated to reflect these changes. Update it now. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-21Documentation/build-docdep.perl: generate sorted outputSZEDER Gábor1-2/+3
To make sure that our manpages are rebuilt when any of the included source files change and only the affected manpages are rebuilt, 'build-docdep.perl' scans our documentation source files for include directives, and outputs 'make' dependencies to be included by 'Documentation/Makefile'. This script relies on Perl's hash data structures, and generates its output while iterating over them, and since hashes in Perl are very much unordered, the output varies greatly from run to run, both the order of targets and the order of dependencies of each target. This lack of ordering doesn't matter for 'make', because it cares neither about the order of targets in a Makefile nor about the order of a target's dependencies. However, it does matter to developers looking into build issues potentially involving these generated dependencies, as it's rather hard to tell whether there are any relevant (i.e. not order-only) changes among the dependencies compared to the previous run. So let's make 'build-docdep.perl's output stable and ordered by sorting the keys of the hashes before iterating over them. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-21The fifth batchJunio C Hamano1-1/+21
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-21Merge branch 'jc/symbolic-ref-no-recurse'Junio C Hamano1-1/+10
After checking out a "branch" that is a symbolic-ref that points at another branch, "git symbolic-ref HEAD" reports the underlying branch, not the symbolic-ref the user gave checkout as argument. The command learned the "--no-recurse" option to stop after dereferencing a symbolic-ref only once. * jc/symbolic-ref-no-recurse: symbolic-ref: teach "--[no-]recurse" option
2022-10-19The fourth batchJunio C Hamano1-0/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-19Merge branch 'ab/coding-guidelines-c99'Junio C Hamano1-10/+25
Update CodingGuidelines to clarify what features to use and avoid in C99. * ab/coding-guidelines-c99: CodingGuidelines: recommend against unportable C99 struct syntax CodingGuidelines: mention C99 features we can't use CodingGuidelines: allow declaring variables in for loops CodingGuidelines: mention dynamic C99 initializer elements CodingGuidelines: update for C99
2022-10-17Sync with v2.38.1Junio C Hamano10-4/+133
2022-10-17The third batchJunio C Hamano1-0/+34
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-17Merge branch 'jc/use-of-uc-in-log-messages'Junio C Hamano1-1/+3
Clarify that "the sentence after <area>: prefix does not begin with a capital letter" rule applies only to the commit title. * jc/use-of-uc-in-log-messages: SubmittingPatches: use usual capitalization in the log message body
2022-10-17Merge branch 'ed/fsmonitor-on-networked-macos'Junio C Hamano3-3/+47
By default, use of fsmonitor on a repository on networked filesystem is disabled. Add knobs to make it workable on macOS. * ed/fsmonitor-on-networked-macos: fsmonitor: fix leak of warning message fsmonitor: add documentation for allowRemote and socketDir options fsmonitor: check for compatability before communicating with fsmonitor fsmonitor: deal with synthetic firmlinks on macOS fsmonitor: avoid socket location check if using hook fsmonitor: relocate socket file if .git directory is remote fsmonitor: refactor filesystem checks to common interface
2022-10-17rebase --keep-base: imply --no-fork-pointPhillip Wood1-4/+4
Given the name of the option it is confusing if --keep-base actually changes the base of the branch without --fork-point being explicitly given on the command line. The combination of --keep-base with an explicit --fork-point is still supported even though --fork-point means we do not keep the same base if the upstream branch has been rewound. We do this in case anyone is relying on this behavior which is tested in t3431[1] [1] https://lore.kernel.org/git/20200715032014.GA10818@generichostname/ Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-17rebase --keep-base: imply --reapply-cherry-picksPhillip Wood1-10/+16
As --keep-base does not rebase the branch it is confusing if it removes commits that have been cherry-picked to the upstream branch. As --reapply-cherry-picks is not supported by the "apply" backend this commit ensures that cherry-picks are reapplied by forcing the upstream commit to match the onto commit unless --no-reapply-cherry-picks is given. Reported-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13reflog doc: list real subcommands up-frontÆvar Arnfjörð Bjarmason1-9/+6
Change the "git reflog" documentation to exhaustively list the subcommands it accepts in the SYNOPSIS, as opposed to leaving that for a "[verse]" in the DESCRIPTION section. This documentation style was added in cf39f54efc6 (git reflog show, 2007-02-08), but isn't how other commands which take subcommands are documented. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13doc txt & -h consistency: use "[<label>...]" for "zero or more"Ævar Arnfjörð Bjarmason1-1/+1
Correct uses of "<label>..." where we really meant to say "[<label>...]", i.e. the command in question taken an optional set of "<label>". As the CodingGuidelines notes "[o]ptional parts [should be] enclosed in square brackets". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13doc txt & -h consistency: make "annotate" consistentÆvar Arnfjörð Bjarmason1-1/+1
The cmd_blame() already detected whether it was processing "blame" or "annotate", but it didn't adjust its usage output accordingly. Let's do that. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13doc txt & -h consistency: make "stash" consistentÆvar Arnfjörð Bjarmason1-1/+4
Amend both the -h output and *.txt to match one another. In this case the *.txt didn't list the "save" subcommand, and the "-h" was similarly missing some commands. Let's also convert the *.c code to use a macro definition, similar to that used in preceding commits. This avoids duplication. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13doc txt & -h consistency: add missing optionsÆvar Arnfjörð Bjarmason2-3/+7
Change those built-in commands that were attempting to exhaustively list the options in the "-h" output to actually do so, and always have *.txt documentation know about the exhaustive list of options. Let's also fix the documentation and -h output for those built-in commands where the *.txt and -h output was a mismatch of missing options on both sides. In the case of "interpret-trailers" fixing the missing options reveals that the *.txt version was implicitly claiming that the command had two operating modes, which a look at the -h version (and studying the documentation) will show is not the case. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13doc txt & -h consistency: use "git foo" form, not "git-foo"Ævar Arnfjörð Bjarmason1-1/+1
Use the "git cmd" form instead of "git-cmd" for both "git receive-pack" and "git credential-cache--daemon". For "git-receive-pack" we do have a binary with that name, even when installed with SKIP_DASHED_BUILT_INS=YesPlease, but for the purposes of the SYNOPSIS let's use the "git cmd" form like everywhere else. It can be invoked like that (and our tests do so), the parts of our documentation that explain when you need to use the dashed form do so, and use it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13doc txt & -h consistency: make "read-tree" consistentÆvar Arnfjörð Bjarmason1-1/+1
The C version was right to use "()" in place of "[]" around the option listing, let's update the *.txt version accordingly, and furthermore list the *.c options in the same order as the *.txt. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13doc txt & -h consistency: make "rerere" consistentÆvar Arnfjörð Bjarmason1-1/+1
For "rerere" say "pathspec" consistently, and list the subcommands in the order that they're discussed in the "COMMANDS" section of the documentation. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13doc txt & -h consistency: add missing options and labelsÆvar Arnfjörð Bjarmason5-5/+12
Fix various issues of SYNOPSIS and -h output syntax where: * Options such as --force were missing entirely * ...or the short option, such as -f * We said "opts" or "options", but could instead enumerate the (small) set of supported options * Options that were missing entirely (ls-remote's --sort=<key>) As we can specify "--sort" multiple times (it's backed by a string-list" it should really be "[(--sort=<key>)...]", which is what "git for-each-ref" lists it as, but let's leave that issue for a subsequent cleanup, and stop at making these consistent. Other "ref-filter.h" users share the same issue, e.g. "git-branch.txt". * For "verify-tag" and "verify-commit" we were missing the "--raw" option. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13doc txt & -h consistency: add or fix optional "--" syntaxÆvar Arnfjörð Bjarmason1-1/+1
Add the "[--]" for those cases where the *.txt and -h were inconsistent, or where we incorrectly stated in one but not the other that the "--" was mandatory. In the case of "rev-list" both sides were wrong, as we we don't require one or more paths if "--" is used, e.g. this is OK: git rev-list HEAD -- That part of this change is not a "doc txt & -h consistency" change, as we're changing both versions, doing so here makes both sides consistent. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13doc txt & -h consistency: fix mismatching labelsÆvar Arnfjörð Bjarmason6-22/+22
Fix various inconsistencies between command SYNOPSIS and the corresponding -h output where our translatable labels didn't match up. In some cases we need to adjust the prose that follows the SYNOPSIS accordingly, as it refers back to the changed label. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13doc txt & -h consistency: use "<options>", not "<options>..."Ævar Arnfjörð Bjarmason2-2/+2
It's arguably more correct to say "[<option>...]" than either of these forms, but the vast majority of our documentation uses the "[<options>]" form to indicate an arbitrary number of options, let's do the same in these cases, which were the odd ones out. In the case of "mv" and "sparse-checkout" let's add the missing "[]" to indicate that these are optional. In the case of "t/helper/test-proc-receive.c" there is no *.txt version, making it the only hunk in this commit that's not a "doc txt & -h consistency" change. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13stash doc SYNOPSIS & -h: correct padding around "[]()"Ævar Arnfjörð Bjarmason1-6/+6
The whitespace padding of alternatives should be of the form "[-f | --force]" not "[-f|--force]". Likewise we should not have padding before the first option, so "(--all | <pack-filename>...)" is correct, not "( --all | <pack-filename>... )". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13doc txt & -h consistency: correct padding around "[]()"Ævar Arnfjörð Bjarmason11-14/+14
The whitespace padding of alternatives should be of the form "[-f | --force]" not "[-f|--force]". Likewise we should not have padding before the first option, so "(--all | <pack-filename>...)" is correct, not "( --all | <pack-filename>... )". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13doc txt & -h consistency: fix incorrect alternates syntaxÆvar Arnfjörð Bjarmason1-3/+3
Fix the incorrect "[-o | --option <argument>]" syntax, which should be "[(-o | --option) <argument>]", we were previously claiming that only the long option accepted the "<argument>", which isn't what we meant. This syntax issue for "bugreport" originated in 238b439d698 (bugreport: add tool to generate debugging info, 2020-04-16), and for "diagnose" in 6783fd3cef0 (builtin/diagnose.c: create 'git diagnose' builtin, 2022-08-12), which copied and adjusted "bugreport" documentation and code. In the case of "Documentation/git-stash.txt" and "builtin/stash.c" this is not a "doc txt & -h consistency" change, as we're changing both versions, doing so here makes a subsequent change smaller. In that case fix the incorrect "[-o | --option <argument>]" syntax, which should be "[(-o | --option) <argument>]", we were previously claiming that only the long option accepted the "<argument>", which isn't what we meant. The "stash" issue has been with us in both the "-h" and *.txt versions since bd514cada4b (stash: introduce 'git stash store', 2013-06-15). We could claim that this isn't a syntax issue if a "vertical bar binds tighter than option and its argument", but such a rule would change e.g. this "cat-file" SYNOPSIS example to mean something we don't: ... [<rev>:<path|tree-ish> | --path=<path|tree-ish> <rev>] We have various other examples where the post-image here is already used, e.g. for "format-patch" ("-o"), "grep" ("-m"), "submodule" ("set-branch -b") etc. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13doc txt & -h consistency: word-wrapÆvar Arnfjörð Bjarmason2-2/+4
Change the documentation and -h output for those built-in commands where both the -h output and *.txt were lacking in word-wrapping. There are many more built-ins that could use this treatment, this change is narrowed to those where this whitespace change is needed to make the -h and *.txt consistent in the end. In the case of "Documentation/git-hash-object.txt" and "builtin/hash-object.c" this is not a "doc txt & -h consistency" change, as we're changing both versions, doing so here makes a subsequent change smaller. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13doc SYNOPSIS: consistently use ' for commandsÆvar Arnfjörð Bjarmason2-2/+2
Most of our commands use ''-quotation only for the name of the command itself, and not its (optional) arguments. Let's do the same for these. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13doc SYNOPSIS: don't use ' for subcommandsÆvar Arnfjörð Bjarmason2-2/+2
Almost all of our documentation doesn't use "'" syntax for subcommands, but these did, let's make them consistent with the rest. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13CodingGuidelines: update and clarify command-line conventionsÆvar Arnfjörð Bjarmason1-2/+12
Edit the section which explains how to create a good SYNOPSIS section for clarity and accuracy, it was mostly introduced in c455bd8950e (CodingGuidelines: Add a section on writing documentation, 2010-11-04): * Change "extra" example to "file", which now naturally follows from previous "<file>..." example (one or more) to "[<file>...]" (zero or more). * Explain how we prefer spacing around "[]()" tokens and "|" alternatives, this is not a new policy, but just codifies what's already the pattern in the most wide use in the documentation. Having a space around " | " for flags, but not for flag values is inconsistent, but this style guide codifies existing patterns. Grepping shows that we don't have any instance matching the second "Don't" example: git grep -E -h -o '=\([^)]+\)' -- builtin Documentation/ Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-12docs: git-send-email: difference between ssl and tls smtp-encryptionSotir Danailov1-3/+12
New explanation for the difference between these values. It's hard to understand what they do based only on the names. New description of used default ports. Signed-off-by: Sotir Danailov <sndanailov@wired4ever.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-12bundle-uri: create base key-value pair parsingDerrick Stolee2-0/+26
There will be two primary ways to advertise a bundle list: as a list of packet lines in Git's protocol v2 and as a config file served from a bundle URI. Both of these fundamentally use a list of key-value pairs. We will use the same set of key-value pairs across these formats. Create a new bundle_list_update() method that is currently unusued, but will be used in the next change. It inspects each key to see if it is understood and then applies it to the given bundle_list. Here are the keys that we teach Git to understand: * bundle.version: This value should be an integer. Git currently understands only version 1 and will ignore the list if the version is any other value. This version can be increased in the future if we need to add new keys that Git should not ignore. We can add new "heuristic" keys without incrementing the version. * bundle.mode: This value should be one of "all" or "any". If this mode is not understood, then Git will ignore the list. This mode indicates whether Git needs all of the bundle list items to make a complete view of the content or if any single item is sufficient. The rest of the keys use a bundle identifier "<id>" as part of the key name. Keys using the same "<id>" describe a single bundle list item. * bundle.<id>.uri: This stores the URI of the bundle item. This currently is expected to be an absolute URI, but will be relaxed to be a relative URI in the future. While parsing, return an error if a URI key is repeated, since we can make that restriction with bundle lists. Make the git_parse_int() method global so we can parse the integer version value carefully. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-11The second batchJunio C Hamano1-0/+16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-11Merge branch 'nb/doc-mergetool-typofix'Junio C Hamano1-1/+1
Typofix. * nb/doc-mergetool-typofix: mergetool.txt: typofix 'overwriten' -> 'overwritten'
2022-10-11Merge branch 'ds/bundle-uri-docfix'Junio C Hamano1-4/+4
Doc formatting fix. * ds/bundle-uri-docfix: bundle-uri: fix technical doc issues
2022-10-11CodingGuidelines: recommend against unportable C99 struct syntaxÆvar Arnfjörð Bjarmason1-0/+5
Per 33665d98e6b (reftable: make assignments portable to AIX xlc v12.01, 2022-03-28) forms like ".a.b = *c" can be replaced by using ".a = { .b = *c }" instead. We'll probably allow these sooner than later, but since the workaround is trivial let's note it among the C99 features we'd like to hold off on for now. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-10CodingGuidelines: mention C99 features we can't useÆvar Arnfjörð Bjarmason1-0/+7
The C99 section of the CodingGuidelines is a good overview of what we can use, but is sorely lacking in what we can't use. Something that comes up occasionally is the portability of %z. Per [1] we couldn't use it for the longest time due to MSVC not supporting it, but nowadays by requiring C99 we rely on the MSVC version that does, but we can't use it yet because a C library that MinGW uses doesn't support it. 1. https://lore.kernel.org/git/a67e0fd8-4a14-16c9-9b57-3430440ef93c@gmail.com/ Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-10CodingGuidelines: allow declaring variables in for loopsÆvar Arnfjörð Bjarmason1-8/+2
Since 44ba10d6712 (revision: use C99 declaration of variable in for() loop, 2021-11-14) released with v2.35.0 we've had a variable declared with in a for loop. Since then we've had inadvertent follow-ups to that with at least cb2607759e2 (merge-ort: store more specific conflict information, 2022-06-18) released with v2.38.0. As November 2022 is within the window of this upcoming release, let's update the guideline to allow this. We can have the promised "revisit" discussion while this patch cooks, and drop it if it turns out that it is still premature, which is not expected to happen at this moment. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-10CodingGuidelines: mention dynamic C99 initializer elementsÆvar Arnfjörð Bjarmason1-0/+5
The first use of variables in initializer elements appears to have been 2b6854c863a (Cleanup variables in cat-file, 2007-04-21) released with v1.5.2. Some of those caused portability issues, and e.g. that "cat-file" use was changed in 66dbfd55e38 (Rewrite dynamic structure initializations to runtime assignment, 2010-05-14) which went out with v1.7.2. But curiously 66dbfd55e38 missed some of them, e.g. an archive.c use added in d5f53d6d6f2 (archive: complain about path specs that don't match anything, 2009-12-12), and another one in merge-index.c (later builtin/merge-index.c) in 0077138cd9d (Simplify some instances of run_command() by using run_command_v_opt()., 2009-06-08). As far as I can tell there's been no point since 2b6854c863a in 2007 where a compiler that didn't support this has been able to compile git. Presumably 66dbfd55e38 was an attempt to make headway with wider portability that ultimately wasn't completed. In any case, we are thoroughly reliant on this syntax at this point, so let's update the guidelines, see https://lore.kernel.org/git/xmqqy1tunjgp.fsf@gitster.g/ for the initial discussion. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-10CodingGuidelines: update for C99Ævar Arnfjörð Bjarmason1-2/+6
Since 7bc341e21b5 (git-compat-util: add a test balloon for C99 support, 2021-12-01) we've had a hard dependency on C99, but the prose in CodingGuidelines was written under the assumption that we were using C89 with a few C99 features. As the updated prose notes we'd still like to hold off on novel C99 features, but let's make it clear that we target that C version, and then enumerate new C99 features that are safe to use. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-10The (real) first batch for 2.39Junio C Hamano1-0/+52
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-10Merge branch 'tb/midx-repack-ignore-cruft-packs'Junio C Hamano1-3/+4
"git multi-pack-index repack/expire" used to repack unreachable cruft into a new pack, which have been corrected. * tb/midx-repack-ignore-cruft-packs: midx.c: avoid cruft packs with non-zero `repack --batch-size` midx.c: remove unnecessary loop condition midx.c: replace `xcalloc()` with `CALLOC_ARRAY()` midx.c: avoid cruft packs with `repack --batch-size=0` midx.c: prevent `expire` from removing the cruft pack Documentation/git-multi-pack-index.txt: clarify expire behavior Documentation/git-multi-pack-index.txt: fix typo
2022-10-10Merge branch 'jc/environ-docs'Junio C Hamano1-16/+27
Documentation on various Boolean GIT_* environment variables have been clarified. * jc/environ-docs: environ: GIT_INDEX_VERSION affects not just a new repository environ: simplify description of GIT_INDEX_FILE environ: GIT_FLUSH should be made a usual Boolean environ: explain Boolean environment variables environ: document GIT_SSL_NO_VERIFY
2022-10-10Merge branch 'ds/scalar-unregister-idempotent'Junio C Hamano1-1/+5
"scalar unregister" in a repository that is already been unregistered reported an error. * ds/scalar-unregister-idempotent: string-list: document iterator behavior on NULL input gc: replace config subprocesses with API calls scalar: make 'unregister' idempotent maintenance: add 'unregister --force'
2022-10-10Merge branch 'so/diff-merges-cleanup'Junio C Hamano1-3/+3
Code clean-up. * so/diff-merges-cleanup: diff-merges: clarify log.diffMerges documentation diff-merges: cleanup set_diff_merges() diff-merges: cleanup func_by_opt()
2022-10-09symbolic-ref: teach "--[no-]recurse" optionJunio C Hamano1-1/+10
Suppose you are managing many maintenance tracks in your project, and some of the more recent ones are maint-2.36 and maint-2.37. Further imagine that your project recently tagged the official 2.38 release, which means you would need to start maint-2.38 track soon, by doing: $ git checkout -b maint-2.38 v2.38.0^0 $ git branch --list 'maint-2.3[6-9]' * maint-2.38 maint-2.36 maint-2.37 So far, so good. But it also is reasonable to want not to have to worry about which maintenance track is the latest, by pointing a more generic-sounding 'maint' branch at it, by doing: $ git symbolic-ref refs/heads/maint refs/heads/maint-2.38 which would allow you to say "whichever it is, check out the latest maintenance track", by doing: $ git checkout maint $ git branch --show-current maint-2.38 It is arguably better to say that we are on 'maint-2.38' rather than on 'maint', and "git merge/pull" would record "into maint-2.38" and not "into maint", so I think what we have is a good behaviour. One thing that is slightly irritating, however, is that I do not think there is a good way (other than "cat .git/HEAD") to learn that you checked out 'maint' to get into that state. Just like the output of "git branch --show-current" shows above, "git symbolic-ref HEAD" would report 'refs/heads/maint-2.38', bypassing the intermediate symbolic ref at 'refs/heads/maint' that is pointed at by HEAD. The internal resolve_ref() API already has the necessary support for stopping after resolving a single level of a symbolic-ref, and we can expose it by adding a "--[no-]recurse" option to the command. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-07Start 2.39 cycleJunio C Hamano1-0/+22
The version numbers do not mean much, but we may want to call the first one in 2023 version 3.1 or something, but let's just increment the second digit from the previous one for this cycle. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-07Merge branch 'dd/retire-efgrep'Junio C Hamano1-2/+0
Prepare for GNU [ef]grep that throw warning of their uses. * dd/retire-efgrep: t: convert fgrep usage to "grep -F" t: convert egrep usage to "grep -E" t: remove \{m,n\} from BRE grep usage CodingGuidelines: allow grep -E
2022-10-07SubmittingPatches: use usual capitalization in the log message bodyJunio C Hamano1-1/+3
Update the description of the summary section to clarify that the "do not capitalize" rule applies only the word after the "<area>:" prefix of the title and nowhere else. This hopefully will prevent folks from writing their proposed log message in all lowercase. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-07bundle-uri: fix technical doc issuesDerrick Stolee1-4/+4
Two documentation issues exist in the technical docs for the bundle URI feature. First, there is an extraneous "the" across a linebreak, making the nonsensical phrase "the bundle the list" which should just be "the bundle list". Secondly, the asciidoc update treats the string "`have`s" as starting a "<code>" block, but the second tick is interpreted as an apostrophe instead of a closing "</code>" tag. This causes entire sentences to be formatted as code until the next one comes along. Simply adding a space here does not work properly as the rendered HTML keeps that space. Instead, restructure the sentence slightly to avoid using a plural, allowing the HTML to render correctly. Reported-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-06Git 2.38.1v2.38.1Taylor Blau1-0/+5
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Sync with 2.37.4Taylor Blau9-4/+128
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Sync with 2.36.3Taylor Blau9-4/+128
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Git 2.36.3v2.36.3Taylor Blau1-0/+5
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Sync with 2.35.5Taylor Blau7-3/+88
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Git 2.35.5v2.35.5Taylor Blau1-0/+5
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Sync with 2.34.5Taylor Blau6-3/+83
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Git 2.34.5v2.34.5Taylor Blau1-0/+5
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Sync with 2.33.5Taylor Blau5-3/+78
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Git 2.33.5v2.33.5Taylor Blau1-0/+5
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Sync with 2.32.4Taylor Blau4-3/+73
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Git 2.32.4v2.32.4Taylor Blau1-0/+5
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Sync with 2.31.5Taylor Blau3-3/+68
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Git 2.31.5v2.31.5Taylor Blau1-0/+5
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Sync with 2.30.6Taylor Blau2-3/+63
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Git 2.30.6v2.30.6Taylor Blau1-0/+60
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-05mergetool.txt: typofix 'overwriten' -> 'overwritten'Noah Betzen1-1/+1
Signed-off-by: Noah Betzen <noah@nezteb.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-05fsmonitor: add documentation for allowRemote and socketDir optionsEric DeCosta3-3/+47
Add documentation for 'fsmonitor.allowRemote' and 'fsmonitor.socketDir'. Call-out experimental nature of 'fsmonitor.allowRemote' and limited filesystem support for 'fsmonitor.socketDir'. Signed-off-by: Eric DeCosta <edecosta@mathworks.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-01diff: support ^! for mergesRené Scharfe1-4/+4
revision.c::handle_revision_arg_1() resolves <rev>^! by first adding the negated parents and then <rev> itself. builtin_diff_combined() expects the first tree to be the merge and the remaining ones to be the parents, though. This mismatch results in bogus diff output. Remember the first tree that doesn't belong to a parent and use it instead of blindly picking the first one. This makes "git diff <rev>^!" consistent with "git show <rev>^!". Reported-by: Tim Jaacks <tim.jaacks@garz-fricke.com> Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-01revisions.txt: unspecify order of resolved parts of ^!René Scharfe1-1/+1
gitrevisions(7) says that <rev>^! resolves to <rev> and then all the parents of <rev>. revision.c::handle_revision_arg_1() actually adds all parents first, then <rev>. Change the documentation to leave the order unspecified, to avoid misleading readers. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-01transport: make `protocol.file.allow` be "user" by defaultTaylor Blau1-3/+3
An earlier patch discussed and fixed a scenario where Git could be used as a vector to exfiltrate sensitive data through a Docker container when a potential victim clones a suspicious repository with local submodules that contain symlinks. That security hole has since been plugged, but a similar one still exists. Instead of convincing a would-be victim to clone an embedded submodule via the "file" protocol, an attacker could convince an individual to clone a repository that has a submodule pointing to a valid path on the victim's filesystem. For example, if an individual (with username "foo") has their home directory ("/home/foo") stored as a Git repository, then an attacker could exfiltrate data by convincing a victim to clone a malicious repository containing a submodule pointing at "/home/foo/.git" with `--recurse-submodules`. Doing so would expose any sensitive contents in stored in "/home/foo" tracked in Git. For systems (such as Docker) that consider everything outside of the immediate top-level working directory containing a Dockerfile as inaccessible to the container (with the exception of volume mounts, and so on), this is a violation of trust by exposing unexpected contents in the working copy. To mitigate the likelihood of this kind of attack, adjust the "file://" protocol's default policy to be "user" to prevent commands that execute without user input (including recursive submodule initialization) from taking place by default. Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-09-27maintenance: add 'unregister --force'Derrick Stolee1-1/+5
The 'git maintenance unregister' subcommand has a step that removes the current repository from the multi-valued maitenance.repo config key. This fails if the repository is not listed in that key. This makes running 'git maintenance unregister' twice result in a failure in the second instance. This failure exit code is helpful, but its message is not. Add a new die() message that explicitly calls out the failure due to the repository not being registered. In some cases, users may want to run 'git maintenance unregister' just to make sure that background jobs will not start on this repository, but they do not want to check to see if it is registered first. Add a new '--force' option that will siltently succeed if the repository is not already registered. Also add an extra test of 'git maintenance unregister' at a point where there are no registered repositories. This should fail without --force. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-23cmd-list.perl: fix identifying man sectionsMartin Ågren1-1/+1
We attribute each documentation text file to a man section by finding a line in the file that looks like "gitfoo(<digit>)". Commit cc75e556a9 ("scalar: add to 'git help -a' command list", 2022-09-02) updated this logic to look not only for "gitfoo" but also "scalarfoo". In doing so, it forgot to account for the fact that after the updated regex has found a match, the man section is no longer to be found in `$1` but now lives in `$2`. This makes our git(1) manpage look as follows: Main porcelain commands git-add(git) Add file contents to the index. [...] gitk(git) The Git repository browser. scalar(scalar) A tool for managing large Git repositories. Restore the man sections by not capturing the (git|scalar) part of the match into `$1`. As noted by Ævar [1], we could even match any "foo" rather than just "gitfoo" and "scalarfoo", but that's a larger change. For now, just fix the regression in cc75e556a9. [1] https://lore.kernel.org/git/220923.86wn9u4joo.gmgdl@evledraar.gmail.com/#t Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-21Git 2.38-rc1v2.38.0-rc1Junio C Hamano1-0/+4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-21Merge branch 'js/typofix'Junio C Hamano7-10/+10
* js/typofix: Documentation: clean up various typos in technical docs Documentation: clean up a few misspelled word typos
2022-09-21Merge branch 'vd/doc-reviewing-guidelines'Junio C Hamano2-0/+163
Just like we have coding guidelines, we now have guidelines for reviewers. * vd/doc-reviewing-guidelines: Documentation: add ReviewingGuidelines
2022-09-21Final batch before -rc1Junio C Hamano1-0/+4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-21Merge branch 'tz/tech-docs-to-help-fix'Junio C Hamano5-8/+7
Docfix for topic already in -rc0. * tz/tech-docs-to-help-fix: api docs: link to html version of api-trace2 docs: fix a few recently broken links
2022-09-21CodingGuidelines: allow grep -EĐoàn Trần Công Danh1-2/+0
Despite forbidden by CodingGuidelines, our usage of 'grep -E' has been increased over the years, and noone has come and complained. Let's lift the restriction. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-21Documentation: clean up various typos in technical docsJacob Stopak4-7/+7
Used GNU "aspell check <filename>" to review various technical documentation files with the default aspell dictionary. Ignored false-positives between american and british english. Signed-off-by: Jacob Stopak <jacob@initialcommit.io> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-21Documentation: clean up a few misspelled word typosJacob Stopak3-3/+3
Used GNU "aspell check <filename>" to review various documentation files with the default aspell dictionary. Ignored false-positives between american and british english. Signed-off-by: Jacob Stopak <jacob@initialcommit.io> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-21midx.c: prevent `expire` from removing the cruft packTaylor Blau1-2/+2
The `expire` sub-command unlinks any packs that are (a) contained in the MIDX, but (b) have no objects referenced by the MIDX. This sub-command ignores `.keep` packs, which remain on-disk even if they have no objects referenced by the MIDX. Cruft packs, however, aren't given the same treatment: if none of the objects contained in the cruft pack are selected from the cruft pack by the MIDX, then the cruft pack is eligible to be expired. This is less than desireable, since the cruft pack has important metadata about the individual object mtimes, which is useful to determine how quickly an object should age out of the repository when pruning. Ordinarily, we wouldn't expect the contents of a cruft pack to duplicated across non-cruft packs (and we'd expect to see the MIDX select all cruft objects from other sources even less often). But nonetheless, it is still possible to trick the `expire` sub-command into removing the `.mtimes` file in this circumstance. Teach the `expire` sub-command to ignore cruft packs in the same manner as it does `.keep` packs, in order to keep their metadata around, even when they are unreferenced by the MIDX. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-21Documentation/git-multi-pack-index.txt: clarify expire behaviorTaylor Blau1-2/+3
The `expire` sub-command of `git multi-pack-index` will never expire `.keep` packs, regardless of whether or not any of their objects were selected in the MIDX. This has always been the case since 19575c7c8e (multi-pack-index: implement 'expire' subcommand, 2019-06-10), which came after cff9711616 (multi-pack-index: prepare for 'expire' subcommand, 2019-06-10), when this documentation was originally written. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-21Documentation/git-multi-pack-index.txt: fix typoTaylor Blau1-1/+1
Remove the extra space character between "tracked" and "by", which dates back to when this paragraph was originally written in cff9711616 (multi-pack-index: prepare for 'expire' subcommand, 2019-06-10). Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-19Documentation: add ReviewingGuidelinesVictoria Dye2-0/+163
Add a reviewing guidelines document including advice and common terminology used in Git mailing list reviews. The document is included in the 'TECH_DOCS' list in order to include it in Git's published documentation. Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de> Helped-by: Derrick Stolee <derrickstolee@github.com> Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Josh Steadmon <steadmon@google.com> Signed-off-by: Victoria Dye <vdye@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-19A bit more of remaining topics before -rc1Junio C Hamano1-11/+14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-19Merge branch 'vd/scalar-to-main'Junio C Hamano4-62/+169
Hoist the remainder of "scalar" out of contrib/ to the main part of the codebase. * vd/scalar-to-main: Documentation/technical: include Scalar technical doc t/perf: add 'GIT_PERF_USE_SCALAR' run option t/perf: add Scalar performance tests scalar-clone: add test coverage scalar: add to 'git help -a' command list scalar: implement the `help` subcommand git help: special-case `scalar` scalar: include in standard Git build & installation scalar: fix command documentation section header
2022-09-16environ: GIT_INDEX_VERSION affects not just a new repositoryJunio C Hamano1-2/+2
The variable is consulted whenever we write the index file. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-16environ: simplify description of GIT_INDEX_FILEJunio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-16diff-merges: clarify log.diffMerges documentationSergey Organov1-3/+3
Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-16api docs: link to html version of api-trace2Todd Zullinger1-1/+1
In f6d25d7878 (api docs: document that BUG() emits a trace2 error event, 2021-04-13), a link to the plain text version of api-trace2 was added in `technical/api-error-handling.txt`. All of our other `link:`s point to the html versions. Do the same here. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-16docs: fix a few recently broken linksTodd Zullinger4-7/+6
Some links were broken in the recent move of various technical docs c0f6dd49f1 (Merge branch 'ab/tech-docs-to-help', 2022-08-14). Fix them. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-15Git 2.38-rc0v2.38.0-rc0Junio C Hamano1-0/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-15Merge branch 'js/typofix'Junio C Hamano6-6/+6
Typofix. * js/typofix: Documentation: fix various repeat word typos
2022-09-15environ: GIT_FLUSH should be made a usual BooleanJunio C Hamano1-0/+1
This uses atoi() and checks if the result is not zero to decide what to do. Turning it into the usual Boolean environment variable to use git_env_bool() would not break those who have been using "set to 0, or set to non-zero, that can be parsed with atoi()" values, but will match the expectation of those who expected "true" to mean "yes". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-15environ: explain Boolean environment variablesJunio C Hamano1-13/+18
Many environment variables use the git_env_bool() API to parse their values, and allow the usual "true/yes/on are true, false/no/off are false. In addition non-zero numbers are true and zero is false. An empty string is also false." set of values. Mark them as such, and consistently say "true" or "false", instead of random mixes of '1', '0', 'yes', 'true', etc. in their description. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-15environ: document GIT_SSL_NO_VERIFYJunio C Hamano1-0/+5
Even though the name of the environment variable is mentioned in "git config --help" from http.sslVerify, there is no description for it. Add one. Note that this is not a usual Boolean environment variable whose value can be yes/true/on vs no/false/off; the existence of it is enough to trigger the feature named by the variable. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-14Prepare for 2.38-rc0Junio C Hamano1-0/+11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-14Merge branch 'ab/dedup-config-and-command-docs'Junio C Hamano42-226/+280
Share the text used to explain configuration variables used by "git <subcmd>" in "git help <subcmd>" with the text from "git help config". * ab/dedup-config-and-command-docs: docs: add CONFIGURATION sections that fuzzy map to built-ins docs: add CONFIGURATION sections that map to a built-in log docs: de-duplicate configuration sections difftool docs: de-duplicate configuration sections notes docs: de-duplicate and combine configuration sections apply docs: de-duplicate configuration sections send-email docs: de-duplicate configuration sections grep docs: de-duplicate configuration sections docs: add and use include template for config/* includes
2022-09-13Sync with 'maint'Junio C Hamano1-0/+31
2022-09-13Merge a handful of topics from the 'master' frontJunio C Hamano1-0/+31
As the 'master' front will soon tag a preview and then release candidates for 2.38, it is unknown if we are going to issue another maintenance release on the 2.37.x track, but as we have accumulated enough material there, let's prepare a draft for it. Even if we end up not tagging 2.37.4, it would help motivated distro packagers to maintain their slightly older and "more stable" versions. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-13The twentieth batchJunio C Hamano1-0/+26
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-12Documentation: fix various repeat word typosJacob Stopak6-6/+6
Inspired by 24966cd982 ("doc: fix repeated words", 08-09-2019), I ran "egrep -R "\<([a-zA-Z]+)\> \<\1\>" ./Documentation/*" to find current cases of repeated words such as "the the" that were quite clearly typos. There were many false positives reported, such as "really really" or valid uses of "that that" which I left alone. Signed-off-by: Jacob Stopak <jacob@initialcommit.io> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-09The nineteenth batchJunio C Hamano1-0/+19
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-09Merge branch 'cc/doc-trailer-whitespace-rules'Junio C Hamano1-4/+6
Doc update. * cc/doc-trailer-whitespace-rules: Documentation: clarify whitespace rules for trailers
2022-09-09Merge branch 'jc/format-patch-force-in-body-from'Junio C Hamano2-0/+15
"git format-patch --from=<ident>" can be told to add an in-body "From:" line even for commits that are authored by the given <ident> with "--force-in-body-from"option. * jc/format-patch-force-in-body-from: format-patch: learn format.forceInBodyFrom configuration variable format-patch: allow forcing the use of in-body From: header pretty: separate out the logic to decide the use of in-body from
2022-09-09Merge branch 'js/range-diff-with-pathspec'Junio C Hamano1-0/+4
Allow passing a pathspec to "git range-diff". * js/range-diff-with-pathspec: range-diff: optionally accept pathspecs range-diff: consistently validate the arguments range-diff: reorder argument handling