summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/MyFirstContribution.txt7
-rw-r--r--Documentation/RelNotes/2.30.0.txt179
-rw-r--r--Documentation/SubmittingPatches43
-rw-r--r--Documentation/config.txt2
-rw-r--r--Documentation/config/advice.txt9
-rw-r--r--Documentation/config/checkout.txt21
-rw-r--r--Documentation/config/clone.txt4
-rw-r--r--Documentation/config/core.txt4
-rw-r--r--Documentation/config/format.txt2
-rw-r--r--Documentation/config/maintenance.txt18
-rw-r--r--Documentation/config/push.txt6
-rw-r--r--Documentation/diff-options.txt5
-rw-r--r--Documentation/git-am.txt2
-rw-r--r--Documentation/git-checkout.txt9
-rw-r--r--Documentation/git-cherry-pick.txt2
-rw-r--r--Documentation/git-clone.txt5
-rw-r--r--Documentation/git-commit-graph.txt4
-rw-r--r--Documentation/git-commit.txt10
-rw-r--r--Documentation/git-diff-index.txt9
-rw-r--r--Documentation/git-diff-tree.txt7
-rw-r--r--Documentation/git-diff.txt36
-rw-r--r--Documentation/git-format-patch.txt2
-rw-r--r--Documentation/git-maintenance.txt48
-rw-r--r--Documentation/git-push.txt26
-rw-r--r--Documentation/git-rebase.txt2
-rw-r--r--Documentation/git-remote.txt11
-rw-r--r--Documentation/git-restore.txt4
-rw-r--r--Documentation/git-revert.txt2
-rw-r--r--Documentation/git-send-email.txt4
-rw-r--r--Documentation/git-svn.txt4
-rw-r--r--Documentation/git-switch.txt3
-rw-r--r--Documentation/git-worktree.txt5
-rw-r--r--Documentation/gitattributes.txt3
-rw-r--r--Documentation/githooks.txt2
-rw-r--r--Documentation/merge-options.txt11
-rw-r--r--Documentation/signoff-option.txt18
-rw-r--r--Documentation/technical/directory-rename-detection.txt15
37 files changed, 449 insertions, 95 deletions
diff --git a/Documentation/MyFirstContribution.txt b/Documentation/MyFirstContribution.txt
index 4f85a08..60eed5e 100644
--- a/Documentation/MyFirstContribution.txt
+++ b/Documentation/MyFirstContribution.txt
@@ -249,7 +249,7 @@ component you're working on, followed by a blank line (always required) and then
the body of your commit message, which should provide the bulk of the context.
Remember to be explicit and provide the "Why" of your change, especially if it
couldn't easily be understood from your diff. When editing your commit message,
-don't remove the Signed-off-by line which was added by `-s` above.
+don't remove the `Signed-off-by` trailer which was added by `-s` above.
----
psuh: add a built-in by popular demand
@@ -507,6 +507,9 @@ documentation is consistent with other Git and UNIX manpages; this makes life
easier for your user, who can skip to the section they know contains the
information they need.
+NOTE: Before trying to build the docs, make sure you have the package `asciidoc`
+installed.
+
Now that you've written your manpage, you'll need to build it explicitly. We
convert your AsciiDoc to troff which is man-readable like so:
@@ -522,8 +525,6 @@ $ make -C Documentation/ git-psuh.1
$ man Documentation/git-psuh.1
----
-NOTE: You may need to install the package `asciidoc` to get this to work.
-
While this isn't as satisfying as running through `git help`, you can at least
check that your help page looks right.
diff --git a/Documentation/RelNotes/2.30.0.txt b/Documentation/RelNotes/2.30.0.txt
new file mode 100644
index 0000000..76ae487
--- /dev/null
+++ b/Documentation/RelNotes/2.30.0.txt
@@ -0,0 +1,179 @@
+Git 2.30 Release Notes
+======================
+
+Updates since v2.29
+-------------------
+
+UI, Workflows & Features
+
+ * Userdiff for PHP update.
+
+ * Userdiff for Rust update.
+
+ * Userdiff for CSS update.
+
+ * The command line completion script (in contrib/) learned that "git
+ stash show" takes the options "git diff" takes.
+
+ * "git worktree list" now shows if each worktree is locked. This
+ possibly may open us to show other kinds of states in the future.
+
+ * "git maintenance", an extended big brother of "git gc", continues
+ to evolve.
+
+ * "git push --force-with-lease[=<ref>]" can easily be misused to lose
+ commits unless the user takes good care of their own "git fetch".
+ A new option "--force-if-includes" attempts to ensure that what is
+ being force-pushed was created after examining the commit at the
+ tip of the remote ref that is about to be force-replaced.
+
+ * "git clone" learned clone.defaultremotename configuration variable
+ to customize what nickname to use to call the remote the repository
+ was cloned from.
+
+ * "git checkout" learned to use checkout.guess configuration variable
+ and enable/disable its "--[no-]guess" option accordingly.
+
+ * "git resurrect" script (in contrib/) learned that the object names
+ may be longer than 40-hex depending on the hash function in use.
+
+ * "git diff A...B" learned "git diff --merge-base A B", which is a
+ longer short-hand to say the same thing.
+
+ * A sample 'push-to-checkout' hook, that performs the same as
+ what the built-in default action does, has been added.
+
+ * "git diff" family of commands learned the "-I<regex>" option to
+ ignore hunks whose changed lines all match the given pattern.
+
+ * The userdiff pattern learned to identify the function definition in
+ POSIX shells and bash.
+
+ * "git checkout-index" did not consistently signal an error with its
+ exit status, but now it does.
+
+ * A commit and tag object may have CR at the end of each and
+ every line (you can create such an object with hash-object or
+ using --cleanup=verbatim to decline the default clean-up
+ action), but it would make it impossible to have a blank line
+ to separate the title from the body of the message. We are now
+ more lenient and accept a line with lone CR on it as a blank line,
+ too.
+
+ * Exit codes from "git remote add" etc. were not usable by scripted
+ callers, but now they are.
+
+ * Zsh autocompletion (in contrib/) update.
+
+
+Performance, Internal Implementation, Development Support etc.
+
+ * Use "git archive" more to produce the release tarball.
+
+ * GitHub Actions automated test improvement to skip tests on a tree
+ identical to what has already been tested.
+
+ * Test-coverage for running commit-graph task "git maintenance" has
+ been extended.
+
+ * Our test scripts can be told to run only individual pieces while
+ skipping others with the "--run=..." option; they were taught to
+ take a substring of test title, in addition to numbers, to name the
+ test pieces to run.
+
+ * Adjust tests so that they won't scream when the default initial
+ branch name is changed to 'main'.
+
+ * Rewriting "git bisect" in C continues.
+
+ * More preliminary tests have been added to document desired outcome
+ of various "directory rename" situations.
+
+ * Micro clean-up of a couple of test scripts.
+
+ * "git diff" and other commands that share the same machinery to
+ compare with working tree files have been taught to take advantage
+ of the fsmonitor data when available.
+
+ * The code to detect premature EOF in the sideband demultiplexer has
+ been cleaned up.
+
+ * Test scripts are being prepared to transition of the default branch
+ name to 'main'.
+
+
+
+Fixes since v2.29
+-----------------
+
+ * In 2.29, "--committer-date-is-author-date" option of "rebase" and
+ "am" subcommands lost the e-mail address by mistake, which has been
+ corrected.
+ (merge 5f35edd9d7 jk/committer-date-is-author-date-fix later to maint).
+
+ * "git checkout -p A...B [-- <path>]" did not work, even though the
+ same command without "-p" correctly used the merge-base between
+ commits A and B.
+ (merge 35166b1fb5 dl/checkout-p-merge-base later to maint).
+
+ * The side-band status report can be sent at the same time as the
+ primary payload multiplexed, but the demultiplexer on the receiving
+ end incorrectly split a single status report into two, which has
+ been corrected.
+ (merge 712b0377db js/avoid-split-sideband-message later to maint).
+
+ * "git fast-import" wasted a lot of memory when many marks were in use.
+ (merge 3f018ec716 jk/fast-import-marks-alloc-fix later to maint).
+
+ * A test helper "test_cmp A B" was taught to diagnose missing files A
+ or B as a bug in test, but some tests legitimately wanted to notice
+ a failure to even create file B as an error, in addition to leaving
+ the expected result in it, and were misdiagnosed as a bug. This
+ has been corrected.
+ (merge 262d5ad5a5 es/test-cmp-typocatcher later to maint).
+
+ * When "git commit-graph" detects the same commit recorded more than
+ once while it is merging the layers, it used to die. The code now
+ ignores all but one of them and continues.
+ (merge 85102ac71b ds/commit-graph-merging-fix later to maint).
+
+ * The meaning of a Signed-off-by trailer can vary from project to
+ project; this and also what it means to this project has been
+ clarified in the documentation.
+ (merge 3abd4a67d9 bk/sob-dco later to maint).
+
+ * "git credential' didn't honor the core.askPass configuration
+ variable (among other things), which has been corrected.
+ (merge 567ad2c0f9 tk/credential-config later to maint).
+
+ * Dev support to catch a tentative definition of a variable in our C
+ code as an error.
+ (merge 5539183622 jk/no-common later to maint).
+
+ * "git rebase --rebase-merges" did not correctly pass --gpg-sign
+ command line option to underlying "git merge" when replaying a merge
+ using non-default merge strategy or when replaying an octopus merge
+ (because replaying a two-head merge with the default strategy was
+ done in a separate codepath, the problem did not trigger for most
+ users), which has been corrected.
+ (merge 43ad4f2eca sc/sequencer-gpg-octopus later to maint).
+
+ * "git apply -R" did not handle patches that touch the same path
+ twice correctly, which has been corrected. This is most relevant
+ in a patch that changes a path from a regular file to a symbolic
+ link (and vice versa).
+ (merge b0f266de11 jt/apply-reverse-twice later to maint).
+
+ * A recent oid->hash conversion missed one spot, breaking "git svn".
+ (merge 03bb366de4 bc/svn-hash-oid-fix later to maint).
+
+ * Other code cleanup, docfix, build fix, etc.
+ (merge 3e0a5dc9af cc/doc-filter-branch-typofix later to maint).
+ (merge 32c83afc2c cw/ci-ghwf-check-ws-errors later to maint).
+ (merge 5eb2ed691b rs/tighten-callers-of-deref-tag later to maint).
+ (merge 6db29ab213 jk/fast-import-marks-cleanup later to maint).
+ (merge e5cf6d3df4 nk/dir-c-comment-update later to maint).
+ (merge 5710dcce74 jk/report-fn-typedef later to maint).
+ (merge 9a82db1056 en/sequencer-rollback-lock-cleanup later to maint).
+ (merge 4e1bee9a99 js/t7006-cleanup later to maint).
+ (merge f5bcde6c58 es/tutorial-mention-asciidoc-early later to maint).
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 291b61e..d12094b 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -209,7 +209,7 @@ send them as replies to either an additional "cover letter" message
(see below), the first patch, or the respective preceding patch.
If your log message (including your name on the
-Signed-off-by line) is not writable in ASCII, make sure that
+`Signed-off-by` trailer) is not writable in ASCII, make sure that
you send off a message in the correct encoding.
WARNING: Be wary of your MUAs word-wrap
@@ -229,7 +229,7 @@ previously sent.
The `git format-patch` command follows the best current practice to
format the body of an e-mail message. At the beginning of the
patch should come your commit message, ending with the
-Signed-off-by: lines, and a line that consists of three dashes,
+`Signed-off-by` trailers, and a line that consists of three dashes,
followed by the diffstat information and the patch itself. If
you are forwarding a patch from somebody else, optionally, at
the beginning of the e-mail message just before the commit
@@ -290,25 +290,24 @@ identify them), to solicit comments and reviews.
:git-ml: footnote:[The mailing list: git@vger.kernel.org]
After the list reached a consensus that it is a good idea to apply the
-patch, re-send it with "To:" set to the maintainer{current-maintainer} and "cc:" the
-list{git-ml} for inclusion.
+patch, re-send it with "To:" set to the maintainer{current-maintainer}
+and "cc:" the list{git-ml} for inclusion. This is especially relevant
+when the maintainer did not heavily participate in the discussion and
+instead left the review to trusted others.
Do not forget to add trailers such as `Acked-by:`, `Reviewed-by:` and
`Tested-by:` lines as necessary to credit people who helped your
-patch.
+patch, and "cc:" them when sending such a final version for inclusion.
[[sign-off]]
-=== Certify your work by adding your "Signed-off-by: " line
+=== Certify your work by adding your `Signed-off-by` trailer
-To improve tracking of who did what, we've borrowed the
-"sign-off" procedure from the Linux kernel project on patches
-that are being emailed around. Although core Git is a lot
-smaller project it is a good discipline to follow it.
+To improve tracking of who did what, we ask you to certify that you
+wrote the patch or have the right to pass it on under the same license
+as ours, by "signing off" your patch. Without sign-off, we cannot
+accept your patches.
-The sign-off is a simple line at the end of the explanation for
-the patch, which certifies that you wrote it or otherwise have
-the right to pass it on as an open-source patch. The rules are
-pretty simple: if you can certify the below D-C-O:
+If you can certify the below D-C-O:
[[dco]]
.Developer's Certificate of Origin 1.1
@@ -338,23 +337,29 @@ d. I understand and agree that this project and the contribution
this project or the open source license(s) involved.
____
-then you just add a line saying
+you add a "Signed-off-by" trailer to your commit, that looks like
+this:
....
Signed-off-by: Random J Developer <random@developer.example.org>
....
-This line can be automatically added by Git if you run the git-commit
-command with the -s option.
+This line can be added by Git if you run the git-commit command with
+the -s option.
-Notice that you can place your own Signed-off-by: line when
+Notice that you can place your own `Signed-off-by` trailer when
forwarding somebody else's patch with the above rules for
D-C-O. Indeed you are encouraged to do so. Do not forget to
place an in-body "From: " line at the beginning to properly attribute
the change to its true author (see (2) above).
+This procedure originally came from the Linux kernel project, so our
+rule is quite similar to theirs, but what exactly it means to sign-off
+your patch differs from project to project, so it may be different
+from that of the project you are accustomed to.
+
[[real-name]]
-Also notice that a real name is used in the Signed-off-by: line. Please
+Also notice that a real name is used in the `Signed-off-by` trailer. Please
don't hide your real name.
[[commit-trailers]]
diff --git a/Documentation/config.txt b/Documentation/config.txt
index bf706b9..025ca4d 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -334,6 +334,8 @@ include::config/checkout.txt[]
include::config/clean.txt[]
+include::config/clone.txt[]
+
include::config/color.txt[]
include::config/column.txt[]
diff --git a/Documentation/config/advice.txt b/Documentation/config/advice.txt
index bdd37c3..acbd0c0 100644
--- a/Documentation/config/advice.txt
+++ b/Documentation/config/advice.txt
@@ -10,9 +10,8 @@ advice.*::
that the check is disabled.
pushUpdateRejected::
Set this variable to 'false' if you want to disable
- 'pushNonFFCurrent',
- 'pushNonFFMatching', 'pushAlreadyExists',
- 'pushFetchFirst', and 'pushNeedsForce'
+ 'pushNonFFCurrent', 'pushNonFFMatching', 'pushAlreadyExists',
+ 'pushFetchFirst', 'pushNeedsForce', and 'pushRefNeedsUpdate'
simultaneously.
pushNonFFCurrent::
Advice shown when linkgit:git-push[1] fails due to a
@@ -41,6 +40,10 @@ advice.*::
we can still suggest that the user push to either
refs/heads/* or refs/tags/* based on the type of the
source object.
+ pushRefNeedsUpdate::
+ Shown when linkgit:git-push[1] rejects a forced update of
+ a branch when its remote-tracking ref has updates that we
+ do not have locally.
statusAheadBehind::
Shown when linkgit:git-status[1] computes the ahead/behind
counts for a local ref compared to its remote tracking ref,
diff --git a/Documentation/config/checkout.txt b/Documentation/config/checkout.txt
index 6b64681..2cddf7b 100644
--- a/Documentation/config/checkout.txt
+++ b/Documentation/config/checkout.txt
@@ -1,18 +1,23 @@
checkout.defaultRemote::
- When you run 'git checkout <something>'
- or 'git switch <something>' and only have one
+ When you run `git checkout <something>`
+ or `git switch <something>` and only have one
remote, it may implicitly fall back on checking out and
- tracking e.g. 'origin/<something>'. This stops working as soon
- as you have more than one remote with a '<something>'
+ tracking e.g. `origin/<something>`. This stops working as soon
+ as you have more than one remote with a `<something>`
reference. This setting allows for setting the name of a
preferred remote that should always win when it comes to
disambiguation. The typical use-case is to set this to
`origin`.
+
Currently this is used by linkgit:git-switch[1] and
-linkgit:git-checkout[1] when 'git checkout <something>'
-or 'git switch <something>'
-will checkout the '<something>' branch on another remote,
-and by linkgit:git-worktree[1] when 'git worktree add' refers to a
+linkgit:git-checkout[1] when `git checkout <something>`
+or `git switch <something>`
+will checkout the `<something>` branch on another remote,
+and by linkgit:git-worktree[1] when `git worktree add` refers to a
remote branch. This setting might be used for other checkout-like
commands or functionality in the future.
+
+checkout.guess::
+ Provides the default value for the `--guess` or `--no-guess`
+ option in `git checkout` and `git switch`. See
+ linkgit:git-switch[1] and linkgit:git-checkout[1].
diff --git a/Documentation/config/clone.txt b/Documentation/config/clone.txt
new file mode 100644
index 0000000..47de36a
--- /dev/null
+++ b/Documentation/config/clone.txt
@@ -0,0 +1,4 @@
+clone.defaultRemoteName::
+ The name of the remote to create when cloning a repository. Defaults to
+ `origin`, and can be overridden by passing the `--origin` command-line
+ option to linkgit:git-clone[1].
diff --git a/Documentation/config/core.txt b/Documentation/config/core.txt
index 02002cf..160aaca 100644
--- a/Documentation/config/core.txt
+++ b/Documentation/config/core.txt
@@ -606,8 +606,8 @@ core.useReplaceRefs::
core.multiPackIndex::
Use the multi-pack-index file to track multiple packfiles using a
- single index. See link:technical/multi-pack-index.html[the
- multi-pack-index design document].
+ single index. See linkgit:git-multi-pack-index[1] for more
+ information. Defaults to true.
core.sparseCheckout::
Enable "sparse checkout" feature. See linkgit:git-sparse-checkout[1]
diff --git a/Documentation/config/format.txt b/Documentation/config/format.txt
index c2efd87..851bf41 100644
--- a/Documentation/config/format.txt
+++ b/Documentation/config/format.txt
@@ -79,7 +79,7 @@ format.thread::
format.signOff::
A boolean value which lets you enable the `-s/--signoff` option of
- format-patch by default. *Note:* Adding the Signed-off-by: line to a
+ format-patch by default. *Note:* Adding the `Signed-off-by` trailer to a
patch should be a conscious act and means that you certify you have
the rights to submit this work under the same open source license.
Please see the 'SubmittingPatches' document for further discussion.
diff --git a/Documentation/config/maintenance.txt b/Documentation/config/maintenance.txt
index 7cc6700..a0706d8 100644
--- a/Documentation/config/maintenance.txt
+++ b/Documentation/config/maintenance.txt
@@ -14,3 +14,21 @@ maintenance.commit-graph.auto::
reachable commits that are not in the commit-graph file is at least
the value of `maintenance.commit-graph.auto`. The default value is
100.
+
+maintenance.loose-objects.auto::
+ This integer config option controls how often the `loose-objects` task
+ should be run as part of `git maintenance run --auto`. If zero, then
+ the `loose-objects` task will not run with the `--auto` option. A
+ negative value will force the task to run every time. Otherwise, a
+ positive value implies the command should run when the number of
+ loose objects is at least the value of `maintenance.loose-objects.auto`.
+ The default value is 100.
+
+maintenance.incremental-repack.auto::
+ This integer config option controls how often the `incremental-repack`
+ task should be run as part of `git maintenance run --auto`. If zero,
+ then the `incremental-repack` task will not run with the `--auto`
+ option. A negative value will force the task to run every time.
+ Otherwise, a positive value implies the command should run when the
+ number of pack-files not in the multi-pack-index is at least the value
+ of `maintenance.incremental-repack.auto`. The default value is 10.
diff --git a/Documentation/config/push.txt b/Documentation/config/push.txt
index f5e5b38..21b256e 100644
--- a/Documentation/config/push.txt
+++ b/Documentation/config/push.txt
@@ -114,3 +114,9 @@ push.recurseSubmodules::
specifying '--recurse-submodules=check|on-demand|no'.
If not set, 'no' is used by default, unless 'submodule.recurse' is
set (in which case a 'true' value means 'on-demand').
+
+push.useForceIfIncludes::
+ If set to "true", it is equivalent to specifying
+ `--force-if-includes` as an option to linkgit:git-push[1]
+ in the command line. Adding `--no-force-if-includes` at the
+ time of push overrides this configuration setting.
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 3203040..c7f1f2f 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -690,6 +690,11 @@ endif::git-format-patch[]
--ignore-blank-lines::
Ignore changes whose lines are all blank.
+-I<regex>::
+--ignore-matching-lines=<regex>::
+ Ignore changes whose all lines match <regex>. This option may
+ be specified more than once.
+
--inter-hunk-context=<lines>::
Show the context between diff hunks, up to the specified number
of lines, thereby fusing hunks that are close to each other.
diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index 38c0852..06bc063 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -33,7 +33,7 @@ OPTIONS
-s::
--signoff::
- Add a `Signed-off-by:` line to the commit message, using
+ Add a `Signed-off-by` trailer to the commit message, using
the committer identity of yourself.
See the signoff option in linkgit:git-commit[1] for more information.
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index afa5c11..b1a6fe4 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -192,7 +192,10 @@ branches from there if `<branch>` is ambiguous but exists on the
'origin' remote. See also `checkout.defaultRemote` in
linkgit:git-config[1].
+
-Use `--no-guess` to disable this.
+`--guess` is the default behavior. Use `--no-guess` to disable it.
++
+The default behavior can be set via the `checkout.guess` configuration
+variable.
-l::
Create the new branch's reflog; see linkgit:git-branch[1] for
@@ -351,6 +354,10 @@ leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
<tree-ish>::
Tree to checkout from (when paths are given). If not specified,
the index will be used.
++
+As a special case, you may use `"A...B"` as a shortcut for the
+merge base of `A` and `B` if there is exactly one merge base. You can
+leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
\--::
Do not interpret any more arguments as options.
diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
index 75feeef..5d75031 100644
--- a/Documentation/git-cherry-pick.txt
+++ b/Documentation/git-cherry-pick.txt
@@ -104,7 +104,7 @@ effect to your index in a row.
-s::
--signoff::
- Add Signed-off-by line at the end of the commit message.
+ Add a `Signed-off-by` trailer at the end of the commit message.
See the signoff option in linkgit:git-commit[1] for more information.
-S[<keyid>]::
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 097e6a8..876aedc 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -183,8 +183,9 @@ objects from the source repository into a pack in the cloned repository.
-o <name>::
--origin <name>::
- Instead of using the remote name `origin` to keep track
- of the upstream repository, use `<name>`.
+ Instead of using the remote name `origin` to keep track of the upstream
+ repository, use `<name>`. Overrides `clone.defaultRemoteName` from the
+ config.
-b <name>::
--branch <name>::
diff --git a/Documentation/git-commit-graph.txt b/Documentation/git-commit-graph.txt
index de6b6de..e1f48c9 100644
--- a/Documentation/git-commit-graph.txt
+++ b/Documentation/git-commit-graph.txt
@@ -39,7 +39,9 @@ COMMANDS
--------
'write'::
-Write a commit-graph file based on the commits found in packfiles.
+Write a commit-graph file based on the commits found in packfiles. If
+the config option `core.commitGraph` is disabled, then this command will
+output a warning, then return success without writing a commit-graph file.
+
With the `--stdin-packs` option, generate the new commit graph by
walking objects only in the specified pack-indexes. (Cannot be combined
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index a3baea3..17150fa 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -59,6 +59,7 @@ commit by giving the same set of parameters (options and paths).
If you make a commit and then find a mistake immediately after
that, you can recover from it with 'git reset'.
+:git-commit: 1
OPTIONS
-------
@@ -163,14 +164,7 @@ The `-m` option is mutually exclusive with `-c`, `-C`, and `-F`.
message, the commit is aborted. This has no effect when a message
is given by other means, e.g. with the `-m` or `-F` options.
--s::
---signoff::
- Add Signed-off-by line by the committer at the end of the commit
- log message. The meaning of a signoff depends on the project,
- but it typically certifies that committer has
- the rights to submit this work under the same license and
- agrees to a Developer Certificate of Origin
- (see http://developercertificate.org/ for more information).
+include::signoff-option.txt[]
-n::
--no-verify::
diff --git a/Documentation/git-diff-index.txt b/Documentation/git-diff-index.txt
index f4bd815..27acb31 100644
--- a/Documentation/git-diff-index.txt
+++ b/Documentation/git-diff-index.txt
@@ -9,7 +9,7 @@ git-diff-index - Compare a tree to the working tree or index
SYNOPSIS
--------
[verse]
-'git diff-index' [-m] [--cached] [<common diff options>] <tree-ish> [<path>...]
+'git diff-index' [-m] [--cached] [--merge-base] [<common diff options>] <tree-ish> [<path>...]
DESCRIPTION
-----------
@@ -27,7 +27,12 @@ include::diff-options.txt[]
The id of a tree object to diff against.
--cached::
- do not consider the on-disk file at all
+ Do not consider the on-disk file at all.
+
+--merge-base::
+ Instead of comparing <tree-ish> directly, use the merge base
+ between <tree-ish> and HEAD instead. <tree-ish> must be a
+ commit.
-m::
By default, files recorded in the index but not checked
diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt
index 5c8a2a5..2fc24c5 100644
--- a/Documentation/git-diff-tree.txt
+++ b/Documentation/git-diff-tree.txt
@@ -10,7 +10,7 @@ SYNOPSIS
--------
[verse]
'git diff-tree' [--stdin] [-m] [-s] [-v] [--no-commit-id] [--pretty]
- [-t] [-r] [-c | --cc] [--combined-all-paths] [--root]
+ [-t] [-r] [-c | --cc] [--combined-all-paths] [--root] [--merge-base]
[<common diff options>] <tree-ish> [<tree-ish>] [<path>...]
DESCRIPTION
@@ -43,6 +43,11 @@ include::diff-options.txt[]
When `--root` is specified the initial commit will be shown as a big
creation event. This is equivalent to a diff against the NULL tree.
+--merge-base::
+ Instead of comparing the <tree-ish>s directly, use the merge
+ base between the two <tree-ish>s as the "before" side. There
+ must be two <tree-ish>s given and they must both be commits.
+
--stdin::
When `--stdin` is specified, the command does not take
<tree-ish> arguments from the command line. Instead, it
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index 727f24d..7f4c8a8 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -10,8 +10,8 @@ SYNOPSIS
--------
[verse]
'git diff' [<options>] [<commit>] [--] [<path>...]
-'git diff' [<options>] --cached [<commit>] [--] [<path>...]
-'git diff' [<options>] <commit> [<commit>...] <commit> [--] [<path>...]
+'git diff' [<options>] --cached [--merge-base] [<commit>] [--] [<path>...]
+'git diff' [<options>] [--merge-base] <commit> [<commit>...] <commit> [--] [<path>...]
'git diff' [<options>] <commit>...<commit> [--] [<path>...]
'git diff' [<options>] <blob> <blob>
'git diff' [<options>] --no-index [--] <path> <path>
@@ -40,7 +40,7 @@ files on disk.
or when running the command outside a working tree
controlled by Git. This form implies `--exit-code`.
-'git diff' [<options>] --cached [<commit>] [--] [<path>...]::
+'git diff' [<options>] --cached [--merge-base] [<commit>] [--] [<path>...]::
This form is to view the changes you staged for the next
commit relative to the named <commit>. Typically you
@@ -49,6 +49,10 @@ files on disk.
If HEAD does not exist (e.g. unborn branches) and
<commit> is not given, it shows all staged changes.
--staged is a synonym of --cached.
++
+If --merge-base is given, instead of using <commit>, use the merge base
+of <commit> and HEAD. `git diff --merge-base A` is equivalent to
+`git diff $(git merge-base A HEAD)`.
'git diff' [<options>] <commit> [--] [<path>...]::
@@ -58,23 +62,27 @@ files on disk.
branch name to compare with the tip of a different
branch.
-'git diff' [<options>] <commit> <commit> [--] [<path>...]::
+'git diff' [<options>] [--merge-base] <commit> <commit> [--] [<path>...]::
This is to view the changes between two arbitrary
<commit>.
++
+If --merge-base is given, use the merge base of the two commits for the
+"before" side. `git diff --merge-base A B` is equivalent to
+`git diff $(git merge-base A B) B`.
'git diff' [<options>] <commit> <commit>... <commit> [--] [<path>...]::
This form is to view the results of a merge commit. The first
listed <commit> must be the merge itself; the remaining two or
more commits should be its parents. A convenient way to produce
- the desired set of revisions is to use the {caret}@ suffix.
+ the desired set of revisions is to use the `^@` suffix.
For instance, if `master` names a merge commit, `git diff master
master^@` gives the same combined diff as `git show master`.
'git diff' [<options>] <commit>..<commit> [--] [<path>...]::
- This is synonymous to the earlier form (without the "..") for
+ This is synonymous to the earlier form (without the `..`) for
viewing the changes between two arbitrary <commit>. If <commit> on
one side is omitted, it will have the same effect as
using HEAD instead.
@@ -83,20 +91,20 @@ files on disk.
This form is to view the changes on the branch containing
and up to the second <commit>, starting at a common ancestor
- of both <commit>. "git diff A\...B" is equivalent to
- "git diff $(git merge-base A B) B". You can omit any one
+ of both <commit>. `git diff A...B` is equivalent to
+ `git diff $(git merge-base A B) B`. You can omit any one
of <commit>, which has the same effect as using HEAD instead.
Just in case you are doing something exotic, it should be
noted that all of the <commit> in the above description, except
-in the last two forms that use ".." notations, can be any
-<tree>.
+in the `--merge-base` case and in the last two forms that use `..`
+notations, can be any <tree>.
For a more complete list of ways to spell <commit>, see
"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
However, "diff" is about comparing two _endpoints_, not ranges,
-and the range notations ("<commit>..<commit>" and
-"<commit>\...<commit>") do not mean a range as defined in the
+and the range notations (`<commit>..<commit>` and
+`<commit>...<commit>`) do not mean a range as defined in the
"SPECIFYING RANGES" section in linkgit:gitrevisions[7].
'git diff' [<options>] <blob> <blob>::
@@ -144,9 +152,9 @@ $ git diff HEAD <3>
+
<1> Changes in the working tree not yet staged for the next commit.
<2> Changes between the index and your last commit; what you
- would be committing if you run "git commit" without "-a" option.
+ would be committing if you run `git commit` without `-a` option.
<3> Changes in the working tree since your last commit; what you
- would be committing if you run "git commit -a"
+ would be committing if you run `git commit -a`
Comparing with arbitrary commits::
+
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index 0f81d04..bf1bb40 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -119,7 +119,7 @@ include::diff-options.txt[]
-s::
--signoff::
- Add `Signed-off-by:` line to the commit message, using
+ Add a `Signed-off-by` trailer to the commit message, using
the committer identity of yourself.
See the signoff option in linkgit:git-commit[1] for more information.
diff --git a/Documentation/git-maintenance.txt b/Documentation/git-maintenance.txt
index 6abcb82..3f5d894 100644
--- a/Documentation/git-maintenance.txt
+++ b/Documentation/git-maintenance.txt
@@ -47,6 +47,21 @@ commit-graph::
`commit-graph-chain` file. They will be deleted by a later run based
on the expiration delay.
+prefetch::
+ The `prefetch` task updates the object directory with the latest
+ objects from all registered remotes. For each remote, a `git fetch`
+ command is run. The refmap is custom to avoid updating local or remote
+ branches (those in `refs/heads` or `refs/remotes`). Instead, the
+ remote refs are stored in `refs/prefetch/<remote>/`. Also, tags are
+ not updated.
++
+This is done to avoid disrupting the remote-tracking branches. The end users
+expect these refs to stay unmoved unless they initiate a fetch. With prefetch
+task, however, the objects necessary to complete a later real fetch would
+already be obtained, so the real fetch would go faster. In the ideal case,
+it will just become an update to bunch of remote-tracking branches without
+any object transfer.
+
gc::
Clean up unnecessary files and optimize the local repository. "GC"
stands for "garbage collection," but this task performs many
@@ -55,6 +70,39 @@ gc::
be disruptive in some situations, as it deletes stale data. See
linkgit:git-gc[1] for more details on garbage collection in Git.
+loose-objects::
+ The `loose-objects` job cleans up loose objects and places them into
+ pack-files. In order to prevent race conditions with concurrent Git
+ commands, it follows a two-step process. First, it deletes any loose
+ objects that already exist in a pack-file; concurrent Git processes
+ will examine the pack-file for the object data instead of the loose
+ object. Second, it creates a new pack-file (starting with "loose-")
+ containing a batch of loose objects. The batch size is limited to 50
+ thousand objects to prevent the job from taking too long on a
+ repository with many loose objects. The `gc` task writes unreachable
+ objects as loose objects to be cleaned up by a later step only if
+ they are not re-added to a pack-file; for this reason it is not
+ advisable to enable both the `loose-objects` and `gc` tasks at the
+ same time.
+
+incremental-repack::
+ The `incremental-repack` job repacks the object directory
+ using the `multi-pack-index` feature. In order to prevent race
+ conditions with concurrent Git commands, it follows a two-step
+ process. First, it calls `git multi-pack-index expire` to delete
+ pack-files unreferenced by the `multi-pack-index` file. Second, it
+ calls `git multi-pack-index repack` to select several small
+ pack-files and repack them into a bigger one, and then update the
+ `multi-pack-index` entries that refer to the small pack-files to
+ refer to the new pack-file. This prepares those small pack-files
+ for deletion upon the next run of `git multi-pack-index expire`.
+ The selection of the small pack-files is such that the expected
+ size of the big pack-file is at least the batch size; see the
+ `--batch-size` option for the `repack` subcommand in
+ linkgit:git-multi-pack-index[1]. The default batch-size is zero,
+ which is a special case that attempts to repack all pack-files
+ into a single pack-file.
+
OPTIONS
-------
--auto::
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 3b80534..ab103c8 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -13,7 +13,7 @@ SYNOPSIS
[--repo=<repository>] [-f | --force] [-d | --delete] [--prune] [-v | --verbose]
[-u | --set-upstream] [-o <string> | --push-option=<string>]
[--[no-]signed|--signed=(true|false|if-asked)]
- [--force-with-lease[=<refname>[:<expect>]]]
+ [--force-with-lease[=<refname>[:<expect>]] [--force-if-includes]]
[--no-verify] [<repository> [<refspec>...]]
DESCRIPTION
@@ -320,6 +320,14 @@ seen and are willing to overwrite, then rewrite history, and finally
force push changes to `master` if the remote version is still at
`base`, regardless of what your local `remotes/origin/master` has been
updated to in the background.
++
+Alternatively, specifying `--force-if-includes` as an ancillary option
+along with `--force-with-lease[=<refname>]` (i.e., without saying what
+exact commit the ref on the remote side must be pointing at, or which
+refs on the remote side are being protected) at the time of "push" will
+verify if updates from the remote-tracking refs that may have been
+implicitly updated in the background are integrated locally before
+allowing a forced update.
-f::
--force::
@@ -341,6 +349,22 @@ one branch, use a `+` in front of the refspec to push (e.g `git push
origin +master` to force a push to the `master` branch). See the
`<refspec>...` section above for details.
+--[no-]force-if-includes::
+ Force an update only if the tip of the remote-tracking ref
+ has been integrated locally.
++
+This option enables a check that verifies if the tip of the
+remote-tracking ref is reachable from one of the "reflog" entries of
+the local branch based in it for a rewrite. The check ensures that any
+updates from the remote have been incorporated locally by rejecting the
+forced update if that is not the case.
++
+If the option is passed without specifying `--force-with-lease`, or
+specified along with `--force-with-lease=<refname>:<expect>`, it is
+a "no-op".
++
+Specifying `--no-force-if-includes` disables this behavior.
+
--repo=<repository>::
This option is equivalent to the <repository> argument. If both
are specified, the command-line argument takes precedence.
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 38e1548..a0487b5 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -496,7 +496,7 @@ See also INCOMPATIBLE OPTIONS below.
See also INCOMPATIBLE OPTIONS below.
--signoff::
- Add a Signed-off-by: trailer to all the rebased commits. Note
+ Add a `Signed-off-by` trailer to all the rebased commits. Note
that if `--interactive` is given then only commits marked to be
picked, edited or reworded will have the trailer added.
+
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index ea73386..31c29c9 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -203,6 +203,17 @@ The remote configuration is achieved using the `remote.origin.url` and
`remote.origin.fetch` configuration variables. (See
linkgit:git-config[1]).
+EXIT STATUS
+-----------
+
+On success, the exit status is `0`.
+
+When subcommands such as 'add', 'rename', and 'remove' can't find the
+remote in question, the exit status is `2`. When the remote already
+exists, the exit status is `3`.
+
+On any other error, the exit status may be any other non-zero value.
+
EXAMPLES
--------
diff --git a/Documentation/git-restore.txt b/Documentation/git-restore.txt
index 84c6c40..55bde91 100644
--- a/Documentation/git-restore.txt
+++ b/Documentation/git-restore.txt
@@ -40,6 +40,10 @@ OPTIONS
+
If not specified, the contents are restored from `HEAD` if `--staged` is
given, otherwise from the index.
++
+As a special case, you may use `"A...B"` as a shortcut for the
+merge base of `A` and `B` if there is exactly one merge base. You can
+leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
-p::
--patch::
diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt
index 044276e..bb92a4a 100644
--- a/Documentation/git-revert.txt
+++ b/Documentation/git-revert.txt
@@ -99,7 +99,7 @@ effect to your index in a row.
-s::
--signoff::
- Add Signed-off-by line at the end of the commit message.
+ Add a `Signed-off-by` trailer at the end of the commit message.
See the signoff option in linkgit:git-commit[1] for more information.
--strategy=<strategy>::
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index 0a69810..b7bbbea 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -313,7 +313,7 @@ Automating
the value of `sendemail.identity`.
--[no-]signed-off-by-cc::
- If this is set, add emails found in Signed-off-by: or Cc: lines to the
+ If this is set, add emails found in the `Signed-off-by` trailer or Cc: lines to the
cc list. Default is the value of `sendemail.signedoffbycc` configuration
value; if that is unspecified, default to --signed-off-by-cc.
@@ -340,7 +340,7 @@ Automating
except for self (use 'self' for that).
- 'bodycc' will avoid including anyone mentioned in Cc lines in the
patch body (commit message) except for self (use 'self' for that).
-- 'sob' will avoid including anyone mentioned in Signed-off-by lines except
+- 'sob' will avoid including anyone mentioned in the Signed-off-by trailers except
for self (use 'self' for that).
- 'misc-by' will avoid including anyone mentioned in Acked-by,
Reviewed-by, Tested-by and other "-by" lines in the patch body,
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 6624a14..67b143c 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -701,7 +701,7 @@ creating the branch or tag.
--use-log-author::
When retrieving svn commits into Git (as part of 'fetch', 'rebase', or
- 'dcommit' operations), look for the first `From:` or `Signed-off-by:` line
+ 'dcommit' operations), look for the first `From:` line or `Signed-off-by` trailer
in the log message and use that as the author string.
+
[verse]
@@ -710,7 +710,7 @@ config key: svn.useLogAuthor
--add-author-from::
When committing to svn from Git (as part of 'set-tree' or 'dcommit'
operations), if the existing log message doesn't already have a
- `From:` or `Signed-off-by:` line, append a `From:` line based on the
+ `From:` or `Signed-off-by` trailer, append a `From:` line based on the
Git commit's author string. If you use this, then `--use-log-author`
will retrieve a valid author string for all commits.
+
diff --git a/Documentation/git-switch.txt b/Documentation/git-switch.txt
index 3759c3a..5c438cd 100644
--- a/Documentation/git-switch.txt
+++ b/Documentation/git-switch.txt
@@ -103,6 +103,9 @@ ambiguous but exists on the 'origin' remote. See also
`checkout.defaultRemote` in linkgit:git-config[1].
+
`--guess` is the default behavior. Use `--no-guess` to disable it.
++
+The default behavior can be set via the `checkout.guess` configuration
+variable.
-f::
--force::
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 32e8440..af06128 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -96,8 +96,9 @@ list::
List details of each working tree. The main working tree is listed first,
followed by each of the linked working trees. The output details include
-whether the working tree is bare, the revision currently checked out, and the
-branch currently checked out (or "detached HEAD" if none).
+whether the working tree is bare, the revision currently checked out, the
+branch currently checked out (or "detached HEAD" if none), and "locked" if
+the worktree is locked.
lock::
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 2d0a037..e84e104 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -802,6 +802,9 @@ patterns are available:
- `ada` suitable for source code in the Ada language.
+- `bash` suitable for source code in the Bourne-Again SHell language.
+ Covers a superset of POSIX shell function definitions.
+
- `bibtex` suitable for files with BibTeX coded references.
- `cpp` suitable for source code in the C and C++ languages.
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 6e461ac..4e097dc 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -164,7 +164,7 @@ can also be used to refuse the commit after inspecting the message
file.
The default 'commit-msg' hook, when enabled, detects duplicate
-"Signed-off-by" lines, and aborts the commit if one is found.
+`Signed-off-by` trailers, and aborts the commit if one is found.
post-commit
~~~~~~~~~~~
diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt
index 80d4831..eb0aabd 100644
--- a/Documentation/merge-options.txt
+++ b/Documentation/merge-options.txt
@@ -77,16 +77,7 @@ When not possible, refuse to merge and exit with a non-zero status.
With --no-log do not list one-line descriptions from the
actual commits being merged.
---signoff::
---no-signoff::
- Add Signed-off-by line by the committer at the end of the commit
- log message. The meaning of a signoff depends on the project,
- but it typically certifies that committer has
- the rights to submit this work under the same license and
- agrees to a Developer Certificate of Origin
- (see http://developercertificate.org/ for more information).
-+
-With --no-signoff do not add a Signed-off-by line.
+include::signoff-option.txt[]
--stat::
-n::
diff --git a/Documentation/signoff-option.txt b/Documentation/signoff-option.txt
new file mode 100644
index 0000000..12aa233
--- /dev/null
+++ b/Documentation/signoff-option.txt
@@ -0,0 +1,18 @@
+ifdef::git-commit[]
+-s::
+endif::git-commit[]
+--signoff::
+--no-signoff::
+ Add a `Signed-off-by` trailer by the committer at the end of the commit
+ log message. The meaning of a signoff depends on the project
+ to which you're committing. For example, it may certify that
+ the committer has the rights to submit the work under the
+ project's license or agrees to some contributor representation,
+ such as a Developer Certificate of Origin.
+ (See http://developercertificate.org for the one used by the
+ Linux kernel and Git projects.) Consult the documentation or
+ leadership of the project to which you're contributing to
+ understand how the signoffs are used in that project.
++
+The --no-signoff option can be used to countermand an earlier --signoff
+option on the command line.
diff --git a/Documentation/technical/directory-rename-detection.txt b/Documentation/technical/directory-rename-detection.txt
index 844629c..49b83ef 100644
--- a/Documentation/technical/directory-rename-detection.txt
+++ b/Documentation/technical/directory-rename-detection.txt
@@ -18,7 +18,8 @@ It is perhaps easiest to start with an example:
More interesting possibilities exist, though, such as:
* one side of history renames x -> z, and the other renames some file to
- x/e, causing the need for the merge to do a transitive rename.
+ x/e, causing the need for the merge to do a transitive rename so that
+ the rename ends up at z/e.
* one side of history renames x -> z, but also renames all files within x.
For example, x/a -> z/alpha, x/b -> z/bravo, etc.
@@ -35,7 +36,7 @@ More interesting possibilities exist, though, such as:
directory itself contained inner directories that were renamed to yet
other locations).
- * combinations of the above; see t/t6043-merge-rename-directories.sh for
+ * combinations of the above; see t/t6423-merge-rename-directories.sh for
various interesting cases.
Limitations -- applicability of directory renames
@@ -62,19 +63,19 @@ directory rename detection applies:
Limitations -- detailed rules and testcases
-------------------------------------------
-t/t6043-merge-rename-directories.sh contains extensive tests and commentary
+t/t6423-merge-rename-directories.sh contains extensive tests and commentary
which generate and explore the rules listed above. It also lists a few
additional rules:
a) If renames split a directory into two or more others, the directory
with the most renames, "wins".
- b) Avoid directory-rename-detection for a path, if that path is the
- source of a rename on either side of a merge.
-
- c) Only apply implicit directory renames to directories if the other side
+ b) Only apply implicit directory renames to directories if the other side
of history is the one doing the renaming.
+ c) Do not perform directory rename detection for directories which had no
+ new paths added to them.
+
Limitations -- support in different commands
--------------------------------------------