diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/RelNotes/2.15.1.txt | 14 | ||||
-rw-r--r-- | Documentation/RelNotes/2.16.0.txt | 85 | ||||
-rw-r--r-- | Documentation/config.txt | 1 | ||||
-rw-r--r-- | Documentation/diff-options.txt | 3 | ||||
-rw-r--r-- | Documentation/git-add.txt | 9 | ||||
-rw-r--r-- | Documentation/git-branch.txt | 10 | ||||
-rw-r--r-- | Documentation/git-checkout.txt | 2 | ||||
-rw-r--r-- | Documentation/git-config.txt | 5 | ||||
-rw-r--r-- | Documentation/git-merge-base.txt | 64 | ||||
-rw-r--r-- | Documentation/gitattributes.txt | 6 | ||||
-rw-r--r-- | Documentation/merge-strategies.txt | 5 |
11 files changed, 178 insertions, 26 deletions
diff --git a/Documentation/RelNotes/2.15.1.txt b/Documentation/RelNotes/2.15.1.txt index 47f23b56fe..ec06704e63 100644 --- a/Documentation/RelNotes/2.15.1.txt +++ b/Documentation/RelNotes/2.15.1.txt @@ -13,7 +13,7 @@ Fixes since v2.15 latter, which has been fixed. * The experimental "color moved lines differently in diff output" - feature was buggy around "ignore whitespace changes" edges, whihch + feature was buggy around "ignore whitespace changes" edges, which has been corrected. * Instead of using custom line comparison and hashing functions to @@ -24,7 +24,7 @@ Fixes since v2.15 HEAD points at, which have been fixed. * "git commit", after making a commit, did not check for errors when - asking on what branch it made the commit, which has been correted. + asking on what branch it made the commit, which has been corrected. * "git status --ignored -u" did not stop at a working tree of a separate project that is embedded in an ignored directory and @@ -35,7 +35,7 @@ Fixes since v2.15 --recurse-submodules" has been fixed. * A recent regression in "git rebase -i" that broke execution of git - commands from subdirectories via "exec" insn has been fixed. + commands from subdirectories via "exec" instruction has been fixed. * "git check-ref-format --branch @{-1}" bit a "BUG()" when run outside a repository for obvious reasons; clarify the documentation @@ -76,5 +76,13 @@ Fixes since v2.15 * We used to add an empty alternate object database to the system that does not help anything; it has been corrected. + * Error checking in "git imap-send" for empty response has been + improved. + + * An ancient bug in "git apply --ignore-space-change" codepath has + been fixed. + + * There was a recent semantic mismerge in the codepath to write out a + section of a configuration section, which has been corrected. Also contains various documentation updates and code clean-ups. diff --git a/Documentation/RelNotes/2.16.0.txt b/Documentation/RelNotes/2.16.0.txt index f57acec735..c617e37dd8 100644 --- a/Documentation/RelNotes/2.16.0.txt +++ b/Documentation/RelNotes/2.16.0.txt @@ -66,6 +66,30 @@ UI, Workflows & Features * We learned to talk to watchman to speed up "git status" and other operations that need to see which paths have been modified. + * The "diff" family of commands learned to ignore differences in + carriage return at the end of line. + + * Places that know about "sendemail.to", like documentation and shell + completion (in contrib/) have been taught about "sendemail.tocmd", + too. + + * "git add --renormalize ." is a new and safer way to record the fact + that you are correcting the end-of-line convention and other + "convert_to_git()" glitches in the in-repository data. + + * "git branch" and "git checkout -b" are now forbidden from creating + a branch whose name is "HEAD". + + * "git branch --list" learned to show its output through the pager by + default when the output is going to a terminal, which is controlled + by the pager.branch configuration variable. This is similar to a + recent change to "git tag --list". + + * "git grep -W", "git diff -W" and their friends learned a heuristic + to extend a pre-context beyond the line that matches the "function + pattern" (aka "diff.*.xfuncname") to include a comment block, if + exists, that immediately precedes it. + Performance, Internal Implementation, Development Support etc. @@ -119,7 +143,7 @@ Fixes since v2.15 latter, which has been fixed. * The experimental "color moved lines differently in diff output" - feature was buggy around "ignore whitespace changes" edges, whihch + feature was buggy around "ignore whitespace changes" edges, which has been corrected. * Instead of using custom line comparison and hashing functions to @@ -130,7 +154,7 @@ Fixes since v2.15 HEAD points at, which have been fixed. * "git commit", after making a commit, did not check for errors when - asking on what branch it made the commit, which has been correted. + asking on what branch it made the commit, which has been corrected. * "git status --ignored -u" did not stop at a working tree of a separate project that is embedded in an ignored directory and @@ -141,7 +165,7 @@ Fixes since v2.15 --recurse-submodules" has been fixed. * A recent regression in "git rebase -i" that broke execution of git - commands from subdirectories via "exec" insn has been fixed. + commands from subdirectories via "exec" instruction has been fixed. * A (possibly flakey) test fix. @@ -178,7 +202,6 @@ Fixes since v2.15 * Error checking in "git imap-send" for empty response has been improved. - (merge 618ec81abb rs/imap-send-next-arg-fix later to maint). * Recent update to the refs infrastructure implementation started rewriting packed-refs file more often than before; this has been @@ -198,11 +221,57 @@ Fixes since v2.15 that does not help anything; it has been corrected. * Doc update around use of "format-patch --subject-prefix" etc. - (merge f6be7edcac ad/submitting-patches-title-decoration later to maint). * A fix for an ancient bug in "git apply --ignore-space-change" codepath. - (merge 6ce15ce576 rs/apply-fuzzy-match-fix later to maint). + + * Clarify and enhance documentation for "merge-base --fork-point", as + it was clear what it computed but not why/what for. + (merge 6d1700b8af jc/merge-base-fork-point-doc later to maint). + + * A few scripts (both in production and tests) incorrectly redirected + their error output. These have been corrected. + (merge eadf1c8f45 tz/redirect-fix later to maint). + + * "git notes" sent its error message to its standard output stream, + which was corrected. + (merge 89b9e31dd5 tz/notes-error-to-stderr later to maint). + + * The three-way merge performed by "git cherry-pick" was confused + when a new submodule was added in the meantime, which has been + fixed (or "papered over"). + (merge c641ca6707 sb/test-cherry-pick-submodule-getting-in-a-way later to maint). + + * The sequencer machinery (used by "git cherry-pick A..B", and "git + rebase -i", among other things) would have lost a commit if stopped + due to an unlockable index file, which has been fixed. + (merge bd58886775 pw/sequencer-recover-from-unlockable-index later to maint). + + * "git apply --inaccurate-eof" when used with "--ignore-space-change" + triggered an internal sanity check, which has been fixed. + (merge 4855de1233 rs/apply-inaccurate-eof-with-incomplete-line later to maint). + + * Command line completion (in contrib/) has been taught about the + "--copy" option of "git branch". + (merge 41ca0f773e tz/complete-branch-copy later to maint). + + * When "git rebase" prepared an mailbox of changes and fed it to "git + am" to replay them, it was confused when a stray "From " happened + to be in the log message of one of the replayed changes. This has + been corrected. + (merge ae3b2b04bb ew/rebase-mboxrd later to maint). + + * There was a recent semantic mismerge in the codepath to write out a + section of a configuration section, which has been corrected. + + * Mentions of "git-rebase" and "git-am" (dashed form) still remained + in end-user visible strings emitted by the "git rebase" command; + they have been corrected. + (merge 82cb775c06 ks/rebase-no-git-foo later to maint). + + * Contrary to the documentation, "git pull -4/-6 other-args" did not + ask the underlying "git fetch" to go over IPv4/IPv6, which has been + corrected. + (merge ffb4568afe sw/pull-ipv46-passthru later to maint). * Other minor doc, test and build updates and code cleanups. - (merge f4e45cb3eb ma/bisect-leakfix later to maint). - (merge 4da72644b7 ma/reduce-heads-leakfix later to maint). + (merge c5e3bc6ec4 sd/branch-copy later to maint). diff --git a/Documentation/config.txt b/Documentation/config.txt index 5f65fa9234..531649cb40 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -3007,6 +3007,7 @@ sendemail.smtpPass:: sendemail.suppresscc:: sendemail.suppressFrom:: sendemail.to:: +sendemail.tocmd:: sendemail.smtpDomain:: sendemail.smtpServer:: sendemail.smtpServerPort:: diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index dd0dba5b1d..3c93c21683 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -557,6 +557,9 @@ endif::git-format-patch[] --text:: Treat all files as text. +--ignore-cr-at-eol:: + Ignore carrige-return at the end of line when doing a comparison. + --ignore-space-at-eol:: Ignore changes in whitespace at EOL. diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index b700beaff5..d50fa339dc 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -10,7 +10,7 @@ SYNOPSIS [verse] 'git add' [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p] [--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]] - [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing] + [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing] [--renormalize] [--chmod=(+|-)x] [--] [<pathspec>...] DESCRIPTION @@ -175,6 +175,13 @@ for "git add --no-all <pathspec>...", i.e. ignored removed files. warning (e.g., if you are manually performing operations on submodules). +--renormalize:: + Apply the "clean" process freshly to all tracked files to + forcibly add them again to the index. This is useful after + changing `core.autocrlf` configuration or the `text` attribute + in order to correct files added with wrong CRLF/LF line endings. + This option implies `-u`. + --chmod=(+|-)x:: Override the executable bit of the added files. The executable bit is only changed in the index, the files on disk are left diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index d6587c5e96..b3084c99c1 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -14,7 +14,7 @@ SYNOPSIS [(--merged | --no-merged) [<commit>]] [--contains [<commit]] [--no-contains [<commit>]] [--points-at <object>] [--format=<format>] [<pattern>...] -'git branch' [--set-upstream | --track | --no-track] [-l] [-f] <branchname> [<start-point>] +'git branch' [--track | --no-track] [-l] [-f] <branchname> [<start-point>] 'git branch' (--set-upstream-to=<upstream> | -u <upstream>) [<branchname>] 'git branch' --unset-upstream [<branchname>] 'git branch' (-m | -M) [<oldbranch>] <newbranch> @@ -86,7 +86,7 @@ OPTIONS --delete:: Delete a branch. The branch must be fully merged in its upstream branch, or in `HEAD` if no upstream was set with - `--track` or `--set-upstream`. + `--track` or `--set-upstream-to`. -D:: Shortcut for `--delete --force`. @@ -281,6 +281,12 @@ start-point is either a local or remote-tracking branch. and the object it points at. The format is the same as that of linkgit:git-for-each-ref[1]. +CONFIGURATION +------------- +`pager.branch` is only respected when listing branches, i.e., when +`--list` is used or implied. The default is to use a pager. +See linkgit:git-config[1]. + Examples -------- diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index e108b0f74b..bfa64ca5c9 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -264,6 +264,8 @@ section of linkgit:git-add[1] to learn how to operate the `--patch` mode. local modifications in a submodule would be overwritten the checkout will fail unless `-f` is used. If nothing (or --no-recurse-submodules) is used, the work trees of submodules will not be updated. + Just like linkgit:git-submodule[1], this will detach the + submodules HEAD. <branch>:: Branch to checkout; if it refers to a branch (i.e., a name that, diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index 4edd09fc6b..14da5fc157 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@ -180,6 +180,11 @@ See also <<FILES>>. value (but you can use `git config section.variable ~/` from the command line to let your shell do the expansion). +--expiry-date:: + `git config` will ensure that the output is converted from + a fixed or relative date-string to a timestamp. This option + has no effect when setting the value. + -z:: --null:: For all options that output values and/or keys, always diff --git a/Documentation/git-merge-base.txt b/Documentation/git-merge-base.txt index b968b64c38..502e00ec35 100644 --- a/Documentation/git-merge-base.txt +++ b/Documentation/git-merge-base.txt @@ -154,23 +154,71 @@ topic origin/master`, the history of remote-tracking branch `origin/master` may have been rewound and rebuilt, leading to a history of this shape: - o---B1 + o---B2 / - ---o---o---B2--o---o---o---B (origin/master) + ---o---o---B1--o---o---o---B (origin/master) \ - B3 + B0 \ - Derived (topic) + D0---D1---D (topic) -where `origin/master` used to point at commits B3, B2, B1 and now it +where `origin/master` used to point at commits B0, B1, B2 and now it points at B, and your `topic` branch was started on top of it back -when `origin/master` was at B3. This mode uses the reflog of -`origin/master` to find B3 as the fork point, so that the `topic` -can be rebased on top of the updated `origin/master` by: +when `origin/master` was at B0, and you built three commits, D0, D1, +and D, on top of it. Imagine that you now want to rebase the work +you did on the topic on top of the updated origin/master. + +In such a case, `git merge-base origin/master topic` would return the +parent of B0 in the above picture, but B0^..D is *not* the range of +commits you would want to replay on top of B (it includes B0, which +is not what you wrote; it is a commit the other side discarded when +it moved its tip from B0 to B1). + +`git merge-base --fork-point origin/master topic` is designed to +help in such a case. It takes not only B but also B0, B1, and B2 +(i.e. old tips of the remote-tracking branches your repository's +reflog knows about) into account to see on which commit your topic +branch was built and finds B0, allowing you to replay only the +commits on your topic, excluding the commits the other side later +discarded. + +Hence $ fork_point=$(git merge-base --fork-point origin/master topic) + +will find B0, and + $ git rebase --onto origin/master $fork_point topic +will replay D0, D1 and D on top of B to create a new history of this +shape: + + o---B2 + / + ---o---o---B1--o---o---o---B (origin/master) + \ \ + B0 D0'--D1'--D' (topic - updated) + \ + D0---D1---D (topic - old) + +A caveat is that older reflog entries in your repository may be +expired by `git gc`. If B0 no longer appears in the reflog of the +remote-tracking branch `origin/master`, the `--fork-point` mode +obviously cannot find it and fails, avoiding to give a random and +useless result (such as the parent of B0, like the same command +without the `--fork-point` option gives). + +Also, the remote-tracking branch you use the `--fork-point` mode +with must be the one your topic forked from its tip. If you forked +from an older commit than the tip, this mode would not find the fork +point (imagine in the above sample history B0 did not exist, +origin/master started at B1, moved to B2 and then B, and you forked +your topic at origin/master^ when origin/master was B1; the shape of +the history would be the same as above, without B0, and the parent +of B1 is what `git merge-base origin/master topic` correctly finds, +but the `--fork-point` mode will not, because it is not one of the +commits that used to be at the tip of origin/master). + See also -------- diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt index 4c68bc19d5..30687de81a 100644 --- a/Documentation/gitattributes.txt +++ b/Documentation/gitattributes.txt @@ -232,8 +232,7 @@ From a clean working directory: ------------------------------------------------- $ echo "* text=auto" >.gitattributes -$ git read-tree --empty # Clean index, force re-scan of working directory -$ git add . +$ git add --renormalize . $ git status # Show files that will be normalized $ git commit -m "Introduce end-of-line normalization" ------------------------------------------------- @@ -328,6 +327,9 @@ You can declare that a filter turns a content that by itself is unusable into a usable content by setting the filter.<driver>.required configuration variable to `true`. +Note: Whenever the clean filter is changed, the repo should be renormalized: +$ git add --renormalize . + For example, in .gitattributes, you would assign the `filter` attribute for paths. diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt index a09d597463..fd5d748d1b 100644 --- a/Documentation/merge-strategies.txt +++ b/Documentation/merge-strategies.txt @@ -58,11 +58,12 @@ diff-algorithm=[patience|minimal|histogram|myers];; ignore-space-change;; ignore-all-space;; ignore-space-at-eol;; +ignore-cr-at-eol;; Treats lines with the indicated type of whitespace change as unchanged for the sake of a three-way merge. Whitespace changes mixed with other changes to a line are not ignored. - See also linkgit:git-diff[1] `-b`, `-w`, and - `--ignore-space-at-eol`. + See also linkgit:git-diff[1] `-b`, `-w`, + `--ignore-space-at-eol`, and `--ignore-cr-at-eol`. + * If 'their' version only introduces whitespace changes to a line, 'our' version is used; |