diff options
Diffstat (limited to 'Documentation')
60 files changed, 1346 insertions, 768 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index 894546dd75..376d5ec4f8 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -328,9 +328,14 @@ For C programs: - When you come up with an API, document it. - - The first #include in C files, except in platform specific - compat/ implementations, should be git-compat-util.h or another - header file that includes it, such as cache.h or builtin.h. + - The first #include in C files, except in platform specific compat/ + implementations, must be either "git-compat-util.h", "cache.h" or + "builtin.h". You do not have to include more than one of these. + + - A C file must directly include the header files that declare the + functions and the types it uses, except for the functions and types + that are made available to it by including one of the header files + it must include by the previous rule. - If you are planning a new command, consider writing it in shell or perl first, so that changes in semantics can be easily @@ -413,6 +418,29 @@ Error Messages - Say what the error is first ("cannot open %s", not "%s: cannot open") +Externally Visible Names + + - For configuration variable names, follow the existing convention: + + . The section name indicates the affected subsystem. + + . The subsection name, if any, indicates which of an unbounded set + of things to set the value for. + + . The variable name describes the effect of tweaking this knob. + + The section and variable names that consist of multiple words are + formed by concatenating the words without punctuations (e.g. `-`), + and are broken using bumpyCaps in documentation as a hint to the + reader. + + When choosing the variable namespace, do not use variable name for + specifying possibly unbounded set of things, most notably anything + an end user can freely come up with (e.g. branch names). Instead, + use subsection names or variable values, like the existing variable + branch.<name>.description does. + + Writing Documentation: Most (if not all) of the documentation pages are written in the @@ -441,6 +469,10 @@ Writing Documentation: --sort=<key> --abbrev[=<n>] + If a placeholder has multiple words, they are separated by dashes: + <new-branch-name> + --template=<template-directory> + Possibility of multiple occurrences is indicated by three dots: <file>... (One or more of <file>.) @@ -457,12 +489,12 @@ Writing Documentation: (Zero or more of <patch>. Note that the dots are inside, not outside the brackets.) - Multiple alternatives are indicated with vertical bar: + Multiple alternatives are indicated with vertical bars: [-q | --quiet] [--utf8 | --no-utf8] Parentheses are used for grouping: - [(<rev>|<range>)...] + [(<rev> | <range>)...] (Any number of either <rev> or <range>. Parens are needed to make it clear that "..." pertains to both <rev> and <range>.) @@ -494,7 +526,7 @@ Writing Documentation: `backticks around word phrases`, do so. `--pretty=oneline` `git rev-list` - `remote.pushdefault` + `remote.pushDefault` Word phrases enclosed in `backtick characters` are rendered literally and will not be further expanded. The use of `backticks` to achieve the diff --git a/Documentation/RelNotes/2.3.1.txt b/Documentation/RelNotes/2.3.1.txt new file mode 100644 index 0000000000..cf96186288 --- /dev/null +++ b/Documentation/RelNotes/2.3.1.txt @@ -0,0 +1,52 @@ +Git v2.3.1 Release Notes +======================== + +Fixes since v2.3 +---------------- + + * The interactive "show a list and let the user choose from it" + interface "add -i" used showed and prompted to the user even when + the candidate list was empty, against which the only "choice" the + user could have made was to choose nothing. + + * "git apply --whitespace=fix" used to under-allocate the memory + when the fix resulted in a longer text than the original patch. + + * "git log --help" used to show rev-list options that are irrelevant + to the "log" command. + + * The error message from "git commit", when a non-existing author + name was given as value to the "--author=" parameter, has been + reworded to avoid misunderstanding. + + * A broken pack .idx file in the receiving repository prevented the + dumb http transport from fetching a good copy of it from the other + side. + + * The documentation incorrectly said that C(opy) and R(ename) are the + only ones that can be followed by the score number in the output in + the --raw format. + + * Fix a misspelled conditional that is always true. + + * Code to read branch name from various files in .git/ directory + would have misbehaved if the code to write them left an empty file. + + * The "git push" documentation made the "--repo=<there>" option + easily misunderstood. + + * After attempting and failing a password-less authentication + (e.g. kerberos), libcURL refuses to fall back to password based + Basic authentication without a bit of help/encouragement. + + * Setting diff.submodule to 'log' made "git format-patch" produce + broken patches. + + * "git rerere" (invoked internally from many mergy operations) did + not correctly signal errors when told to update the working tree + files and failed to do so for whatever reason. + + * "git blame HEAD -- missing" failed to correctly say "HEAD" when it + tried to say "No such path 'missing' in HEAD". + +Also contains typofixes, documentation updates and trivial code clean-ups. diff --git a/Documentation/RelNotes/2.3.2.txt b/Documentation/RelNotes/2.3.2.txt new file mode 100644 index 0000000000..f4caf54927 --- /dev/null +++ b/Documentation/RelNotes/2.3.2.txt @@ -0,0 +1,79 @@ +Git v2.3.2 Release Notes +======================== + +Fixes since v2.3.1 +------------------ + + * "update-index --refresh" used to leak when an entry cannot be + refreshed for whatever reason. + + * "git fast-import" used to crash when it could not close and + conclude the resulting packfile cleanly. + + * "git blame" died, trying to free an uninitialized piece of memory. + + * "git merge-file" did not work correctly in a subdirectory. + + * "git submodule add" failed to squash "path/to/././submodule" to + "path/to/submodule". + + * In v2.2.0, we broke "git prune" that runs in a repository that + borrows from an alternate object store. + + * Certain older vintages of cURL give irregular output from + "curl-config --vernum", which confused our build system. + + * An earlier workaround to squelch unhelpful deprecation warnings + from the complier on Mac OSX unnecessarily set minimum required + version of the OS, which the user might want to raise (or lower) + for other reasons. + + * Longstanding configuration variable naming rules has been added to + the documentation. + + * The credential helper for Windows (in contrib/) used to mishandle + a user name with an at-sign in it. + + * Older GnuPG implementations may not correctly import the keyring + material we prepare for the tests to use. + + * Clarify in the documentation that "remote.<nick>.pushURL" and + "remote.<nick>.URL" are there to name the same repository accessed + via different transports, not two separate repositories. + + * The pack bitmap support did not build with older versions of GCC. + + * Reading configuration from a blob object, when it ends with a lone + CR, use to confuse the configuration parser. + + * We didn't format an integer that wouldn't fit in "int" but in + "uintmax_t" correctly. + + * "git push --signed" gave an incorrectly worded error message when + the other side did not support the capability. + + * "git fetch" over a remote-helper that cannot respond to "list" + command could not fetch from a symbolic reference e.g. HEAD. + + * The insn sheet "git rebase -i" creates did not fully honor + core.abbrev settings. + + * The tests that wanted to see that file becomes unreadable after + running "chmod a-r file", and the tests that wanted to make sure it + is not run as root, we used "can we write into the / directory?" as + a cheap substitute, but on some platforms that is not a good + heuristics. The tests and their prerequisites have been updated to + check what they really require. + + * The configuration variable 'mailinfo.scissors' was hard to + discover in the documentation. + + * Correct a breakage to git-svn around v2.2 era that triggers + premature closing of FileHandle. + + * Even though we officially haven't dropped Perl 5.8 support, the + Getopt::Long package that came with it does not support "--no-" + prefix to negate a boolean option; manually add support to help + people with older Getopt::Long package. + +Also contains typofixes, documentation updates and trivial code clean-ups. diff --git a/Documentation/RelNotes/2.3.3.txt b/Documentation/RelNotes/2.3.3.txt new file mode 100644 index 0000000000..5ef12644c2 --- /dev/null +++ b/Documentation/RelNotes/2.3.3.txt @@ -0,0 +1,39 @@ +Git v2.3.3 Release Notes +======================== + +Fixes since v2.3.2 +------------------ + + * A corrupt input to "git diff -M" used cause us to segfault. + + * The borrowed code in kwset API did not follow our usual convention + to use "unsigned char" to store values that range from 0-255. + + * Description given by "grep -h" for its --exclude-standard option + was phrased poorly. + + * Documentaton for "git remote add" mentioned "--tags" and + "--no-tags" and it was not clear that fetch from the remote in + the future will use the default behaviour when neither is given + to override it. + + * "git diff --shortstat --dirstat=changes" showed a dirstat based on + lines that was never asked by the end user in addition to the + dirstat that the user asked for. + + * The interaction between "git submodule update" and the + submodule.*.update configuration was not clearly documented. + + * "git apply" was not very careful about reading from, removing, + updating and creating paths outside the working tree (under + --index/--cached) or the current directory (when used as a + replacement for GNU patch). + + * "git daemon" looked up the hostname even when "%CH" and "%IP" + interpolations are not requested, which was unnecessary. + + * The "interpolated-path" option of "git daemon" inserted any string + client declared on the "host=" capability request without checking. + Sanitize and limit %H and %CH to a saner and a valid DNS name. + +Also contains typofixes, documentation updates and trivial code clean-ups. diff --git a/Documentation/RelNotes/2.3.4.txt b/Documentation/RelNotes/2.3.4.txt new file mode 100644 index 0000000000..094c7b853b --- /dev/null +++ b/Documentation/RelNotes/2.3.4.txt @@ -0,0 +1,32 @@ +Git v2.3.4 Release Notes +======================== + +Fixes since v2.3.3 +------------------ + + * The 'color.status.unmerged' configuration was not described. + + * "git log --decorate" did not reset colors correctly around the + branch names. + + * "git -C '' subcmd" refused to work in the current directory, unlike + "cd ''" which silently behaves as a no-op. + + * "git imap-send" learned to optionally talk with an IMAP server via + libcURL; because there is no other option when Git is built with + NO_OPENSSL option, use that codepath by default under such + configuration. + + * A workaround for certain build of GPG that triggered false breakage + in a test has been added. + + * "git rebase -i" recently started to include the number of + commits in the insn sheet to be processed, but on a platform + that prepends leading whitespaces to "wc -l" output, the numbers + are shown with extra whitespaces that aren't necessary. + + * We did not parse username followed by literal IPv6 address in SSH + transport URLs, e.g. ssh://user@[2001:db8::1]:22/repo.git + correctly. + +Also contains typofixes, documentation updates and trivial code clean-ups. diff --git a/Documentation/RelNotes/2.4.0.txt b/Documentation/RelNotes/2.4.0.txt new file mode 100644 index 0000000000..f052162eff --- /dev/null +++ b/Documentation/RelNotes/2.4.0.txt @@ -0,0 +1,414 @@ +Git 2.4 Release Notes +===================== + +Backward compatibility warning(s) +--------------------------------- + +This release has a few changes in the user-visible output from +Porcelain commands, which the users may want to be aware of. + + * Output from "git log --decorate" (and "%d" format specifier used in + the userformat "--format=<string>" parameter "git log" family of + command takes) used to list "HEAD" just like other tips of branch + names, separated with a comma in between. E.g. + + $ git log --decorate -1 master + commit bdb0f6788fa5e3cacc4315e9ff318a27b2676ff4 (HEAD, master) + ... + + This release updates the output slightly when HEAD refers to the tip + of a branch whose name is also shown in the output. The above is + shown as: + + $ git log --decorate -1 master + commit bdb0f6788fa5e3cacc4315e9ff318a27b2676ff4 (HEAD -> master) + ... + + * The phrasing "git branch" uses to describe a detached HEAD has been + updated to match that of "git status": + + - When the HEAD is at the same commit as it was originally + detached, they now both show "detached at <commit object name>". + + - When the HEAD has moved since it was originally detached, + they now both show "detached from <commit object name>". + + Earlier "git branch" always used "from" + + +Updates since v2.3 +------------------ + +Ports + + * Our default I/O size (8 MiB) for large files was too large for some + platforms with smaller SSIZE_MAX, leading to read(2)/write(2) + failures. + + * We did not check the curl library version before using + CURLOPT_PROXYAUTH feature that may not exist. + + * We now detect number of CPUs on older BSD-derived systems. + + * Portability fixes and workarounds for shell scripts have been added + to help BSD-derived systems. + + +UI, Workflows & Features + + * The command usage info strings given by "git cmd -h" and in + documentation have been tweaked for consistency. + + * The "sync" subcommand of "git p4" now allows users to exclude + subdirectories like its "clone" subcommand does. + + * "git log --invert-grep --grep=WIP" will show only commits that do + not have the string "WIP" in their messages. + + * "git push" has been taught a "--atomic" option that makes push to + update more than one ref an "all-or-none" affair. + + * Extending the "push to deploy" added in 2.3, the behaviour of "git + push" when updating the branch that is checked out can now be + tweaked by push-to-checkout hook. + + * Using environment variable LANGUAGE and friends on the client side, + HTTP-based transports now send Accept-Language when making requests. + + * "git send-email" used to accept a mistaken "y" (or "yes") as an + answer to "What encoding do you want to use [UTF-8]? " without + questioning. Now it asks for confirmation when the answer looks + too short to be a valid encoding name. + + * When "git apply --whitespace=fix" fixed whitespace errors in the + common context lines, the command reports that it did so. + + * "git status" now allows the "-v" to be given twice to show the + differences that are left in the working tree not to be committed. + + * "git cherry-pick" used to clean-up the log message even when it is + merely replaying an existing commit. It now replays the message + verbatim unless you are editing the message of resulting commits. + + * "git archive" can now be told to set the 'text' attribute in the + resulting zip archive. + + * Output from "git log --decorate" mentions HEAD when it points at a + tip of an branch differently from a detached HEAD. + + This is a potentially backward-incompatible change. + + * "git branch" on a detached HEAD always said "(detached from xyz)", + even when "git status" would report "detached at xyz". The HEAD is + actually at xyz and haven't been moved since it was detached in + such a case, but the user cannot read what the current value of + HEAD is when "detached from" is used. + + * "git -C '' subcmd" refused to work in the current directory, unlike + "cd ''" which silently behaves as a no-op. + (merge 6a536e2 kn/git-cd-to-empty later to maint). + + * The versionsort.prerelease configuration variable can be used to + specify that v1.0-pre1 comes before v1.0. + + * A new "push.followTags" configuration turns the "--follow-tags" + option on by default for the "git push" command. + + +Performance, Internal Implementation, Development Support etc. + + * Implementation of N_() macro has been updated slightly to help us + detect mistakes. + + * Implementation of "reflog expire" has been restructured to fit the + reflogs better with the recently updated ref API. + + * The transport-helper did not give transport options such as + verbosity, progress, cloning, etc. to import and export based + helpers, like it did for fetch and push based helpers, robbing them + the chance to honor the wish of the end-users better. + + * The tests that wanted to see that file becomes unreadable after + running "chmod a-r file", and the tests that wanted to make sure it + is not run as root, we used "can we write into the / directory?" as + a cheap substitute, but on some platforms that is not a good + heuristics. The tests and their prerequisites have been updated to + check what they really require. + (merge f400e51 jk/sanity later to maint). + + * Various issues around "reflog expire", e.g. using --updateref when + expiring a reflog for a symbolic reference, have been corrected + and/or made saner. + + * The strbuf API was explained between the API documentation and in + the header file. Move missing bits to strbuf.h so that programmers + can check only one place for all necessary information. + + * The error handling functions and conventions are now documented in + the API manual. + + * Optimize attribute look-up, mostly useful in "git grep" on a + project that does not use many attributes, by avoiding it when we + (should) know that the attributes are not defined in the first + place. + + * Typofix in comments. + (merge ef2956a ak/git-pm-typofix later to maint). + + * Code clean-up. + (merge 0b868f0 sb/hex-object-name-is-at-most-41-bytes-long later to maint). + (merge 5d30851 dp/remove-duplicated-header-inclusion later to maint). + + * Simplify the ref transaction API around how "the ref should be + pointing at this object" is specified. + + * Code in "git daemon" to parse out and hold hostnames used in + request interpolation has been simplified. + + * "git push" codepath has been restructured to make it easier to add + new configuration bits. + + +Also contains various documentation updates and code clean-ups. + + +Fixes since v2.3 +---------------- + +Unless otherwise noted, all the fixes since v2.3 in the maintenance +track are contained in this release (see the maintenance releases' +notes for details). + + * "git blame HEAD -- missing" failed to correctly say "HEAD" when it + tried to say "No such path 'missing' in HEAD". + (merge a46442f jk/blame-commit-label later to maint). + + * "git rerere" (invoked internally from many mergy operations) did + not correctly signal errors when told to update the working tree + files and failed to do so for whatever reason. + (merge 89ea903 jn/rerere-fail-on-auto-update-failure later to maint). + + * Setting diff.submodule to 'log' made "git format-patch" produce + broken patches. + (merge 339de50 dk/format-patch-ignore-diff-submodule later to maint). + + * After attempting and failing a password-less authentication + (e.g. kerberos), libcURL refuses to fall back to password based + Basic authentication without a bit of help/encouragement. + (merge 4dbe664 bc/http-fallback-to-password-after-krb-fails later to maint). + + * The "git push" documentation made the "--repo=<there>" option + easily misunderstood. + (merge 57b92a7 mg/push-repo-option-doc later to maint). + + * Code to read branch name from various files in .git/ directory + would have misbehaved if the code to write them left an empty file. + (merge 66ec904 jk/status-read-branch-name-fix later to maint). + + * A misspelled conditional that is always true has been fixed. + (merge 94ee8e2 jk/remote-curl-an-array-in-struct-cannot-be-null later to maint). + + * The documentation incorrectly said that C(opy) and R(ename) are the + only ones that can be followed by the score number in the output in + the --raw format. + (merge ac1c2d9 jc/diff-format-doc later to maint). + + * A broken pack .idx file in the receiving repository prevented the + dumb http transport from fetching a good copy of it from the other + side. + (merge 8b9c2dd jk/dumb-http-idx-fetch-fix later to maint). + + * The error message from "git commit", when a non-existing author + name was given as value to the "--author=" parameter, has been + reworded to avoid misunderstanding. + (merge 1044b1f mg/commit-author-no-match-malformed-message later to maint). + + * "git log --help" used to show rev-list options that are irrelevant + to the "log" command. + (merge 3cab02d jc/doc-log-rev-list-options later to maint). + + * "git apply --whitespace=fix" used to under-allocate the memory when + the fix resulted in a longer text than the original patch. + (merge 407a792 jc/apply-ws-fix-expands later to maint). + + * The interactive "show a list and let the user choose from it" + interface "add -i" used showed and prompted to the user even when + the candidate list was empty, against which the only "choice" the + user could have made was to choose nothing. + (merge a9c4641 ak/add-i-empty-candidates later to maint). + + * The insn sheet "git rebase -i" creates did not fully honor + core.abbrev settings. + (merge edb72d5 ks/rebase-i-abbrev later to maint). + + * "git fetch" over a remote-helper that cannot respond to "list" + command could not fetch from a symbolic reference e.g. HEAD. + (merge 33cae54 mh/deref-symref-over-helper-transport later to maint). + + * "git push --signed" gave an incorrectly worded error message when + the other side did not support the capability. + (merge 45917f0 jc/push-cert later to maint). + + * We didn't format an integer that wouldn't fit in "int" but in + "uintmax_t" correctly. + (merge d306f3d jk/decimal-width-for-uintmax later to maint). + + * Reading configuration from a blob object, when it ends with a lone + CR, use to confuse the configuration parser. + (merge 1d0655c jk/config-no-ungetc-eof later to maint). + + * The pack bitmap support did not build with older versions of GCC. + (merge bd4e882 jk/pack-bitmap later to maint). + + * The documentation wasn't clear that "remote.<nick>.pushURL" and + "remote.<nick>.URL" are there to name the same repository accessed + via different transports, not two separate repositories. + (merge 697f652 jc/remote-set-url-doc later to maint). + + * Older GnuPG implementations may not correctly import the keyring + material we prepare for the tests to use. + (merge 1f985d6 ch/new-gpg-drops-rfc-1991 later to maint). + + * The credential helper for Windows (in contrib/) used to mishandle + a user name with an at-sign in it. + (merge 13d261e av/wincred-with-at-in-username-fix later to maint). + + * Longstanding configuration variable naming rules has been added to + the documentation. + (merge 35840a3 jc/conf-var-doc later to maint). + + * An earlier workaround to squelch unhelpful deprecation warnings + from the complier on Mac OSX unnecessarily set minimum required + version of the OS, which the user might want to raise (or lower) + for other reasons. + (merge 88c03eb es/squelch-openssl-warnings-on-macosx later to maint). + + * Certain older vintages of cURL give irregular output from + "curl-config --vernum", which confused our build system. + (merge 3af6792 tc/curl-vernum-output-broken-in-7.11 later to maint). + + * In v2.2.0, we broke "git prune" that runs in a repository that + borrows from an alternate object store. + (merge b0a4264 jk/prune-mtime later to maint). + + * "git submodule add" failed to squash "path/to/././submodule" to + "path/to/submodule". + (merge 8196e72 ps/submodule-sanitize-path-upon-add later to maint). + + * "git merge-file" did not work correctly in a subdirectory. + (merge 204a8ff ab/merge-file-prefix later to maint). + + * "git blame" died, trying to free an uninitialized piece of memory. + (merge e600592 es/blame-commit-info-fix later to maint). + + * "git fast-import" used to crash when it could not close and + conclude the resulting packfile cleanly. + (merge 5e915f3 jk/fast-import-die-nicely-fix later to maint). + + * "update-index --refresh" used to leak when an entry cannot be + refreshed for whatever reason. + (merge bc1c2ca sb/plug-leak-in-make-cache-entry later to maint). + + * The "interpolated-path" option of "git daemon" inserted any string + client declared on the "host=" capability request without checking. + Sanitize and limit %H and %CH to a saner and a valid DNS name. + (merge b485373 jk/daemon-interpolate later to maint). + + * "git daemon" looked up the hostname even when "%CH" and "%IP" + interpolations are not requested, which was unnecessary. + (merge dc8edc8 rs/daemon-interpolate later to maint). + + * Even though we officially haven't dropped Perl 5.8 support, the + Getopt::Long package that came with it does not support "--no-" + prefix to negate a boolean option; manually add support to help + people with older Getopt::Long package. + (merge f471494 km/send-email-getopt-long-workarounds later to maint). + + * "git apply" was not very careful about reading from, removing, + updating and creating paths outside the working tree (under + --index/--cached) or the current directory (when used as a + replacement for GNU patch). + (merge e0d201b jc/apply-beyond-symlink later to maint). + + * A breakage to git-svn around v2.2 era that triggers premature + closing of FileHandle has been corrected. + (merge e426311 ew/svn-maint-fixes later to maint). + + * We did not parse username followed by literal IPv6 address in SSH + transport URLs, e.g. ssh://user@[2001:db8::1]:22/repo.git + correctly. + (merge 3f55cca tb/connect-ipv6-parse-fix later to maint). + + * The configuration variable 'mailinfo.scissors' was hard to + discover in the documentation. + (merge afb5de7 mm/am-c-doc later to maint). + + * The interaction between "git submodule update" and the + submodule.*.update configuration was not clearly documented. + (merge 5c31acf ms/submodule-update-config-doc later to maint). + + * "git diff --shortstat --dirstat=changes" showed a dirstat based on + lines that was never asked by the end user in addition to the + dirstat that the user asked for. + (merge ab27389 mk/diff-shortstat-dirstat-fix later to maint). + + * "git remote add" mentioned "--tags" and "--no-tags" and was not + clear that fetch from the remote in the future will use the default + behaviour when neither is given to override it. + (merge aaba0ab mg/doc-remote-tags-or-not later to maint). + + * Description given by "grep -h" for its --exclude-standard option + was phrased poorly. + (merge 77fdb8a nd/grep-exclude-standard-help-fix later to maint). + + * "git rebase -i" recently started to include the number of + commits in the insn sheet to be processed, but on a platform + that prepends leading whitespaces to "wc -l" output, the numbers + are shown with extra whitespaces that aren't necessary. + (merge 2185d3b es/rebase-i-count-todo later to maint). + + * The borrowed code in kwset API did not follow our usual convention + to use "unsigned char" to store values that range from 0-255. + (merge 189c860 bw/kwset-use-unsigned later to maint). + + * A corrupt input to "git diff -M" used to cause it to segfault. + (merge 4d6be03 jk/diffcore-rename-duplicate later to maint). + + * Certain builds of GPG triggered false breakages in a test. + (merge 3f88c1b mg/verify-commit later to maint). + + * "git imap-send" learned to optionally talk with an IMAP server via + libcURL; because there is no other option when Git is built with + NO_OPENSSL option, use that codepath by default under such + configuration. + (merge dcd01ea km/imap-send-libcurl-options later to maint). + + * "git log --decorate" did not reset colors correctly around the + branch names. + (merge 5ee8758 jc/decorate-leaky-separator-color later to maint). + + * The code that reads from the ctags file in the completion script + (in contrib/) did not spell ${param/pattern/string} substitution + correctly, which happened to work with bash but not with zsh. + (merge db8d750 js/completion-ctags-pattern-substitution-fix later to maint). + + * The transfer.hiderefs support did not quite work for smart-http + transport. + (merge 8ddf3ca jk/smart-http-hide-refs later to maint). + + * "git tag -h" used to show the "--column" and "--sort" options + that are about listing in a wrong section. + (merge dd059c6 jk/tag-h-column-is-a-listing-option later to maint). + + * Code cleanups and documentation updates. + (merge 2ce63e9 rs/simple-cleanups later to maint). + (merge 33baa69 rj/no-xopen-source-for-cygwin later to maint). + (merge 817d03e jc/diff-test-updates later to maint). + (merge eb32c66 ak/t5516-typofix later to maint). + (merge bcd57cb mr/doc-clean-f-f later to maint). + (merge 0d6accc mg/doc-status-color-slot later to maint). + (merge 53e53c7 sg/completion-remote later to maint). + (merge 8fa7975 ak/git-done-help-cleanup later to maint). + (merge 9a6f128 rs/deflate-init-cleanup later to maint). + (merge 6f75d45 rs/use-isxdigit later to maint). + (merge 376e4b3 jk/test-annoyances later to maint). diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index ef0eeb40cd..98fc4cc1d0 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches @@ -136,6 +136,11 @@ that is fine, but please mark it as such. (4) Sending your patches. +Learn to use format-patch and send-email if possible. These commands +are optimized for the workflow of sending patches, avoiding many ways +your existing e-mail client that is optimized for "multipart/*" mime +type e-mails to corrupt and render your patches unusable. + People on the Git mailing list need to be able to read and comment on the changes you are submitting. It is important for a developer to be able to "quote" your changes, using standard diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt index 0cebc4f692..b299b59023 100644 --- a/Documentation/blame-options.txt +++ b/Documentation/blame-options.txt @@ -4,7 +4,7 @@ --root:: Do not treat root commits as boundaries. This can also be - controlled via the `blame.showroot` config option. + controlled via the `blame.showRoot` config option. --show-stats:: Include additional statistics at the end of blame output. diff --git a/Documentation/config.txt b/Documentation/config.txt index 04e2a71687..2e5ceaf719 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -14,7 +14,8 @@ the fully qualified variable name of the variable itself is the last dot-separated segment and the section name is everything before the last dot. The variable names are case-insensitive, allow only alphanumeric characters and `-`, and must start with an alphabetic character. Some -variables may appear multiple times. +variables may appear multiple times; we say then that the variable is +multivalued. Syntax ~~~~~~ @@ -25,7 +26,7 @@ blank lines are ignored. The file consists of sections and variables. A section begins with the name of the section in square brackets and continues until the next -section begins. Section names are not case sensitive. Only alphanumeric +section begins. Section names are case-insensitive. Only alphanumeric characters, `-` and `.` are allowed in section names. Each variable must belong to some section, which means that there must be a section header before the first setting of a variable. @@ -40,8 +41,8 @@ in the section header, like in the example below: -------- Subsection names are case sensitive and can contain any characters except -newline (doublequote `"` and backslash have to be escaped as `\"` and `\\`, -respectively). Section headers cannot span multiple +newline (doublequote `"` and backslash can be included by escaping them +as `\"` and `\\`, respectively). Section headers cannot span multiple lines. Variables may belong directly to a section or to a given subsection. You can have `[section]` if you have `[section "subsection"]`, but you don't need to. @@ -53,38 +54,27 @@ restrictions as section names. All the other lines (and the remainder of the line after the section header) are recognized as setting variables, in the form -'name = value'. If there is no equal sign on the line, the entire line -is taken as 'name' and the variable is recognized as boolean "true". +'name = value' (or just 'name', which is a short-hand to say that +the variable is the boolean "true"). The variable names are case-insensitive, allow only alphanumeric characters -and `-`, and must start with an alphabetic character. There can be more -than one value for a given variable; we say then that the variable is -multivalued. - -Leading and trailing whitespace in a variable value is discarded. -Internal whitespace within a variable value is retained verbatim. +and `-`, and must start with an alphabetic character. -The values following the equals sign in variable assign are all either -a string, an integer, or a boolean. Boolean values may be given as yes/no, -1/0, true/false or on/off. Case is not significant in boolean values, when -converting value to the canonical form using '--bool' type specifier; -'git config' will ensure that the output is "true" or "false". +A line that defines a value can be continued to the next line by +ending it with a `\`; the backquote and the end-of-line are +stripped. Leading whitespaces after 'name =', the remainder of the +line after the first comment character '#' or ';', and trailing +whitespaces of the line are discarded unless they are enclosed in +double quotes. Internal whitespaces within the value are retained +verbatim. -String values may be entirely or partially enclosed in double quotes. -You need to enclose variable values in double quotes if you want to -preserve leading or trailing whitespace, or if the variable value contains -comment characters (i.e. it contains '#' or ';'). -Double quote `"` and backslash `\` characters in variable values must -be escaped: use `\"` for `"` and `\\` for `\`. +Inside double quotes, double quote `"` and backslash `\` characters +must be escaped: use `\"` for `"` and `\\` for `\`. The following escape sequences (beside `\"` and `\\`) are recognized: `\n` for newline character (NL), `\t` for horizontal tabulation (HT, TAB) and `\b` for backspace (BS). Other char escape sequences (including octal escape sequences) are invalid. -Variable values ending in a `\` are continued on the next line in the -customary UNIX fashion. - -Some variables may require a special value format. Includes ~~~~~~~~ @@ -126,6 +116,60 @@ Example path = foo ; expand "foo" relative to the current file path = ~/foo ; expand "foo" in your $HOME directory + +Values +~~~~~~ + +Values of many variables are treated as a simple string, but there +are variables that take values of specific types and there are rules +as to how to spell them. + +boolean:: + + When a variable is said to take a boolean value, many + synonyms are accepted for 'true' and 'false'; these are all + case-insensitive. + + true;; Boolean true can be spelled as `yes`, `on`, `true`, + or `1`. Also, a variable defined without `= <value>` + is taken as true. + + false;; Boolean false can be spelled as `no`, `off`, + `false`, or `0`. ++ +When converting value to the canonical form using '--bool' type +specifier; 'git config' will ensure that the output is "true" or +"false" (spelled in lowercase). + +integer:: + The value for many variables that specify various sizes can + be suffixed with `k`, `M`,... to mean "scale the number by + 1024", "by 1024x1024", etc. + +color:: + The value for a variables that takes a color is a list of + colors (at most two) and attributes (at most one), separated + by spaces. The colors accepted are `normal`, `black`, + `red`, `green`, `yellow`, `blue`, `magenta`, `cyan` and + `white`; the attributes are `bold`, `dim`, `ul`, `blink` and + `reverse`. The first color given is the foreground; the + second is the background. The position of the attribute, if + any, doesn't matter. Attributes may be turned off specifically + by prefixing them with `no` (e.g., `noreverse`, `noul`, etc). ++ +Colors (foreground and background) may also be given as numbers between +0 and 255; these use ANSI 256-color mode (but note that not all +terminals may support this). If your terminal supports it, you may also +specify 24-bit RGB values as hex, like `#ff0ab3`. ++ +The attributes are meant to be reset at the beginning of each item +in the colored output, so setting color.decorate.branch to `black` +will paint that branch name in a plain `black`, even if the previous +thing on the same output line (e.g. opening parenthesis before the +list of branch names in `log --decorate` output) is set to be +painted with `bold` or some other attribute. + + Variables ~~~~~~~~~ @@ -225,7 +269,7 @@ See linkgit:git-update-index[1]. + The default is true (when core.filemode is not specified in the config file). -core.ignorecase:: +core.ignoreCase:: If true, this option enables various workarounds to enable Git to work better on filesystems that are not case sensitive, like FAT. For example, if a directory listing finds @@ -234,12 +278,12 @@ core.ignorecase:: "Makefile". + The default is false, except linkgit:git-clone[1] or linkgit:git-init[1] -will probe and set core.ignorecase true if appropriate when the repository +will probe and set core.ignoreCase true if appropriate when the repository is created. -core.precomposeunicode:: +core.precomposeUnicode:: This option is only used by Mac OS implementation of Git. - When core.precomposeunicode=true, Git reverts the unicode decomposition + When core.precomposeUnicode=true, Git reverts the unicode decomposition of filenames done by Mac OS. This is useful when sharing a repository between Mac OS and Linux or Windows. (Git for Windows 1.7.10 or higher is needed, or Git under cygwin 1.7). @@ -264,13 +308,13 @@ core.trustctime:: crawlers and some backup systems). See linkgit:git-update-index[1]. True by default. -core.checkstat:: +core.checkStat:: Determines which stat fields to match between the index and work tree. The user can set this to 'default' or 'minimal'. Default (or explicitly 'default'), is to check all fields, including the sub-second part of mtime and ctime. -core.quotepath:: +core.quotePath:: The commands that output paths (e.g. 'ls-files', 'diff'), when not given the `-z` option, will quote "unusual" characters in the pathname by enclosing the @@ -474,9 +518,9 @@ core.compression:: -1 is the zlib default. 0 means no compression, and 1..9 are various speed/size tradeoffs, 9 being slowest. If set, this provides a default to other compression variables, - such as 'core.loosecompression' and 'pack.compression'. + such as 'core.looseCompression' and 'pack.compression'. -core.loosecompression:: +core.looseCompression:: An integer -1..9, indicating the compression level for objects that are not in a pack file. -1 is the zlib default. 0 means no compression, and 1..9 are various speed/size tradeoffs, 9 being @@ -537,7 +581,7 @@ be delta compressed, but larger binary media files won't be. + Common unit suffixes of 'k', 'm', or 'g' are supported. -core.excludesfile:: +core.excludesFile:: In addition to '.gitignore' (per-directory) and '.git/info/exclude', Git looks into this file for patterns of files which are not meant to be tracked. "`~/`" is expanded @@ -546,7 +590,7 @@ core.excludesfile:: If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/ignore is used instead. See linkgit:gitignore[5]. -core.askpass:: +core.askPass:: Some commands (e.g. svn and http interfaces) that interactively ask for a password can be told to use an external program given via the value of this variable. Can be overridden by the 'GIT_ASKPASS' @@ -555,11 +599,11 @@ core.askpass:: prompt. The external program shall be given a suitable prompt as command-line argument and write the password on its STDOUT. -core.attributesfile:: +core.attributesFile:: In addition to '.gitattributes' (per-directory) and '.git/info/attributes', Git looks into this file for attributes (see linkgit:gitattributes[5]). Path expansions are made the same - way as for `core.excludesfile`. Its default value is + way as for `core.excludesFile`. Its default value is $XDG_CONFIG_HOME/git/attributes. If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/attributes is used instead. @@ -569,7 +613,7 @@ core.editor:: variable when it is set, and the environment variable `GIT_EDITOR` is not set. See linkgit:git-var[1]. -core.commentchar:: +core.commentChar:: Commands such as `commit` and `tag` that lets you edit messages consider a line that begins with this character commented, and removes them after the editor returns @@ -638,7 +682,7 @@ core.whitespace:: is relevant for `indent-with-non-tab` and when Git fixes `tab-in-indent` errors. The default tab width is 8. Allowed values are 1 to 63. -core.fsyncobjectfiles:: +core.fsyncObjectFiles:: This boolean will enable 'fsync()' when writing object files. + This is a total waste of time and effort on a filesystem that orders @@ -646,7 +690,7 @@ data writes properly, but can be useful for filesystems that do not use journalling (traditional UNIX filesystems) or that only journal metadata and not file contents (OS X's HFS+, or Linux ext3 with "data=writeback"). -core.preloadindex:: +core.preloadIndex:: Enable parallel index preload for operations like 'git diff' + This can speed up operations like 'git diff' and 'git status' especially @@ -683,14 +727,13 @@ core.abbrev:: for abbreviated object names to stay unique for sufficiently long time. -add.ignore-errors:: add.ignoreErrors:: +add.ignore-errors (deprecated):: Tells 'git add' to continue adding files when some files cannot be added due to indexing errors. Equivalent to the '--ignore-errors' - option of linkgit:git-add[1]. Older versions of Git accept only - `add.ignore-errors`, which does not follow the usual naming - convention for configuration variables. Newer versions of Git - honor `add.ignoreErrors` as well. + option of linkgit:git-add[1]. `add.ignore-errors` is deprecated, + as it does not follow the usual naming convention for configuration + variables. alias.*:: Command aliases for the linkgit:git[1] command wrapper - e.g. @@ -718,7 +761,7 @@ am.keepcr:: by giving '--no-keep-cr' from the command line. See linkgit:git-am[1], linkgit:git-mailsplit[1]. -apply.ignorewhitespace:: +apply.ignoreWhitespace:: When set to 'change', tells 'git apply' to ignore changes in whitespace, in the same way as the '--ignore-space-change' option. @@ -730,7 +773,7 @@ apply.whitespace:: Tells 'git apply' how to handle whitespaces, in the same way as the '--whitespace' option. See linkgit:git-apply[1]. -branch.autosetupmerge:: +branch.autoSetupMerge:: Tells 'git branch' and 'git checkout' to set up new branches so that linkgit:git-pull[1] will appropriately merge from the starting point branch. Note that even if this option is not set, @@ -742,7 +785,7 @@ branch.autosetupmerge:: local branch or remote-tracking branch. This option defaults to true. -branch.autosetuprebase:: +branch.autoSetupRebase:: When a new branch is created with 'git branch' or 'git checkout' that tracks another branch, this variable tells Git to set up pull to rebase instead of merge (see "branch.<name>.rebase"). @@ -753,27 +796,27 @@ branch.autosetuprebase:: remote-tracking branches. When `always`, rebase will be set to true for all tracking branches. - See "branch.autosetupmerge" for details on how to set up a + See "branch.autoSetupMerge" for details on how to set up a branch to track another branch. This option defaults to never. branch.<name>.remote:: When on branch <name>, it tells 'git fetch' and 'git push' which remote to fetch from/push to. The remote to push to - may be overridden with `remote.pushdefault` (for all branches). + may be overridden with `remote.pushDefault` (for all branches). The remote to push to, for the current branch, may be further - overridden by `branch.<name>.pushremote`. If no remote is + overridden by `branch.<name>.pushRemote`. If no remote is configured, or if you are not on any branch, it defaults to - `origin` for fetching and `remote.pushdefault` for pushing. + `origin` for fetching and `remote.pushDefault` for pushing. Additionally, `.` (a period) is the current local repository (a dot-repository), see `branch.<name>.merge`'s final note below. -branch.<name>.pushremote:: +branch.<name>.pushRemote:: When on branch <name>, it overrides `branch.<name>.remote` for - pushing. It also overrides `remote.pushdefault` for pushing + pushing. It also overrides `remote.pushDefault` for pushing from branch <name>. When you pull from one place (e.g. your upstream) and push to another place (e.g. your own publishing - repository), you would want to set `remote.pushdefault` to + repository), you would want to set `remote.pushDefault` to specify the remote to push to for all branches, and use this option to override it for a specific branch. @@ -795,7 +838,7 @@ branch.<name>.merge:: branch.<name>.merge to the desired branch, and use the relative path setting `.` (a period) for branch.<name>.remote. -branch.<name>.mergeoptions:: +branch.<name>.mergeOptions:: Sets default options for merging into branch <name>. The syntax and supported options are the same as those of linkgit:git-merge[1], but option values containing whitespace characters are currently not @@ -847,20 +890,6 @@ color.branch.<slot>:: `remote` (a remote-tracking branch in refs/remotes/), `upstream` (upstream tracking branch), `plain` (other refs). -+ -The value for these configuration variables is a list of colors (at most -two) and attributes (at most one), separated by spaces. The colors -accepted are `normal`, `black`, `red`, `green`, `yellow`, `blue`, -`magenta`, `cyan` and `white`; the attributes are `bold`, `dim`, `ul`, -`blink` and `reverse`. The first color given is the foreground; the -second is the background. The position of the attribute, if any, -doesn't matter. Attributes may be turned off specifically by prefixing -them with `no` (e.g., `noreverse`, `noul`, etc). -+ -Colors (foreground and background) may also be given as numbers between -0 and 255; these use ANSI 256-color mode (but note that not all -terminals may support this). If your terminal supports it, you may also -specify 24-bit RGB values as hex, like `#ff0ab3`. color.diff:: Whether to use ANSI escape sequences to add color to patches. @@ -880,8 +909,7 @@ color.diff.<slot>:: of `plain` (context text), `meta` (metainformation), `frag` (hunk header), 'func' (function in hunk header), `old` (removed lines), `new` (added lines), `commit` (commit headers), or `whitespace` - (highlighting whitespace errors). The values of these variables may be - specified as in color.branch.<slot>. + (highlighting whitespace errors). color.decorate.<slot>:: Use customized color for 'git log --decorate' output. `<slot>` is one @@ -918,8 +946,6 @@ color.grep.<slot>:: separators between fields on a line (`:`, `-`, and `=`) and between hunks (`--`) -- -+ -The values of these variables may be specified as in color.branch.<slot>. color.interactive:: When set to `always`, always use colors for interactive prompts @@ -932,14 +958,13 @@ color.interactive.<slot>:: Use customized color for 'git add --interactive' and 'git clean --interactive' output. `<slot>` may be `prompt`, `header`, `help` or `error`, for four distinct types of normal output from - interactive commands. The values of these variables may be - specified as in color.branch.<slot>. + interactive commands. color.pager:: A boolean to enable/disable colored output when the pager is in use (default is true). -color.showbranch:: +color.showBranch:: A boolean to enable/disable color in the output of linkgit:git-show-branch[1]. May be set to `always`, `false` (or `never`) or `auto` (or `true`), in which case colors are used @@ -957,10 +982,10 @@ color.status.<slot>:: `added` or `updated` (files which are added but not committed), `changed` (files which are changed but not added in the index), `untracked` (files which are not tracked by Git), - `branch` (the current branch), or + `branch` (the current branch), `nobranch` (the color the 'no branch' warning is shown in, defaulting - to red). The values of these variables may be specified as in - color.branch.<slot>. + to red), or + `unmerged` (files which have unmerged changes). color.ui:: This variable determines the default value for variables such @@ -1039,7 +1064,7 @@ commit.cleanup:: have to remove the help lines that begin with `#` in the commit log template yourself, if you do this). -commit.gpgsign:: +commit.gpgSign:: A boolean to specify whether all commits should be GPG signed. Use of this option when doing operations such as rebase can @@ -1152,7 +1177,7 @@ format.cc:: by mail. See the --to and --cc options in linkgit:git-format-patch[1]. -format.subjectprefix:: +format.subjectPrefix:: The default for format-patch is to output files with the '[PATCH]' subject prefix. Use this variable to change that prefix. @@ -1162,7 +1187,7 @@ format.signature:: Set this variable to the empty string ("") to suppress signature generation. -format.signaturefile:: +format.signatureFile:: Works just like format.signature except the contents of the file specified by this variable will be used as the signature. @@ -1186,7 +1211,7 @@ format.thread:: A true boolean value is the same as `shallow`, and a false value disables threading. -format.signoff:: +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 patch should be a conscious act and means that you certify you have @@ -1225,17 +1250,17 @@ gc.auto:: light-weight garbage collection from time to time. The default value is 6700. Setting this to 0 disables it. -gc.autopacklimit:: +gc.autoPackLimit:: When there are more than this many packs that are not marked with `*.keep` file in the repository, `git gc --auto` consolidates them into one larger pack. The default value is 50. Setting this to 0 disables it. -gc.autodetach:: +gc.autoDetach:: Make `git gc --auto` return immediately and run in background if the system supports it. Default is true. -gc.packrefs:: +gc.packRefs:: Running `git pack-refs` in a repository renders it unclonable by Git versions prior to 1.5.1.2 over dumb transports such as HTTP. This variable determines whether @@ -1243,38 +1268,38 @@ gc.packrefs:: to enable it within all non-bare repos or it can be set to a boolean value. The default is `true`. -gc.pruneexpire:: +gc.pruneExpire:: When 'git gc' is run, it will call 'prune --expire 2.weeks.ago'. Override the grace period with this config variable. The value "now" may be used to disable this grace period and always prune unreachable objects immediately. -gc.reflogexpire:: -gc.<pattern>.reflogexpire:: +gc.reflogExpire:: +gc.<pattern>.reflogExpire:: 'git reflog expire' removes reflog entries older than this time; defaults to 90 days. With "<pattern>" (e.g. "refs/stash") in the middle the setting applies only to the refs that match the <pattern>. -gc.reflogexpireunreachable:: -gc.<ref>.reflogexpireunreachable:: +gc.reflogExpireUnreachable:: +gc.<ref>.reflogExpireUnreachable:: 'git reflog expire' removes reflog entries older than this time and are not reachable from the current tip; defaults to 30 days. With "<pattern>" (e.g. "refs/stash") in the middle, the setting applies only to the refs that match the <pattern>. -gc.rerereresolved:: +gc.rerereResolved:: Records of conflicted merge you resolved earlier are kept for this many days when 'git rerere gc' is run. The default is 60 days. See linkgit:git-rerere[1]. -gc.rerereunresolved:: +gc.rerereUnresolved:: Records of conflicted merge you have not resolved are kept for this many days when 'git rerere gc' is run. The default is 15 days. See linkgit:git-rerere[1]. -gitcvs.commitmsgannotation:: +gitcvs.commitMsgAnnotation:: Append this string to each commit message. Set to empty string to disable this feature. Defaults to "via git-CVS emulator". @@ -1282,7 +1307,7 @@ gitcvs.enabled:: Whether the CVS server interface is enabled for this repository. See linkgit:git-cvsserver[1]. -gitcvs.logfile:: +gitcvs.logFile:: Path to a log file where the CVS server interface well... logs various stuff. See linkgit:git-cvsserver[1]. @@ -1294,10 +1319,10 @@ gitcvs.usecrlfattr:: treat it as text. If they suppress text conversion, the file will be set with '-kb' mode, which suppresses any newline munging the client might otherwise do. If the attributes do not allow - the file type to be determined, then 'gitcvs.allbinary' is + the file type to be determined, then 'gitcvs.allBinary' is used. See linkgit:gitattributes[5]. -gitcvs.allbinary:: +gitcvs.allBinary:: This is used if 'gitcvs.usecrlfattr' does not resolve the correct '-kb' mode to use. If true, all unresolved files are sent to the client in @@ -1307,7 +1332,7 @@ gitcvs.allbinary:: then the contents of the file are examined to decide if it is binary, similar to 'core.autocrlf'. -gitcvs.dbname:: +gitcvs.dbName:: Database used by git-cvsserver to cache revision information derived from the Git repository. The exact meaning depends on the used database driver, for SQLite (which is the default driver) this @@ -1315,7 +1340,7 @@ gitcvs.dbname:: linkgit:git-cvsserver[1] for details). May not contain semicolons (`;`). Default: '%Ggitcvs.%m.sqlite' -gitcvs.dbdriver:: +gitcvs.dbDriver:: Used Perl DBI driver. You can specify any available driver for this here, but it might not work. git-cvsserver is tested with 'DBD::SQLite', reported to work with 'DBD::Pg', and @@ -1323,10 +1348,10 @@ gitcvs.dbdriver:: May not contain double colons (`:`). Default: 'SQLite'. See linkgit:git-cvsserver[1]. -gitcvs.dbuser, gitcvs.dbpass:: - Database user and password. Only useful if setting 'gitcvs.dbdriver', +gitcvs.dbUser, gitcvs.dbPass:: + Database user and password. Only useful if setting 'gitcvs.dbDriver', since SQLite has no concept of database users and/or passwords. - 'gitcvs.dbuser' supports variable substitution (see + 'gitcvs.dbUser' supports variable substitution (see linkgit:git-cvsserver[1] for details). gitcvs.dbTableNamePrefix:: @@ -1337,7 +1362,7 @@ gitcvs.dbTableNamePrefix:: characters will be replaced with underscores. All gitcvs variables except for 'gitcvs.usecrlfattr' and -'gitcvs.allbinary' can also be specified as +'gitcvs.allBinary' can also be specified as 'gitcvs.<access_method>.<varname>' (where 'access_method' is one of "ext" and "pserver") to make them apply only for the given access method. @@ -1355,7 +1380,7 @@ gitweb.highlight:: gitweb.patches:: gitweb.pickaxe:: gitweb.remote_heads:: -gitweb.showsizes:: +gitweb.showSizes:: gitweb.snapshot:: See linkgit:gitweb.conf[5] for description. @@ -1384,15 +1409,15 @@ gpg.program:: signed, and the program is expected to send the result to its standard output. -gui.commitmsgwidth:: +gui.commitMsgWidth:: Defines how wide the commit message window is in the linkgit:git-gui[1]. "75" is the default. -gui.diffcontext:: +gui.diffContext:: Specifies how many context lines should be used in calls to diff made by the linkgit:git-gui[1]. The default is "5". -gui.displayuntracked:: +gui.displayUntracked:: Determines if linkgit::git-gui[1] shows untracked files in the file list. The default is "true". @@ -1404,16 +1429,16 @@ gui.encoding:: If this option is not set, the tools default to the locale encoding. -gui.matchtrackingbranch:: +gui.matchTrackingBranch:: Determines if new branches created with linkgit:git-gui[1] should default to tracking remote branches with matching names or not. Default: "false". -gui.newbranchtemplate:: +gui.newBranchTemplate:: Is used as suggested name when creating new branches using the linkgit:git-gui[1]. -gui.pruneduringfetch:: +gui.pruneDuringFetch:: "true" if linkgit:git-gui[1] should prune remote-tracking branches when performing a fetch. The default value is "false". @@ -1421,17 +1446,17 @@ gui.trustmtime:: Determines if linkgit:git-gui[1] should trust the file modification timestamp or not. By default the timestamps are not trusted. -gui.spellingdictionary:: +gui.spellingDictionary:: Specifies the dictionary used for spell checking commit messages in the linkgit:git-gui[1]. When set to "none" spell checking is turned off. -gui.fastcopyblame:: +gui.fastCopyBlame:: If true, 'git gui blame' uses `-C` instead of `-C -C` for original location detection. It makes blame significantly faster on huge repositories at the expense of less thorough copy detection. -gui.copyblamethreshold:: +gui.copyBlameThreshold:: Specifies the threshold to use in 'git gui blame' original location detection, measured in alphanumeric characters. See the linkgit:git-blame[1] manual for more information on copy detection. @@ -1451,22 +1476,22 @@ guitool.<name>.cmd:: 'FILENAME', and the name of the current branch as 'CUR_BRANCH' (if the head is detached, 'CUR_BRANCH' is empty). -guitool.<name>.needsfile:: +guitool.<name>.needsFile:: Run the tool only if a diff is selected in the GUI. It guarantees that 'FILENAME' is not empty. -guitool.<name>.noconsole:: +guitool.<name>.noConsole:: Run the command silently, without creating a window to display its output. -guitool.<name>.norescan:: +guitool.<name>.noRescan:: Don't rescan the working directory for changes after the tool finishes execution. guitool.<name>.confirm:: Show a confirmation dialog before actually running the tool. -guitool.<name>.argprompt:: +guitool.<name>.argPrompt:: Request a string argument from the user, and pass it to the tool through the 'ARGS' environment variable. Since requesting an argument implies confirmation, the 'confirm' option has no effect @@ -1474,13 +1499,13 @@ guitool.<name>.argprompt:: the dialog uses a built-in generic prompt; otherwise the exact value of the variable is used. -guitool.<name>.revprompt:: +guitool.<name>.revPrompt:: Request a single valid revision from the user, and set the 'REVISION' environment variable. In other aspects this option - is similar to 'argprompt', and can be used together with it. + is similar to 'argPrompt', and can be used together with it. -guitool.<name>.revunmerged:: - Show only unmerged branches in the 'revprompt' subdialog. +guitool.<name>.revUnmerged:: + Show only unmerged branches in the 'revPrompt' subdialog. This is useful for tools similar to merge or rebase, but not for things like checkout or reset. @@ -1490,7 +1515,7 @@ guitool.<name>.title:: guitool.<name>.prompt:: Specifies the general prompt string to display at the top of - the dialog, before subsections for 'argprompt' and 'revprompt'. + the dialog, before subsections for 'argPrompt' and 'revPrompt'. The default value includes the actual command. help.browser:: @@ -1502,7 +1527,7 @@ help.format:: Values 'man', 'info', 'web' and 'html' are supported. 'man' is the default. 'web' and 'html' are the same. -help.autocorrect:: +help.autoCorrect:: Automatically correct and execute mistyped commands after waiting for the given number of deciseconds (0.1 sec). If more than one command can be deduced from the entered text, nothing @@ -1511,7 +1536,7 @@ help.autocorrect:: value is 0 - the command will be just shown but not executed. This is the default. -help.htmlpath:: +help.htmlPath:: Specify the path where the HTML documentation resides. File system paths and URLs are supported. HTML pages will be prefixed with this path when help is displayed in the 'web' format. This defaults to the documentation @@ -1523,17 +1548,17 @@ http.proxy:: `curl(1)`). This can be overridden on a per-remote basis; see remote.<name>.proxy -http.cookiefile:: +http.cookieFile:: File containing previously stored cookie lines which should be used in the Git http session, if they match the server. The file format of the file to read cookies from should be plain HTTP headers or the Netscape/Mozilla cookie file format (see linkgit:curl[1]). - NOTE that the file specified with http.cookiefile is only used as + NOTE that the file specified with http.cookieFile is only used as input unless http.saveCookies is set. -http.savecookies:: +http.saveCookies:: If set, store cookies received during requests to the file specified by - http.cookiefile. Has no effect if http.cookiefile is unset. + http.cookieFile. Has no effect if http.cookieFile is unset. http.sslVerify:: Whether to verify the SSL certificate when fetching or pushing @@ -1604,7 +1629,7 @@ http.noEPSV:: support EPSV mode. Can be overridden by the 'GIT_CURL_FTP_NO_EPSV' environment variable. Default is false (curl will use EPSV). -http.useragent:: +http.userAgent:: The HTTP USER_AGENT string presented to an HTTP server. The default value represents the version of the client Git such as git/1.7.1. This option allows you to override this value to a more common value @@ -1677,7 +1702,7 @@ index.version:: Specify the version with which new index files should be initialized. This does not affect existing repositories. -init.templatedir:: +init.templateDir:: Specify the directory from which templates will be copied. (See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].) @@ -1693,7 +1718,7 @@ instaweb.local:: If true the web server started by linkgit:git-instaweb[1] will be bound to the local IP (127.0.0.1). -instaweb.modulepath:: +instaweb.modulePath:: The default module path for linkgit:git-instaweb[1] to use instead of /usr/lib/apache2/modules. Only used if httpd is Apache. @@ -1702,7 +1727,7 @@ instaweb.port:: The port number to bind the gitweb httpd to. See linkgit:git-instaweb[1]. -interactive.singlekey:: +interactive.singleKey:: In interactive commands, allow the user to provide one-letter input with a single key (i.e., without hitting enter). Currently this is used by the `--patch` mode of @@ -1730,7 +1755,7 @@ log.decorate:: specified, the full ref name (including prefix) will be printed. This is the same as the log commands '--decorate' option. -log.showroot:: +log.showRoot:: If true, the initial commit will be shown as a big creation event. This is equivalent to a diff against an empty tree. Tools like linkgit:git-log[1] or linkgit:git-whatchanged[1], which @@ -1740,6 +1765,13 @@ log.mailmap:: If true, makes linkgit:git-log[1], linkgit:git-show[1], and linkgit:git-whatchanged[1] assume `--use-mailmap`. +mailinfo.scissors:: + If true, makes linkgit:git-mailinfo[1] (and therefore + linkgit:git-am[1]) act by default as if the --scissors option + was provided on the command-line. When active, this features + removes everything from the message body before a scissors + line (i.e. consisting mainly of ">8", "8<" and "-"). + mailmap.file:: The location of an augmenting mailmap file. The default mailmap, located in the root of the repository, is loaded @@ -1960,7 +1992,7 @@ pack.useBitmaps:: true. You should not generally need to turn this off unless you are debugging pack bitmaps. -pack.writebitmaps:: +pack.writeBitmaps (deprecated):: This is a deprecated synonym for `repack.writeBitmaps`. pack.writeBitmapHashCache:: @@ -2079,14 +2111,20 @@ new default). -- +push.followTags:: + If set to true enable '--follow-tags' option by default. You + may override this configuration at time of push by specifying + '--no-follow-tags'. + + rebase.stat:: Whether to show a diffstat of what changed upstream since the last rebase. False by default. -rebase.autosquash:: +rebase.autoSquash:: If set to true enable '--autosquash' option by default. -rebase.autostash:: +rebase.autoStash:: When set to true, automatically create a temporary stash before the operation begins, and apply it after the operation ends. This means that you can run rebase on a dirty worktree. @@ -2094,18 +2132,23 @@ rebase.autostash:: successful rebase might result in non-trivial conflicts. Defaults to false. +receive.advertiseAtomic:: + By default, git-receive-pack will advertise the atomic push + capability to its clients. If you don't want to this capability + to be advertised, set this variable to false. + receive.autogc:: By default, git-receive-pack will run "git-gc --auto" after receiving data from git-push and updating refs. You can stop it by setting this variable to false. -receive.certnonceseed:: +receive.certNonceSeed:: By setting this variable to a string, `git receive-pack` will accept a `git push --signed` and verifies it by using a "nonce" protected by HMAC using this string as a secret key. -receive.certnonceslop:: +receive.certNonceSlop:: When a `git push --signed` sent a push certificate with a "nonce" that was issued by a receive-pack serving the same repository within this many seconds, export the "nonce" @@ -2153,11 +2196,15 @@ receive.denyCurrentBranch:: message. Defaults to "refuse". + Another option is "updateInstead" which will update the working -directory (must be clean) if pushing into the current branch. This option is +tree if pushing into the current branch. This option is intended for synchronizing working directories when one side is not easily accessible via interactive ssh (e.g. a live web site, hence the requirement that the working directory be clean). This mode also comes in handy when developing inside a VM to test and fix code on different Operating Systems. ++ +By default, "updateInstead" will refuse the push if the working tree or +the index have any difference from the HEAD, but the `push-to-checkout` +hook can be used to customize this. See linkgit:githooks[5]. receive.denyNonFastForwards:: If set to true, git-receive-pack will deny a ref update which is @@ -2165,7 +2212,7 @@ receive.denyNonFastForwards:: even if that push is forced. This configuration variable is set when initializing a shared repository. -receive.hiderefs:: +receive.hideRefs:: String(s) `receive-pack` uses to decide which refs to omit from its initial advertisement. Use more than one definitions to specify multiple prefix strings. A ref that @@ -2174,18 +2221,18 @@ receive.hiderefs:: push`, and an attempt to update or delete a hidden ref by `git push` is rejected. -receive.updateserverinfo:: +receive.updateServerInfo:: If set to true, git-receive-pack will run git-update-server-info after receiving data from git-push and updating refs. -receive.shallowupdate:: +receive.shallowUpdate:: If set to true, .git/shallow can be updated when new refs require new shallow roots. Otherwise those refs are rejected. -remote.pushdefault:: +remote.pushDefault:: The remote to push to by default. Overrides `branch.<name>.remote` for all branches, and is overridden by - `branch.<name>.pushremote` for specific branches. + `branch.<name>.pushRemote` for specific branches. remote.<name>.url:: The URL of a remote repository. See linkgit:git-fetch[1] or @@ -2229,7 +2276,7 @@ remote.<name>.uploadpack:: The default program to execute on the remote side when fetching. See option \--upload-pack of linkgit:git-fetch-pack[1]. -remote.<name>.tagopt:: +remote.<name>.tagOpt:: Setting this value to \--no-tags disables automatic tag following when fetching from remote <name>. Setting it to \--tags will fetch every tag from remote <name>, even if they are not reachable from remote @@ -2251,7 +2298,7 @@ remotes.<group>:: The list of remotes which are fetched by "git remote update <group>". See linkgit:git-remote[1]. -repack.usedeltabaseoffset:: +repack.useDeltaBaseOffset:: By default, linkgit:git-repack[1] creates packs that use delta-base offset. If you need to share your repository with Git older than version 1.4.4, either directly or via a dumb @@ -2274,7 +2321,7 @@ repack.writeBitmaps:: space and extra time spent on the initial repack. Defaults to false. -rerere.autoupdate:: +rerere.autoUpdate:: When set to true, `git-rerere` updates the index with the resulting contents after it cleanly resolves conflicts using previously recorded resolution. Defaults to false. @@ -2293,12 +2340,12 @@ sendemail.identity:: values in the 'sendemail' section. The default identity is the value of 'sendemail.identity'. -sendemail.smtpencryption:: +sendemail.smtpEncryption:: See linkgit:git-send-email[1] for description. Note that this setting is not subject to the 'identity' mechanism. -sendemail.smtpssl:: - Deprecated alias for 'sendemail.smtpencryption = ssl'. +sendemail.smtpssl (deprecated):: + Deprecated alias for 'sendemail.smtpEncryption = ssl'. sendemail.smtpsslcertpath:: Path to ca-certificates (either a directory or a single file). @@ -2310,34 +2357,34 @@ sendemail.<identity>.*:: identity is selected, through command-line or 'sendemail.identity'. -sendemail.aliasesfile:: -sendemail.aliasfiletype:: +sendemail.aliasesFile:: +sendemail.aliasFileType:: sendemail.annotate:: sendemail.bcc:: sendemail.cc:: -sendemail.cccmd:: -sendemail.chainreplyto:: +sendemail.ccCmd:: +sendemail.chainReplyTo:: sendemail.confirm:: -sendemail.envelopesender:: +sendemail.envelopeSender:: sendemail.from:: -sendemail.multiedit:: +sendemail.multiEdit:: sendemail.signedoffbycc:: -sendemail.smtppass:: +sendemail.smtpPass:: sendemail.suppresscc:: -sendemail.suppressfrom:: +sendemail.suppressFrom:: sendemail.to:: -sendemail.smtpdomain:: -sendemail.smtpserver:: -sendemail.smtpserverport:: -sendemail.smtpserveroption:: -sendemail.smtpuser:: +sendemail.smtpDomain:: +sendemail.smtpServer:: +sendemail.smtpServerPort:: +sendemail.smtpServerOption:: +sendemail.smtpUser:: sendemail.thread:: -sendemail.transferencoding:: +sendemail.transferEncoding:: sendemail.validate:: sendemail.xmailer:: See linkgit:git-send-email[1] for description. -sendemail.signedoffcc:: +sendemail.signedoffcc (deprecated):: Deprecated alias for 'sendemail.signedoffbycc'. showbranch.default:: @@ -2384,7 +2431,7 @@ If this variable is not specified, it defaults to 'normal'. This variable can be overridden with the -u|--untracked-files option of linkgit:git-status[1] and linkgit:git-commit[1]. -status.submodulesummary:: +status.submoduleSummary:: Defaults to false. If this is set to a non zero number or true (identical to -1 or an unlimited number), the submodule summary will be enabled and a @@ -2402,12 +2449,16 @@ status.submodulesummary:: submodule.<name>.path:: submodule.<name>.url:: + The path within this project and URL for a submodule. These + variables are initially populated by 'git submodule init'. See + linkgit:git-submodule[1] and linkgit:gitmodules[5] for + details. + submodule.<name>.update:: - The path within this project, URL, and the updating strategy - for a submodule. These variables are initially populated - by 'git submodule init'; edit them to override the - URL and other values found in the `.gitmodules` file. See - linkgit:git-submodule[1] and linkgit:gitmodules[5] for details. + The default update procedure for a submodule. This variable + is populated by `git submodule init` from the + linkgit:gitmodules[5] file. See description of 'update' + command in linkgit:git-submodule[1]. submodule.<name>.branch:: The remote branch name for a submodule, used by `git submodule @@ -2455,9 +2506,9 @@ transfer.fsckObjects:: not set, the value of this variable is used instead. Defaults to false. -transfer.hiderefs:: - This variable can be used to set both `receive.hiderefs` - and `uploadpack.hiderefs` at the same time to the same +transfer.hideRefs:: + This variable can be used to set both `receive.hideRefs` + and `uploadpack.hideRefs` at the same time to the same values. See entries for these other variables. transfer.unpackLimit:: @@ -2472,7 +2523,7 @@ uploadarchive.allowUnreachable:: linkgit:git-upload-archive[1] for more details. Defaults to `false`. -uploadpack.hiderefs:: +uploadpack.hideRefs:: String(s) `upload-pack` uses to decide which refs to omit from its initial advertisement. Use more than one definitions to specify multiple prefix strings. A ref that @@ -2482,12 +2533,12 @@ uploadpack.hiderefs:: fetch` will fail. See also `uploadpack.allowtipsha1inwant`. uploadpack.allowtipsha1inwant:: - When `uploadpack.hiderefs` is in effect, allow `upload-pack` + When `uploadpack.hideRefs` is in effect, allow `upload-pack` to accept a fetch request that asks for an object at the tip of a hidden ref (by default, such a request is rejected). - see also `uploadpack.hiderefs`. + see also `uploadpack.hideRefs`. -uploadpack.keepalive:: +uploadpack.keepAlive:: When `upload-pack` has started `pack-objects`, there may be a quiet period while `pack-objects` prepares the pack. Normally it would output progress information, but if `--quiet` was used @@ -2495,7 +2546,7 @@ uploadpack.keepalive:: the pack data begins. Some clients and networks may consider the server to be hung and give up. Setting this option instructs `upload-pack` to send an empty keepalive packet every - `uploadpack.keepalive` seconds. Setting this option to 0 + `uploadpack.keepAlive` seconds. Setting this option to 0 disables keepalive packets entirely. The default is 5 seconds. url.<base>.insteadOf:: @@ -2532,13 +2583,25 @@ user.name:: Can be overridden by the 'GIT_AUTHOR_NAME' and 'GIT_COMMITTER_NAME' environment variables. See linkgit:git-commit-tree[1]. -user.signingkey:: +user.signingKey:: If linkgit:git-tag[1] or linkgit:git-commit[1] is not selecting the key you want it to automatically when creating a signed tag or commit, you can override the default selection with this variable. This option is passed unchanged to gpg's --local-user parameter, so you may specify a key using any method that gpg supports. +versionsort.prereleaseSuffix:: + When version sort is used in linkgit:git-tag[1], prerelease + tags (e.g. "1.0-rc1") may appear after the main release + "1.0". By specifying the suffix "-rc" in this variable, + "1.0-rc1" will appear before "1.0". ++ +This variable can be specified multiple times, once per suffix. The +order of suffixes in the config file determines the sorting order +(e.g. if "-pre" appears before "-rc" in the config file then 1.0-preXX +is sorted before 1.0-rcXX). The sorting order between different +suffixes is undefined if they are in multiple config files. + web.browser:: Specify a web browser that may be used by some commands. Currently only linkgit:git-instaweb[1] and linkgit:git-help[1] diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt index b001779520..6eaa45271c 100644 --- a/Documentation/diff-config.txt +++ b/Documentation/diff-config.txt @@ -1,4 +1,4 @@ -diff.autorefreshindex:: +diff.autoRefreshIndex:: When using 'git diff' to compare with work tree files, do not consider stat-only change as changed. Instead, silently run `git update-index --refresh` to @@ -75,11 +75,11 @@ diff.ignoreSubmodules:: commands such as 'git diff-files'. 'git checkout' also honors this setting when reporting uncommitted changes. Setting it to 'all' disables the submodule summary normally shown by 'git commit' - and 'git status' when 'status.submodulesummary' is set unless it is + and 'git status' when 'status.submoduleSummary' is set unless it is overridden by using the --ignore-submodules command-line option. The 'git submodule' commands are not affected by this setting. -diff.mnemonicprefix:: +diff.mnemonicPrefix:: If set, 'git diff' uses a prefix pair that is different from the standard "a/" and "b/" depending on what is being compared. When this configuration is in effect, reverse diff output also swaps @@ -98,7 +98,7 @@ diff.mnemonicprefix:: diff.noprefix:: If set, 'git diff' does not show any source or destination prefix. -diff.orderfile:: +diff.orderFile:: File indicating how to order files within a diff, using one shell glob pattern per line. Can be overridden by the '-O' option to linkgit:git-diff[1]. @@ -148,7 +148,7 @@ diff.<driver>.textconv:: conversion is used to generate a human-readable diff. See linkgit:gitattributes[5] for details. -diff.<driver>.wordregex:: +diff.<driver>.wordRegex:: The regular expression that the diff driver should use to split words in a line. See linkgit:gitattributes[5] for details. diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt index 15c7e794f4..85b08909ce 100644 --- a/Documentation/diff-format.txt +++ b/Documentation/diff-format.txt @@ -66,7 +66,8 @@ be committed) Status letters C and R are always followed by a score (denoting the percentage of similarity between the source and target of the move or -copy), and are the only ones to be so. +copy). Status letter M may be followed by a score (denoting the +percentage of dissimilarity) for file rewrites. <sha1> is shown as all 0's if a file is new on the filesystem and it is out of sync with the index. diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 6cb083aae5..ccd499867b 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -432,8 +432,8 @@ endif::git-format-patch[] -O<orderfile>:: Output the patch in the order specified in the <orderfile>, which has one shell glob pattern per line. - This overrides the `diff.orderfile` configuration variable - (see linkgit:git-config[1]). To cancel `diff.orderfile`, + This overrides the `diff.orderFile` configuration variable + (see linkgit:git-config[1]). To cancel `diff.orderFile`, use `-O/dev/null`. ifndef::git-format-patch[] diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index b09a783ee3..45583d8454 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -68,7 +68,7 @@ endif::git-pull[] By default, tags that point at objects that are downloaded from the remote repository are fetched and stored locally. This option disables this automatic tag following. The default - behavior for a remote may be specified with the remote.<name>.tagopt + behavior for a remote may be specified with the remote.<name>.tagOpt setting. See linkgit:git-config[1]. ifndef::git-pull[] diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index 1c74907dd4..f2eb9076d7 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -173,7 +173,7 @@ for "git add --no-all <pathspec>...", i.e. ignored removed files. Configuration ------------- -The optional configuration variable `core.excludesfile` indicates a path to a +The optional configuration variable `core.excludesFile` indicates a path to a file containing patterns of file names to exclude from git-add, similar to $GIT_DIR/info/exclude. Patterns in the exclude file are used in addition to those in info/exclude. See linkgit:gitignore[5]. @@ -317,7 +317,7 @@ After deciding the fate for all hunks, if there is any hunk that was chosen, the index is updated with the selected hunks. + You can omit having to type return here, by setting the configuration -variable `interactive.singlekey` to `true`. +variable `interactive.singleKey` to `true`. diff:: diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index f4eea28dc4..0d8ba48f79 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -52,7 +52,8 @@ OPTIONS -c:: --scissors:: Remove everything in body before a scissors line (see - linkgit:git-mailinfo[1]). + linkgit:git-mailinfo[1]). Can be activated by default using + the `mailinfo.scissors` configuration variable. --no-scissors:: Ignore scissors lines (see linkgit:git-mailinfo[1]). diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index f605327946..d9ed6a1a4e 100644 --- a/Documentation/git-apply.txt +++ b/Documentation/git-apply.txt @@ -16,7 +16,7 @@ SYNOPSIS [--ignore-space-change | --ignore-whitespace ] [--whitespace=(nowarn|warn|fix|error|error-all)] [--exclude=<path>] [--include=<path>] [--directory=<root>] - [--verbose] [<patch>...] + [--verbose] [--unsafe-paths] [<patch>...] DESCRIPTION ----------- @@ -229,10 +229,20 @@ For example, a patch that talks about updating `a/git-gui.sh` to `b/git-gui.sh` can be applied to the file in the working tree `modules/git-gui/git-gui.sh` by running `git apply --directory=modules/git-gui`. +--unsafe-paths:: + By default, a patch that affects outside the working area + (either a Git controlled working tree, or the current working + directory when "git apply" is used as a replacement of GNU + patch) is rejected as a mistake (or a mischief). ++ +When `git apply` is used as a "better GNU patch", the user can pass +the `--unsafe-paths` option to override this safety check. This option +has no effect when `--index` or `--cached` is in use. + Configuration ------------- -apply.ignorewhitespace:: +apply.ignoreWhitespace:: Set to 'change' if you want changes in whitespace to be ignored by default. Set to one of: no, none, never, false if you want changes in whitespace to be significant. diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 311b33674e..359619b552 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -51,7 +51,7 @@ When a local branch is started off a remote-tracking branch, Git sets up the branch (specifically the `branch.<name>.remote` and `branch.<name>.merge` configuration entries) so that 'git pull' will appropriately merge from the remote-tracking branch. This behavior may be changed via the global -`branch.autosetupmerge` configuration flag. That setting can be +`branch.autoSetupMerge` configuration flag. That setting can be overridden by using the `--track` and `--no-track` options, and changed later using `git branch --set-upstream-to`. @@ -166,14 +166,14 @@ This option is only applicable in non-verbose mode. upstream when the new branch is checked out. + This behavior is the default when the start point is a remote-tracking branch. -Set the branch.autosetupmerge configuration variable to `false` if you +Set the branch.autoSetupMerge configuration variable to `false` if you want `git checkout` and `git branch` to always behave as if '--no-track' were given. Set it to `always` if you want this behavior when the start-point is either a local or remote-tracking branch. --no-track:: Do not set up "upstream" configuration, even if the - branch.autosetupmerge configuration variable is true. + branch.autoSetupMerge configuration variable is true. --set-upstream:: If specified branch does not exist yet or if `--force` has been diff --git a/Documentation/git-check-ignore.txt b/Documentation/git-check-ignore.txt index 788a011580..e35cd0489b 100644 --- a/Documentation/git-check-ignore.txt +++ b/Documentation/git-check-ignore.txt @@ -72,7 +72,7 @@ matching pattern, <source> is the pattern's source file, and <linenum> is the line number of the pattern within that source. If the pattern contained a `!` prefix or `/` suffix, it will be preserved in the output. <source> will be an absolute path when referring to the file -configured by `core.excludesfile`, or relative to the repository root +configured by `core.excludesFile`, or relative to the repository root when referring to `.git/info/exclude` or a per-directory exclude file. If `-z` is specified, the pathnames in the output are delimited by the diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 33ad2adf5c..d5041082e8 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -144,7 +144,7 @@ explicitly give a name with '-b' in such a case. --no-track:: Do not set up "upstream" configuration, even if the - branch.autosetupmerge configuration variable is true. + branch.autoSetupMerge configuration variable is true. -l:: Create the new branch's reflog; see linkgit:git-branch[1] for @@ -210,7 +210,7 @@ the conflicted merge in the specified paths. --conflict=<style>:: The same as --merge option above, but changes the way the conflicting hunks are presented, overriding the - merge.conflictstyle configuration variable. Possible values are + merge.conflictStyle configuration variable. Possible values are "merge" (default) and "diff3" (in addition to what is shown by "merge" style, shows the original contents). diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt index 94b6d19cf2..641681f61a 100644 --- a/Documentation/git-clean.txt +++ b/Documentation/git-clean.txt @@ -34,8 +34,12 @@ OPTIONS -f:: --force:: If the Git configuration variable clean.requireForce is not set - to false, 'git clean' will refuse to run unless given -f, -n or - -i. + to false, 'git clean' will refuse to delete files or directories + unless given -f, -n or -i. Git will refuse to delete directories + with .git sub directory or file unless a second -f + is given. This affects also git submodules where the storage area + of the removed submodule under .git/modules/ is not removed until + -f is given twice. -i:: --interactive:: diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt index a469eab066..f5f2a8d326 100644 --- a/Documentation/git-commit-tree.txt +++ b/Documentation/git-commit-tree.txt @@ -59,7 +59,7 @@ OPTIONS GPG-sign commit. --no-gpg-sign:: - Countermand `commit.gpgsign` configuration variable that is + Countermand `commit.gpgSign` configuration variable that is set to force each and every commit to be signed. diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 1e74b75d38..617e29b38b 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -284,6 +284,10 @@ configuration variable documented in linkgit:git-config[1]. would be committed at the bottom of the commit message template. Note that this diff output doesn't have its lines prefixed with '#'. ++ +If specified twice, show in addition the unified diff between +what would be committed and the worktree files, i.e. the unstaged +changes to tracked files. -q:: --quiet:: @@ -310,7 +314,7 @@ configuration variable documented in linkgit:git-config[1]. GPG-sign commit. --no-gpg-sign:: - Countermand `commit.gpgsign` configuration variable that is + Countermand `commit.gpgSign` configuration variable that is set to force each and every commit to be signed. \--:: diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index 9dfa1a5ce2..02ec096faa 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@ -405,7 +405,7 @@ true % git config --bool --get-urlmatch http.sslverify https://weak.example.com false % git config --get-urlmatch http https://weak.example.com -http.cookiefile /tmp/cookie.txt +http.cookieFile /tmp/cookie.txt http.sslverify false ------------ diff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt index 4961f1abda..db4d7a917c 100644 --- a/Documentation/git-cvsserver.txt +++ b/Documentation/git-cvsserver.txt @@ -154,7 +154,7 @@ with CVS_SERVER (and shouldn't) as 'git-shell' understands `cvs` to mean [gitcvs] enabled=1 # optional for debugging - logfile=/path/to/logfile + logFile=/path/to/logfile ------ Note: you need to ensure each user that is going to invoke 'git-cvsserver' has @@ -254,14 +254,14 @@ Configuring database backend its documentation if changing these variables, especially about `DBI->connect()`. -gitcvs.dbname:: +gitcvs.dbName:: Database name. The exact meaning depends on the selected database driver, for SQLite this is a filename. Supports variable substitution (see below). May not contain semicolons (`;`). Default: '%Ggitcvs.%m.sqlite' -gitcvs.dbdriver:: +gitcvs.dbDriver:: Used DBI driver. You can specify any available driver for this here, but it might not work. cvsserver is tested with 'DBD::SQLite', reported to work with @@ -271,12 +271,12 @@ gitcvs.dbdriver:: Default: 'SQLite' gitcvs.dbuser:: - Database user. Only useful if setting `dbdriver`, since + Database user. Only useful if setting `dbDriver`, since SQLite has no concept of database users. Supports variable substitution (see below). -gitcvs.dbpass:: - Database password. Only useful if setting `dbdriver`, since +gitcvs.dbPass:: + Database password. Only useful if setting `dbDriver`, since SQLite has no concept of database passwords. gitcvs.dbTableNamePrefix:: @@ -288,7 +288,7 @@ All variables can also be set per access method, see <<configaccessmethod,above> Variable substitution ^^^^^^^^^^^^^^^^^^^^^ -In `dbdriver` and `dbuser` you can use the following variables: +In `dbDriver` and `dbUser` you can use the following variables: %G:: Git directory name @@ -413,16 +413,16 @@ about end-of-line conversion. Alternatively, if `gitcvs.usecrlfattr` config is not enabled or the attributes do not allow automatic detection for a filename, then -the server uses the `gitcvs.allbinary` config for the default setting. -If `gitcvs.allbinary` is set, then file not otherwise +the server uses the `gitcvs.allBinary` config for the default setting. +If `gitcvs.allBinary` is set, then file not otherwise specified will default to '-kb' mode. Otherwise the '-k' mode -is left blank. But if `gitcvs.allbinary` is set to "guess", then +is left blank. But if `gitcvs.allBinary` is set to "guess", then the correct '-k' mode will be guessed based on the contents of the file. For best consistency with 'cvs', it is probably best to override the defaults by setting `gitcvs.usecrlfattr` to true, -and `gitcvs.allbinary` to "guess". +and `gitcvs.allBinary` to "guess". Dependencies ------------ diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt index 8deb61469d..e62d9a0717 100644 --- a/Documentation/git-fetch.txt +++ b/Documentation/git-fetch.txt @@ -26,7 +26,7 @@ By default, any tag that points into the histories being fetched is also fetched; the effect is to fetch tags that point at branches that you are interested in. This default behavior can be changed by using the --tags or --no-tags options or by -configuring remote.<name>.tagopt. By using a refspec that fetches tags +configuring remote.<name>.tagOpt. By using a refspec that fetches tags explicitly, you can fetch tags that do not point into branches you are interested in as well. diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index c0fd470da4..bb3ea9372f 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -273,13 +273,13 @@ attachments, and sign off patches with configuration variables. ------------ [format] headers = "Organization: git-foo\n" - subjectprefix = CHANGE + subjectPrefix = CHANGE suffix = .txt numbered = auto to = <email> cc = <email> attach [ = mime-boundary-string ] - signoff = true + signOff = true coverletter = auto ------------ diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index 273c4663c8..52234987f9 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -54,10 +54,10 @@ all loose objects are combined into a single pack using `git repack -d -l`. Setting the value of `gc.auto` to 0 disables automatic packing of loose objects. + -If the number of packs exceeds the value of `gc.autopacklimit`, +If the number of packs exceeds the value of `gc.autoPackLimit`, then existing packs (except those marked with a `.keep` file) are consolidated into a single pack by using the `-A` option of -'git repack'. Setting `gc.autopacklimit` to 0 disables +'git repack'. Setting `gc.autoPackLimit` to 0 disables automatic consolidation of packs. --prune=<date>:: @@ -101,18 +101,18 @@ branches: ------------ [gc "refs/remotes/*"] reflogExpire = never - reflogexpireUnreachable = 3 days + reflogExpireUnreachable = 3 days ------------ -The optional configuration variable 'gc.rerereresolved' indicates +The optional configuration variable 'gc.rerereResolved' indicates how long records of conflicted merge you resolved earlier are kept. This defaults to 60 days. -The optional configuration variable 'gc.rerereunresolved' indicates +The optional configuration variable 'gc.rerereUnresolved' indicates how long records of conflicted merge you have not resolved are kept. This defaults to 15 days. -The optional configuration variable 'gc.packrefs' determines if +The optional configuration variable 'gc.packRefs' determines if 'git gc' runs 'git pack-refs'. This can be set to "notbare" to enable it within all non-bare repos or it can be set to a boolean value. This defaults to true. diff --git a/Documentation/git-imap-send.txt b/Documentation/git-imap-send.txt index 77aacf1309..5d1e4c80cd 100644 --- a/Documentation/git-imap-send.txt +++ b/Documentation/git-imap-send.txt @@ -44,7 +44,8 @@ OPTIONS --no-curl:: Talk to the IMAP server using git's own IMAP routines instead of - using libcurl. + using libcurl. Ignored if Git was built with the NO_OPENSSL option + set. CONFIGURATION diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt index 369f889bb4..8174d27efd 100644 --- a/Documentation/git-init.txt +++ b/Documentation/git-init.txt @@ -125,7 +125,7 @@ The template directory will be one of the following (in order): - the contents of the `$GIT_TEMPLATE_DIR` environment variable; - - the `init.templatedir` configuration variable; or + - the `init.templateDir` configuration variable; or - the default template directory: `/usr/share/git-core/templates`. diff --git a/Documentation/git-instaweb.txt b/Documentation/git-instaweb.txt index f3eef510f2..cc75b25022 100644 --- a/Documentation/git-instaweb.txt +++ b/Documentation/git-instaweb.txt @@ -76,7 +76,7 @@ You may specify configuration in your .git/config httpd = apache2 -f port = 4321 browser = konqueror - modulepath = /usr/lib/apache2/modules + modulePath = /usr/lib/apache2/modules ----------------------------------------------------------------------- diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 1f7bc67d6c..18bc716a0c 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -184,7 +184,7 @@ log.date:: `--date` option.) Defaults to "default", which means to write dates like `Sat May 8 19:35:34 2010 -0500`. -log.showroot:: +log.showRoot:: If `false`, `git log` and related commands will not treat the initial commit as a big creation event. Any root commits in `git log -p` output would be shown without a diff attached. diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index cf2c374b71..1f94908e3c 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -232,7 +232,7 @@ Barbie's remark on your side. The only thing you can tell is that your side wants to say it is hard and you'd prefer to go shopping, while the other side wants to claim it is easy. -An alternative style can be used by setting the "merge.conflictstyle" +An alternative style can be used by setting the "merge.conflictStyle" configuration variable to "diff3". In "diff3" style, the above conflict may look like this: @@ -329,7 +329,7 @@ CONFIGURATION ------------- include::merge-config.txt[] -branch.<name>.mergeoptions:: +branch.<name>.mergeOptions:: Sets default options for merging into branch <name>. The syntax and supported options are the same as those of 'git merge', but option values containing whitespace characters are currently not supported. diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt index 6ab5f9497a..a1664b9f68 100644 --- a/Documentation/git-p4.txt +++ b/Documentation/git-p4.txt @@ -241,6 +241,9 @@ Git repository: Use a client spec to find the list of interesting files in p4. See the "CLIENT SPEC" section below. +-/ <path>:: + Exclude selected depot paths when cloning or syncing. + Clone options ~~~~~~~~~~~~~ These options can be used in an initial 'clone', along with the 'sync' @@ -254,9 +257,6 @@ options described above. --bare:: Perform a bare clone. See linkgit:git-clone[1]. --/ <path>:: - Exclude selected depot paths when cloning. - Submit options ~~~~~~~~~~~~~~ These options can be used to modify 'git p4 submit' behavior. diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt index 200eb22260..d3d236cd1f 100644 --- a/Documentation/git-pull.txt +++ b/Documentation/git-pull.txt @@ -117,7 +117,7 @@ locally created merge commits will not be flattened. + When false, merge the current branch into the upstream branch. + -See `pull.rebase`, `branch.<name>.rebase` and `branch.autosetuprebase` in +See `pull.rebase`, `branch.<name>.rebase` and `branch.autoSetupRebase` in linkgit:git-config[1] if you want to make `git pull` always use `--rebase` instead of merging. + diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index b17283ab7a..5171086181 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -9,7 +9,7 @@ git-push - Update remote refs along with associated objects SYNOPSIS -------- [verse] -'git push' [--all | --mirror | --tags] [--follow-tags] [-n | --dry-run] [--receive-pack=<git-receive-pack>] +'git push' [--all | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run] [--receive-pack=<git-receive-pack>] [--repo=<repository>] [-f | --force] [--prune] [-v | --verbose] [-u | --set-upstream] [--signed] [--force-with-lease[=<refname>[:<expect>]]] @@ -128,7 +128,10 @@ already exists on the remote side. Push all the refs that would be pushed without this option, and also push annotated tags in `refs/tags` that are missing from the remote but are pointing at commit-ish that are - reachable from the refs being pushed. + reachable from the refs being pushed. This can also be specified + with configuration variable 'push.followTags'. For more + information, see 'push.followTags' in linkgit:git-config[1]. + --signed:: GPG-sign the push request to update refs on the receiving @@ -136,6 +139,11 @@ already exists on the remote side. logged. See linkgit:git-receive-pack[1] for the details on the receiving end. +--[no-]atomic:: + Use an atomic transaction on the remote side if available. + Either all refs are updated, or on error, no refs are updated. + If the server does not support atomic pushes the push will fail. + --receive-pack=<git-receive-pack>:: --exec=<git-receive-pack>:: Path to the 'git-receive-pack' program on the remote @@ -214,22 +222,8 @@ origin +master` to force a push to the `master` branch). See the `<refspec>...` section above for details. --repo=<repository>:: - This option is only relevant if no <repository> argument is - passed in the invocation. In this case, 'git push' derives the - remote name from the current branch: If it tracks a remote - branch, then that remote repository is pushed to. Otherwise, - the name "origin" is used. For this latter case, this option - can be used to override the name "origin". In other words, - the difference between these two commands -+ --------------------------- -git push public #1 -git push --repo=public #2 --------------------------- -+ -is that #1 always pushes to "public" whereas #2 pushes to "public" -only if the current branch does not track a remote branch. This is -useful if you write an alias or script around 'git push'. + This option is equivalent to the <repository> argument. If both + are specified, the command-line argument takes precedence. -u:: --set-upstream:: diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 924827dc2e..d728030590 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -207,10 +207,10 @@ rebase.stat:: Whether to show a diffstat of what changed upstream since the last rebase. False by default. -rebase.autosquash:: +rebase.autoSquash:: If set to true enable '--autosquash' option by default. -rebase.autostash:: +rebase.autoStash:: If set to true enable '--autostash' option by default. OPTIONS @@ -414,7 +414,7 @@ squash/fixup series. This option is only valid when the '--interactive' option is used. + If the '--autosquash' option is enabled by default using the -configuration variable `rebase.autosquash`, this option can be +configuration variable `rebase.autoSquash`, this option can be used to override and disable this setting. --[no-]autostash:: diff --git a/Documentation/git-receive-pack.txt b/Documentation/git-receive-pack.txt index 9016960e27..000ee8dba2 100644 --- a/Documentation/git-receive-pack.txt +++ b/Documentation/git-receive-pack.txt @@ -100,7 +100,7 @@ the following environment variables: starting time is different by this many seconds from the current session. Only meaningful when `GIT_PUSH_CERT_NONCE_STATUS` says `SLOP`. - Also read about `receive.certnonceslop` variable in + Also read about `receive.certNonceSlop` variable in linkgit:git-config[1]. This hook is called before any refname is updated and before any diff --git a/Documentation/git-reflog.txt b/Documentation/git-reflog.txt index 70791b9fd8..5e7908e4f7 100644 --- a/Documentation/git-reflog.txt +++ b/Documentation/git-reflog.txt @@ -17,85 +17,113 @@ The command takes various subcommands, and different options depending on the subcommand: [verse] -'git reflog expire' [--dry-run] [--stale-fix] [--verbose] - [--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>... -'git reflog delete' ref@\{specifier\}... 'git reflog' ['show'] [log-options] [<ref>] +'git reflog expire' [--expire=<time>] [--expire-unreachable=<time>] + [--rewrite] [--updateref] [--stale-fix] + [--dry-run] [--verbose] [--all | <refs>...] +'git reflog delete' [--rewrite] [--updateref] + [--dry-run] [--verbose] ref@\{specifier\}... + +Reference logs, or "reflogs", record when the tips of branches and +other references were updated in the local repository. Reflogs are +useful in various Git commands, to specify the old value of a +reference. For example, `HEAD@{2}` means "where HEAD used to be two +moves ago", `master@{one.week.ago}` means "where master used to point +to one week ago in this local repository", and so on. See +linkgit:gitrevisions[7] for more details. + +This command manages the information recorded in the reflogs. + +The "show" subcommand (which is also the default, in the absence of +any subcommands) shows the log of the reference provided in the +command-line (or `HEAD`, by default). The reflog covers all recent +actions, and in addition the `HEAD` reflog records branch switching. +`git reflog show` is an alias for `git log -g --abbrev-commit +--pretty=oneline`; see linkgit:git-log[1] for more information. + +The "expire" subcommand prunes older reflog entries. Entries older +than `expire` time, or entries older than `expire-unreachable` time +and not reachable from the current tip, are removed from the reflog. +This is typically not used directly by end users -- instead, see +linkgit:git-gc[1]. + +The "delete" subcommand deletes single entries from the reflog. Its +argument must be an _exact_ entry (e.g. "`git reflog delete +master@{2}`"). This subcommand is also typically not used directly by +end users. -Reflog is a mechanism to record when the tip of branches are -updated. This command is to manage the information recorded in it. -The subcommand "expire" is used to prune older reflog entries. -Entries older than `expire` time, or entries older than -`expire-unreachable` time and not reachable from the current -tip, are removed from the reflog. This is typically not used -directly by the end users -- instead, see linkgit:git-gc[1]. - -The subcommand "show" (which is also the default, in the absence of any -subcommands) will take all the normal log options, and show the log of -the reference provided in the command-line (or `HEAD`, by default). -The reflog will cover all recent actions (HEAD reflog records branch switching -as well). It is an alias for `git log -g --abbrev-commit --pretty=oneline`; -see linkgit:git-log[1]. +OPTIONS +------- -The reflog is useful in various Git commands, to specify the old value -of a reference. For example, `HEAD@{2}` means "where HEAD used to be -two moves ago", `master@{one.week.ago}` means "where master used to -point to one week ago", and so on. See linkgit:gitrevisions[7] for -more details. +Options for `show` +~~~~~~~~~~~~~~~~~~ -To delete single entries from the reflog, use the subcommand "delete" -and specify the _exact_ entry (e.g. "`git reflog delete master@{2}`"). +`git reflog show` accepts any of the options accepted by `git log`. -OPTIONS -------- +Options for `expire` +~~~~~~~~~~~~~~~~~~~~ ---stale-fix:: - This revamps the logic -- the definition of "broken commit" - becomes: a commit that is not reachable from any of the refs and - there is a missing object among the commit, tree, or blob - objects reachable from it that is not reachable from any of the - refs. -+ -This computation involves traversing all the reachable objects, i.e. it -has the same cost as 'git prune'. Fortunately, once this is run, we -should not have to ever worry about missing objects, because the current -prune and pack-objects know about reflogs and protect objects referred by -them. +--all:: + Process the reflogs of all references. --expire=<time>:: - Entries older than this time are pruned. Without the - option it is taken from configuration `gc.reflogExpire`, - which in turn defaults to 90 days. --expire=all prunes - entries regardless of their age; --expire=never turns off - pruning of reachable entries (but see --expire-unreachable). + Prune entries older than the specified time. If this option is + not specified, the expiration time is taken from the + configuration setting `gc.reflogExpire`, which in turn + defaults to 90 days. `--expire=all` prunes entries regardless + of their age; `--expire=never` turns off pruning of reachable + entries (but see `--expire-unreachable`). --expire-unreachable=<time>:: - Entries older than this time and not reachable from - the current tip of the branch are pruned. Without the - option it is taken from configuration - `gc.reflogExpireUnreachable`, which in turn defaults to - 30 days. --expire-unreachable=all prunes unreachable - entries regardless of their age; --expire-unreachable=never + Prune entries older than `<time>` that are not reachable from + the current tip of the branch. If this option is not + specified, the expiration time is taken from the configuration + setting `gc.reflogExpireUnreachable`, which in turn defaults + to 30 days. `--expire-unreachable=all` prunes unreachable + entries regardless of their age; `--expire-unreachable=never` turns off early pruning of unreachable entries (but see - --expire). - ---all:: - Instead of listing <refs> explicitly, prune all refs. + `--expire`). --updateref:: - Update the ref with the sha1 of the top reflog entry (i.e. - <ref>@\{0\}) after expiring or deleting. + Update the reference to the value of the top reflog entry (i.e. + <ref>@\{0\}) if the previous top entry was pruned. (This + option is ignored for symbolic references.) --rewrite:: - While expiring or deleting, adjust each reflog entry to ensure - that the `old` sha1 field points to the `new` sha1 field of the - previous entry. + If a reflog entry's predecessor is pruned, adjust its "old" + SHA-1 to be equal to the "new" SHA-1 field of the entry that + now precedes it. + +--stale-fix:: + Prune any reflog entries that point to "broken commits". A + broken commit is a commit that is not reachable from any of + the reference tips and that refers, directly or indirectly, to + a missing commit, tree, or blob object. ++ +This computation involves traversing all the reachable objects, i.e. it +has the same cost as 'git prune'. It is primarily intended to fix +corruption caused by garbage collecting using older versions of Git, +which didn't protect objects referred to by reflogs. + +-n:: +--dry-run:: + Do not actually prune any entries; just show what would have + been pruned. --verbose:: Print extra information on screen. + +Options for `delete` +~~~~~~~~~~~~~~~~~~~~ + +`git reflog delete` accepts options `--updateref`, `--rewrite`, `-n`, +`--dry-run`, and `--verbose`, with the same meanings as when they are +used with `expire`. + + GIT --- Part of the linkgit:git[1] suite diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt index cb103c8b6f..4c6d6de7b7 100644 --- a/Documentation/git-remote.txt +++ b/Documentation/git-remote.txt @@ -58,6 +58,9 @@ remote repository. With `--no-tags` option, `git fetch <name>` does not import tags from the remote repository. + +By default, only tags on fetched branches are imported +(see linkgit:git-fetch[1]). ++ With `-t <branch>` option, instead of the default glob refspec for the remote to track all branches under the `refs/remotes/<name>/` namespace, a refspec to track only `<branch>` @@ -130,17 +133,25 @@ branches, adds to that list. 'set-url':: -Changes URL remote points to. Sets first URL remote points to matching +Changes URLs for the remote. Sets first URL for remote <name> that matches regex <oldurl> (first URL if no <oldurl> is given) to <newurl>. If -<oldurl> doesn't match any URL, error occurs and nothing is changed. +<oldurl> doesn't match any URL, an error occurs and nothing is changed. + With '--push', push URLs are manipulated instead of fetch URLs. + -With '--add', instead of changing some URL, new URL is added. +With '--add', instead of changing existing URLs, new URL is added. ++ +With '--delete', instead of changing existing URLs, all URLs matching +regex <url> are deleted for remote <name>. Trying to delete all +non-push URLs is an error. + -With '--delete', instead of changing some URL, all URLs matching -regex <url> are deleted. Trying to delete all non-push URLs is an -error. +Note that the push URL and the fetch URL, even though they can +be set differently, must still refer to the same place. What you +pushed to the push URL should be what you would see if you +immediately fetched from the fetch URL. If you are trying to +fetch from one place (e.g. your upstream) and push to another (e.g. +your publishing repository), use two separate remotes. + 'show':: diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt index 4786a780b5..0e0bd363d6 100644 --- a/Documentation/git-repack.txt +++ b/Documentation/git-repack.txt @@ -115,7 +115,7 @@ other objects in that pack they already have locally. Write a reachability bitmap index as part of the repack. This only makes sense when used with `-a` or `-A`, as the bitmaps must be able to refer to all reachable objects. This option - overrides the setting of `pack.writebitmaps`. + overrides the setting of `pack.writeBitmaps`. --pack-kept-objects:: Include objects in `.keep` files when repacking. Note that we @@ -123,7 +123,7 @@ other objects in that pack they already have locally. This means that we may duplicate objects, but this makes the option safe to use when there are concurrent pushes or fetches. This option is generally only useful if you are writing bitmaps - with `-b` or `pack.writebitmaps`, as it ensures that the + with `-b` or `pack.writeBitmaps`, as it ensures that the bitmapped packfile has the necessary objects. Configuration diff --git a/Documentation/git-rerere.txt b/Documentation/git-rerere.txt index a62227f84e..9ee083c415 100644 --- a/Documentation/git-rerere.txt +++ b/Documentation/git-rerere.txt @@ -69,7 +69,7 @@ Prune records of conflicted merges that occurred a long time ago. By default, unresolved conflicts older than 15 days and resolved conflicts older than 60 days are pruned. These defaults are controlled via the -`gc.rerereunresolved` and `gc.rerereresolved` configuration +`gc.rerereUnresolved` and `gc.rerereResolved` configuration variables respectively. diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index f248a8665e..804554609d 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -47,7 +47,7 @@ Composing --annotate:: Review and edit each patch you're about to send. Default is the value of 'sendemail.annotate'. See the CONFIGURATION section for - 'sendemail.multiedit'. + 'sendemail.multiEdit'. --bcc=<address>:: Specify a "Bcc:" value for each email. Default is the value of @@ -73,7 +73,7 @@ and In-Reply-To headers will be used unless they are removed. + Missing From or In-Reply-To headers will be prompted for. + -See the CONFIGURATION section for 'sendemail.multiedit'. +See the CONFIGURATION section for 'sendemail.multiEdit'. --from=<address>:: Specify the sender of the emails. If not specified on the command line, @@ -156,31 +156,31 @@ Sending subscribed to a list. In order to use the 'From' address, set the value to "auto". If you use the sendmail binary, you must have suitable privileges for the -f parameter. Default is the value of the - 'sendemail.envelopesender' configuration variable; if that is + 'sendemail.envelopeSender' configuration variable; if that is unspecified, choosing the envelope sender is left to your MTA. --smtp-encryption=<encryption>:: Specify the encryption to use, either 'ssl' or 'tls'. Any other value reverts to plain SMTP. Default is the value of - 'sendemail.smtpencryption'. + 'sendemail.smtpEncryption'. --smtp-domain=<FQDN>:: Specifies the Fully Qualified Domain Name (FQDN) used in the HELO/EHLO command to the SMTP server. Some servers require the FQDN to match your IP address. If not set, git send-email attempts to determine your FQDN automatically. Default is the value of - 'sendemail.smtpdomain'. + 'sendemail.smtpDomain'. --smtp-pass[=<password>]:: Password for SMTP-AUTH. The argument is optional: If no argument is specified, then the empty string is used as - the password. Default is the value of 'sendemail.smtppass', + the password. Default is the value of 'sendemail.smtpPass', however '--smtp-pass' always overrides this value. + Furthermore, passwords need not be specified in configuration files or on the command line. If a username has been specified (with -'--smtp-user' or a 'sendemail.smtpuser'), but no password has been -specified (with '--smtp-pass' or 'sendemail.smtppass'), then +'--smtp-user' or a 'sendemail.smtpUser'), but no password has been +specified (with '--smtp-pass' or 'sendemail.smtpPass'), then a password is obtained using 'git-credential'. --smtp-server=<host>:: @@ -188,7 +188,7 @@ a password is obtained using 'git-credential'. `smtp.example.com` or a raw IP address). Alternatively it can specify a full pathname of a sendmail-like program instead; the program must support the `-i` option. Default value can - be specified by the 'sendemail.smtpserver' configuration + be specified by the 'sendemail.smtpServer' configuration option; the built-in default is `/usr/sbin/sendmail` or `/usr/lib/sendmail` if such program is available, or `localhost` otherwise. @@ -199,11 +199,11 @@ a password is obtained using 'git-credential'. submission port 587, or the common SSL smtp port 465); symbolic port names (e.g. "submission" instead of 587) are also accepted. The port can also be set with the - 'sendemail.smtpserverport' configuration variable. + 'sendemail.smtpServerPort' configuration variable. --smtp-server-option=<option>:: If set, specifies the outgoing SMTP server option to use. - Default value can be specified by the 'sendemail.smtpserveroption' + Default value can be specified by the 'sendemail.smtpServerOption' configuration option. + The --smtp-server-option option must be repeated for each option you want @@ -225,8 +225,8 @@ must be used for each option. be the best choice on most platforms). --smtp-user=<user>:: - Username for SMTP-AUTH. Default is the value of 'sendemail.smtpuser'; - if a username is not specified (with '--smtp-user' or 'sendemail.smtpuser'), + Username for SMTP-AUTH. Default is the value of 'sendemail.smtpUser'; + if a username is not specified (with '--smtp-user' or 'sendemail.smtpUser'), then authentication is not attempted. --smtp-debug=0|1:: @@ -247,14 +247,14 @@ Automating Specify a command to execute once per patch file which should generate patch file specific "Cc:" entries. Output of this command must be single email address per line. - Default is the value of 'sendemail.cccmd' configuration value. + Default is the value of 'sendemail.ccCmd' configuration value. --[no-]chain-reply-to:: If this is set, each email will be sent as a reply to the previous email sent. If disabled with "--no-chain-reply-to", all emails after the first will be sent as replies to the first email sent. When using this, it is recommended that the first file given be an overview of the - entire patch series. Disabled by default, but the 'sendemail.chainreplyto' + entire patch series. Disabled by default, but the 'sendemail.chainReplyTo' configuration variable can be used to enable it. --identity=<identity>:: @@ -304,7 +304,7 @@ specified, as well as 'body' if --no-signed-off-cc is specified. --[no-]suppress-from:: If this is set, do not add the From: address to the cc: list. - Default is the value of 'sendemail.suppressfrom' configuration + Default is the value of 'sendemail.suppressFrom' configuration value; if that is unspecified, default to --no-suppress-from. --[no-]thread:: @@ -377,15 +377,15 @@ default to '--validate'. CONFIGURATION ------------- -sendemail.aliasesfile:: +sendemail.aliasesFile:: To avoid typing long email addresses, point this to one or more - email aliases files. You must also supply 'sendemail.aliasfiletype'. + email aliases files. You must also supply 'sendemail.aliasFileType'. -sendemail.aliasfiletype:: - Format of the file(s) specified in sendemail.aliasesfile. Must be +sendemail.aliasFileType:: + Format of the file(s) specified in sendemail.aliasesFile. Must be one of 'mutt', 'mailrc', 'pine', 'elm', or 'gnus'. -sendemail.multiedit:: +sendemail.multiEdit:: If true (default), a single editor instance will be spawned to edit files you have to edit (patches when '--annotate' is used, and the summary when '--compose' is used). If false, files will be edited one @@ -404,10 +404,10 @@ To use 'git send-email' to send your patches through the GMail SMTP server, edit ~/.gitconfig to specify your account settings: [sendemail] - smtpencryption = tls - smtpserver = smtp.gmail.com - smtpuser = yourname@gmail.com - smtpserverport = 587 + smtpEncryption = tls + smtpServer = smtp.gmail.com + smtpUser = yourname@gmail.com + smtpServerPort = 587 Once your commits are ready to be sent to the mailing list, run the following commands: diff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt index 2a0de42a75..45c7725dc3 100644 --- a/Documentation/git-send-pack.txt +++ b/Documentation/git-send-pack.txt @@ -9,7 +9,7 @@ git-send-pack - Push objects over Git protocol to another repository SYNOPSIS -------- [verse] -'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...] +'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [--atomic] [<host>:]<directory> [<ref>...] DESCRIPTION ----------- @@ -62,6 +62,11 @@ be in a separate packet, and the list must end with a flush packet. Send a "thin" pack, which records objects in deltified form based on objects not included in the pack to reduce network traffic. +--atomic:: + Use an atomic transaction for updating the refs. If any of the refs + fails to update then the entire push will fail without changing any + refs. + <host>:: A remote host to house the repository. When this part is specified, 'git-receive-pack' is invoked via diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt index 4d8d530d35..b3319f7c2a 100644 --- a/Documentation/git-status.txt +++ b/Documentation/git-status.txt @@ -77,7 +77,7 @@ configuration variable documented in linkgit:git-config[1]. only changes to the commits stored in the superproject are shown (this was the behavior before 1.7.0). Using "all" hides all changes to submodules (and suppresses the output of submodule summaries when the config option - `status.submodulesummary` is set). + `status.submoduleSummary` is set). --ignored:: Show ignored files as well. @@ -207,7 +207,7 @@ If the config variable `status.relativePaths` is set to false, then all paths shown are relative to the repository root, not to the current directory. -If `status.submodulesummary` is set to a non zero number or true (identical +If `status.submoduleSummary` is set to a non zero number or true (identical to -1 or an unlimited number), the submodule summary will be enabled for the long format and a summary of commits for modified submodules will be shown (see --summary-limit option of linkgit:git-submodule[1]). Please note diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index 8e6af65da0..2c25916f8f 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -154,27 +154,51 @@ If `--force` is specified, the submodule's work tree will be removed even if it contains local modifications. update:: - Update the registered submodules, i.e. clone missing submodules and - checkout the commit specified in the index of the containing repository. - This will make the submodules HEAD be detached unless `--rebase` or - `--merge` is specified or the key `submodule.$name.update` is set to - `rebase`, `merge` or `none`. `none` can be overridden by specifying - `--checkout`. Setting the key `submodule.$name.update` to `!command` - will cause `command` to be run. `command` can be any arbitrary shell - command that takes a single argument, namely the sha1 to update to. + +-- +Update the registered submodules to match what the superproject +expects by cloning missing submodules and updating the working tree of +the submodules. The "updating" can be done in several ways depending +on command line options and the value of `submodule.<name>.update` +configuration variable. Supported update procedures are: + + checkout;; the commit recorded in the superproject will be + checked out in the submodule on a detached HEAD. This is + done when `--checkout` option is given, or no option is + given, and `submodule.<name>.update` is unset, or if it is + set to 'checkout'. ++ +If `--force` is specified, the submodule will be checked out (using +`git checkout --force` if appropriate), even if the commit specified +in the index of the containing repository already matches the commit +checked out in the submodule. + + rebase;; the current branch of the submodule will be rebased + onto the commit recorded in the superproject. This is done + when `--rebase` option is given, or no option is given, and + `submodule.<name>.update` is set to 'rebase'. + + merge;; the commit recorded in the superproject will be merged + into the current branch in the submodule. This is done + when `--merge` option is given, or no option is given, and + `submodule.<name>.update` is set to 'merge'. + + custom command;; arbitrary shell command that takes a single + argument (the sha1 of the commit recorded in the + superproject) is executed. This is done when no option is + given, and `submodule.<name>.update` has the form of + '!command'. + +When no option is given and `submodule.<name>.update` is set to 'none', +the submodule is not updated. + If the submodule is not yet initialized, and you just want to use the setting as stored in .gitmodules, you can automatically initialize the submodule with the `--init` option. -+ + If `--recursive` is specified, this command will recurse into the registered submodules, and update any nested submodules within. -+ -If `--force` is specified, the submodule will be checked out (using -`git checkout --force` if appropriate), even if the commit specified in the -index of the containing repository already matches the commit checked out in -the submodule. - +-- summary:: Show commit summary between the given commit (defaults to HEAD) and working tree/index. For a submodule in question, a series of commits @@ -238,10 +262,12 @@ OPTIONS When running add, allow adding an otherwise ignored submodule path. When running deinit the submodule work trees will be removed even if they contain local changes. - When running update, throw away local changes in submodules when - switching to a different commit; and always run a checkout operation - in the submodule, even if the commit listed in the index of the - containing repository matches the commit checked out in the submodule. + When running update (only effective with the checkout procedure), + throw away local changes in submodules when switching to a + different commit; and always run a checkout operation in the + submodule, even if the commit listed in the index of the + containing repository matches the commit checked out in the + submodule. --cached:: This option is only valid for status and summary commands. These @@ -302,7 +328,7 @@ the submodule itself. Checkout the commit recorded in the superproject on a detached HEAD in the submodule. This is the default behavior, the main use of this option is to override `submodule.$name.update` when set to - `merge`, `rebase` or `none`. + a value other than `checkout`. If the key `submodule.$name.update` is either not explicitly set or set to `checkout`, this option is implicit. diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt index e953ba4439..bfba4ef078 100644 --- a/Documentation/git-tag.txt +++ b/Documentation/git-tag.txt @@ -161,7 +161,7 @@ it in the repository configuration as follows: ------------------------------------- [user] - signingkey = <gpg-key-id> + signingKey = <gpg-key-id> ------------------------------------- diff --git a/Documentation/git.txt b/Documentation/git.txt index eadbd05356..4749d1b4df 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -43,9 +43,13 @@ unreleased) version of Git, that is available from the 'master' branch of the `git.git` repository. Documentation for older releases are available here: -* link:v2.3.0/git.html[documentation for release 2.3] +* link:v2.3.4/git.html[documentation for release 2.3.4] * release notes for + link:RelNotes/2.3.4.txt[2.3.4], + link:RelNotes/2.3.3.txt[2.3.3], + link:RelNotes/2.3.2.txt[2.3.2], + link:RelNotes/2.3.1.txt[2.3.1], link:RelNotes/2.3.0.txt[2.3]. * link:v2.2.2/git.html[documentation for release 2.2.2] @@ -916,7 +920,7 @@ for further details. If this environment variable is set, then Git commands which need to acquire passwords or passphrases (e.g. for HTTP or IMAP authentication) will call this program with a suitable prompt as command-line argument - and read the password from its STDOUT. See also the 'core.askpass' + and read the password from its STDOUT. See also the 'core.askPass' option in linkgit:git-config[1]. 'GIT_TERMINAL_PROMPT':: diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt index c892ffa5ce..70899b3023 100644 --- a/Documentation/gitattributes.txt +++ b/Documentation/gitattributes.txt @@ -80,7 +80,7 @@ Attributes which should be version-controlled and distributed to other repositories (i.e., attributes of interest to all users) should go into `.gitattributes` files. Attributes that should affect all repositories for a single user should be placed in a file specified by the -`core.attributesfile` configuration option (see linkgit:git-config[1]). +`core.attributesFile` configuration option (see linkgit:git-config[1]). Its default value is $XDG_CONFIG_HOME/git/attributes. If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/attributes is used instead. Attributes for all users on a system should be placed in the diff --git a/Documentation/gitcredentials.txt b/Documentation/gitcredentials.txt index 47576be5db..1c75be0803 100644 --- a/Documentation/gitcredentials.txt +++ b/Documentation/gitcredentials.txt @@ -32,7 +32,7 @@ strategies to ask the user for usernames and passwords: to the program on the command line, and the user's input is read from its standard output. -2. Otherwise, if the `core.askpass` configuration variable is set, its +2. Otherwise, if the `core.askPass` configuration variable is set, its value is used as above. 3. Otherwise, if the `SSH_ASKPASS` environment variable is set, its diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt index 9ef2469373..7ba0ac965d 100644 --- a/Documentation/githooks.txt +++ b/Documentation/githooks.txt @@ -341,6 +341,36 @@ Both standard output and standard error output are forwarded to 'git send-pack' on the other end, so you can simply `echo` messages for the user. +push-to-checkout +~~~~~~~~~~~~~~~~ + +This hook is invoked by 'git-receive-pack' on the remote repository, +which happens when a 'git push' is done on a local repository, when +the push tries to update the branch that is currently checked out +and the `receive.denyCurrentBranch` configuration variable is set to +`updateInstead`. Such a push by default is refused if the working +tree and the index of the remote repository has any difference from +the currently checked out commit; when both the working tree and the +index match the current commit, they are updated to match the newly +pushed tip of the branch. This hook is to be used to override the +default behaviour. + +The hook receives the commit with which the tip of the current +branch is going to be updated. It can exit with a non-zero status +to refuse the push (when it does so, it must not modify the index or +the working tree). Or it can make any necessary changes to the +working tree and to the index to bring them to the desired state +when the tip of the current branch is updated to the new commit, and +exit with a zero status. + +For example, the hook can simply run `git read-tree -u -m HEAD "$1"` +in order to emulate 'git fetch' that is run in the reverse direction +with `git push`, as the two-tree form of `read-tree -u -m` is +essentially the same as `git checkout` that switches branches while +keeping the local changes in the working tree that do not interfere +with the difference between the branches. + + pre-auto-gc ~~~~~~~~~~~ diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt index 4fd04423e9..473623d631 100644 --- a/Documentation/gitignore.txt +++ b/Documentation/gitignore.txt @@ -38,7 +38,7 @@ precedence, the last matching pattern decides the outcome): * Patterns read from `$GIT_DIR/info/exclude`. * Patterns read from the file specified by the configuration - variable 'core.excludesfile'. + variable 'core.excludesFile'. Which file to place a pattern in depends on how the pattern is meant to be used. @@ -56,7 +56,7 @@ be used. * Patterns which a user wants Git to ignore in all situations (e.g., backup or temporary files generated by the user's editor of choice) generally go into a file specified by - `core.excludesfile` in the user's `~/.gitconfig`. Its default value is + `core.excludesFile` in the user's `~/.gitconfig`. Its default value is $XDG_CONFIG_HOME/git/ignore. If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/ignore is used instead. diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt index f6c0dfd029..ac70eca321 100644 --- a/Documentation/gitmodules.txt +++ b/Documentation/gitmodules.txt @@ -38,18 +38,15 @@ submodule.<name>.url:: In addition, there are a number of optional keys: submodule.<name>.update:: - Defines what to do when the submodule is updated by the superproject. - If 'checkout' (the default), the new commit specified in the - superproject will be checked out in the submodule on a detached HEAD. - If 'rebase', the current branch of the submodule will be rebased onto - the commit specified in the superproject. If 'merge', the commit - specified in the superproject will be merged into the current branch - in the submodule. - If 'none', the submodule with name `$name` will not be updated - by default. - - This config option is overridden if 'git submodule update' is given - the '--merge', '--rebase' or '--checkout' options. + Defines the default update procedure for the named submodule, + i.e. how the submodule is updated by "git submodule update" + command in the superproject. This is only used by `git + submodule init` to initialize the configuration variable of + the same name. Allowed values here are 'checkout', 'rebase', + 'merge' or 'none'. See description of 'update' command in + linkgit:git-submodule[1] for their meaning. Note that the + '!command' form is intentionally ignored here for security + reasons. submodule.<name>.branch:: A remote branch name for tracking updates in the upstream submodule. diff --git a/Documentation/gitweb.conf.txt b/Documentation/gitweb.conf.txt index ebe7a6c24c..0506f07d74 100644 --- a/Documentation/gitweb.conf.txt +++ b/Documentation/gitweb.conf.txt @@ -706,7 +706,7 @@ show-sizes:: I/O. Enabled by default. + This feature can be configured on a per-repository basis via -repository's `gitweb.showsizes` configuration variable (boolean). +repository's `gitweb.showSizes` configuration variable (boolean). patches:: Enable and configure "patches" view, which displays list of commits in email diff --git a/Documentation/merge-config.txt b/Documentation/merge-config.txt index d78d6d854e..8a0e52f8ee 100644 --- a/Documentation/merge-config.txt +++ b/Documentation/merge-config.txt @@ -1,4 +1,4 @@ -merge.conflictstyle:: +merge.conflictStyle:: Specify the style in which conflicted hunks are written out to working tree files upon merge. The default is "merge", which shows a `<<<<<<<` conflict marker, changes made by one side, diff --git a/Documentation/pretty-options.txt b/Documentation/pretty-options.txt index 8569e29d08..74aa01a0ec 100644 --- a/Documentation/pretty-options.txt +++ b/Documentation/pretty-options.txt @@ -3,9 +3,13 @@ Pretty-print the contents of the commit logs in a given format, where '<format>' can be one of 'oneline', 'short', 'medium', - 'full', 'fuller', 'email', 'raw' and 'format:<string>'. See - the "PRETTY FORMATS" section for some additional details for each - format. When omitted, the format defaults to 'medium'. + 'full', 'fuller', 'email', 'raw', 'format:<string>' + and 'tformat:<string>'. When '<format>' is none of the above, + and has '%placeholder' in it, it acts as if + '--pretty=tformat:<format>' were given. ++ +See the "PRETTY FORMATS" section for some additional details for each +format. When '=<format>' part is omitted, it defaults to 'medium'. + Note: you can specify the default pretty format in the repository configuration (see linkgit:git-config[1]). diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index 2984f407a9..f620ee4e1c 100644 --- a/Documentation/rev-list-options.txt +++ b/Documentation/rev-list-options.txt @@ -66,6 +66,10 @@ if it is part of the log message. Limit the commits output to ones that match all given `--grep`, instead of ones that match at least one. +--invert-grep:: + Limit the commits output to ones with log message that do not + match the pattern specified with `--grep=<pattern>`. + -i:: --regexp-ignore-case:: Match the regular expression limiting patterns without regard to letter @@ -119,7 +123,8 @@ parents) and `--max-parents=-1` (negative numbers denote no upper limit). because merges into a topic branch tend to be only about adjusting to updated upstream from time to time, and this option allows you to ignore the individual commits - brought in to your history by such a merge. + brought in to your history by such a merge. Cannot be + combined with --bisect. --not:: Reverses the meaning of the '{caret}' prefix (or lack thereof) @@ -172,11 +177,6 @@ explicitly. Pretend as if all objects mentioned by reflogs are listed on the command line as `<commit>`. ---indexed-objects:: - Pretend as if all trees and blobs used by the index are listed - on the command line. Note that you probably want to use - `--objects`, too. - --ignore-missing:: Upon seeing an invalid object name in the input, pretend as if the bad input was not given. @@ -186,7 +186,7 @@ ifndef::git-rev-list[] Pretend as if the bad bisection ref `refs/bisect/bad` was listed and as if it was followed by `--not` and the good bisection refs `refs/bisect/good-*` on the command - line. + line. Cannot be combined with --first-parent. endif::git-rev-list[] --stdin:: @@ -567,7 +567,7 @@ outputs 'midpoint', the output of the two commands would be of roughly the same length. Finding the change which introduces a regression is thus reduced to a binary search: repeatedly generate and test new 'midpoint's until the commit chain is of length -one. +one. Cannot be combined with --first-parent. --bisect-vars:: This calculates the same as `--bisect`, except that refs in @@ -644,6 +644,7 @@ Object Traversal These options are mostly targeted for packing of Git repositories. +ifdef::git-rev-list[] --objects:: Print the object IDs of any object referenced by the listed commits. `--objects foo ^bar` thus means ``send me @@ -662,9 +663,15 @@ These options are mostly targeted for packing of Git repositories. commits at the cost of increased time. This is used instead of `--objects-edge` to build ``thin'' packs for shallow repositories. +--indexed-objects:: + Pretend as if all trees and blobs used by the index are listed + on the command line. Note that you probably want to use + `--objects`, too. + --unpacked:: Only useful with `--objects`; print the object IDs that are not in packs. +endif::git-rev-list[] --no-walk[=(sorted|unsorted)]:: Only show the given commits, but do not traverse their ancestors. @@ -673,6 +680,7 @@ These options are mostly targeted for packing of Git repositories. given on the command line. Otherwise (if `sorted` or no argument was given), the commits are shown in reverse chronological order by commit time. + Cannot be combined with `--graph`. --do-walk:: Overrides a previous `--no-walk`. @@ -775,6 +783,7 @@ you would get an output like this: on the left hand side of the output. This may cause extra lines to be printed in between commits, in order for the graph history to be drawn properly. + Cannot be combined with `--no-walk`. + This enables parent rewriting, see 'History Simplification' below. + diff --git a/Documentation/technical/api-error-handling.txt b/Documentation/technical/api-error-handling.txt new file mode 100644 index 0000000000..fc68db126e --- /dev/null +++ b/Documentation/technical/api-error-handling.txt @@ -0,0 +1,75 @@ +Error reporting in git +====================== + +`die`, `usage`, `error`, and `warning` report errors of various +kinds. + +- `die` is for fatal application errors. It prints a message to + the user and exits with status 128. + +- `usage` is for errors in command line usage. After printing its + message, it exits with status 129. (See also `usage_with_options` + in the link:api-parse-options.html[parse-options API].) + +- `error` is for non-fatal library errors. It prints a message + to the user and returns -1 for convenience in signaling the error + to the caller. + +- `warning` is for reporting situations that probably should not + occur but which the user (and Git) can continue to work around + without running into too many problems. Like `error`, it + returns -1 after reporting the situation to the caller. + +Customizable error handlers +--------------------------- + +The default behavior of `die` and `error` is to write a message to +stderr and then exit or return as appropriate. This behavior can be +overridden using `set_die_routine` and `set_error_routine`. For +example, "git daemon" uses set_die_routine to write the reason `die` +was called to syslog before exiting. + +Library errors +-------------- + +Functions return a negative integer on error. Details beyond that +vary from function to function: + +- Some functions return -1 for all errors. Others return a more + specific value depending on how the caller might want to react + to the error. + +- Some functions report the error to stderr with `error`, + while others leave that for the caller to do. + +- errno is not meaningful on return from most functions (except + for thin wrappers for system calls). + +Check the function's API documentation to be sure. + +Caller-handled errors +--------------------- + +An increasing number of functions take a parameter 'struct strbuf *err'. +On error, such functions append a message about what went wrong to the +'err' strbuf. The message is meant to be complete enough to be passed +to `die` or `error` as-is. For example: + + if (ref_transaction_commit(transaction, &err)) + die("%s", err.buf); + +The 'err' parameter will be untouched if no error occured, so multiple +function calls can be chained: + + t = ref_transaction_begin(&err); + if (!t || + ref_transaction_update(t, "HEAD", ..., &err) || + ret_transaction_commit(t, &err)) + die("%s", err.buf); + +The 'err' parameter must be a pointer to a valid strbuf. To silence +a message, pass a strbuf that is explicitly ignored: + + if (thing_that_can_fail_in_an_ignorable_way(..., &err)) + /* This failure is okay. */ + strbuf_reset(&err); diff --git a/Documentation/technical/api-strbuf.txt b/Documentation/technical/api-strbuf.txt deleted file mode 100644 index cca6543234..0000000000 --- a/Documentation/technical/api-strbuf.txt +++ /dev/null @@ -1,351 +0,0 @@ -strbuf API -========== - -strbuf's are meant to be used with all the usual C string and memory -APIs. Given that the length of the buffer is known, it's often better to -use the mem* functions than a str* one (memchr vs. strchr e.g.). -Though, one has to be careful about the fact that str* functions often -stop on NULs and that strbufs may have embedded NULs. - -A strbuf is NUL terminated for convenience, but no function in the -strbuf API actually relies on the string being free of NULs. - -strbufs have some invariants that are very important to keep in mind: - -. The `buf` member is never NULL, so it can be used in any usual C -string operations safely. strbuf's _have_ to be initialized either by -`strbuf_init()` or by `= STRBUF_INIT` before the invariants, though. -+ -Do *not* assume anything on what `buf` really is (e.g. if it is -allocated memory or not), use `strbuf_detach()` to unwrap a memory -buffer from its strbuf shell in a safe way. That is the sole supported -way. This will give you a malloced buffer that you can later `free()`. -+ -However, it is totally safe to modify anything in the string pointed by -the `buf` member, between the indices `0` and `len-1` (inclusive). - -. The `buf` member is a byte array that has at least `len + 1` bytes - allocated. The extra byte is used to store a `'\0'`, allowing the - `buf` member to be a valid C-string. Every strbuf function ensure this - invariant is preserved. -+ -NOTE: It is OK to "play" with the buffer directly if you work it this - way: -+ ----- -strbuf_grow(sb, SOME_SIZE); <1> -strbuf_setlen(sb, sb->len + SOME_OTHER_SIZE); ----- -<1> Here, the memory array starting at `sb->buf`, and of length -`strbuf_avail(sb)` is all yours, and you can be sure that -`strbuf_avail(sb)` is at least `SOME_SIZE`. -+ -NOTE: `SOME_OTHER_SIZE` must be smaller or equal to `strbuf_avail(sb)`. -+ -Doing so is safe, though if it has to be done in many places, adding the -missing API to the strbuf module is the way to go. -+ -WARNING: Do _not_ assume that the area that is yours is of size `alloc -- 1` even if it's true in the current implementation. Alloc is somehow a -"private" member that should not be messed with. Use `strbuf_avail()` -instead. - -Data structures ---------------- - -* `struct strbuf` - -This is the string buffer structure. The `len` member can be used to -determine the current length of the string, and `buf` member provides -access to the string itself. - -Functions ---------- - -* Life cycle - -`strbuf_init`:: - - Initialize the structure. The second parameter can be zero or a bigger - number to allocate memory, in case you want to prevent further reallocs. - -`strbuf_release`:: - - Release a string buffer and the memory it used. You should not use the - string buffer after using this function, unless you initialize it again. - -`strbuf_detach`:: - - Detach the string from the strbuf and returns it; you now own the - storage the string occupies and it is your responsibility from then on - to release it with `free(3)` when you are done with it. - -`strbuf_attach`:: - - Attach a string to a buffer. You should specify the string to attach, - the current length of the string and the amount of allocated memory. - The amount must be larger than the string length, because the string you - pass is supposed to be a NUL-terminated string. This string _must_ be - malloc()ed, and after attaching, the pointer cannot be relied upon - anymore, and neither be free()d directly. - -`strbuf_swap`:: - - Swap the contents of two string buffers. - -* Related to the size of the buffer - -`strbuf_avail`:: - - Determine the amount of allocated but unused memory. - -`strbuf_grow`:: - - Ensure that at least this amount of unused memory is available after - `len`. This is used when you know a typical size for what you will add - and want to avoid repetitive automatic resizing of the underlying buffer. - This is never a needed operation, but can be critical for performance in - some cases. - -`strbuf_setlen`:: - - Set the length of the buffer to a given value. This function does *not* - allocate new memory, so you should not perform a `strbuf_setlen()` to a - length that is larger than `len + strbuf_avail()`. `strbuf_setlen()` is - just meant as a 'please fix invariants from this strbuf I just messed - with'. - -`strbuf_reset`:: - - Empty the buffer by setting the size of it to zero. - -* Related to the contents of the buffer - -`strbuf_trim`:: - - Strip whitespace from the beginning and end of a string. - Equivalent to performing `strbuf_rtrim()` followed by `strbuf_ltrim()`. - -`strbuf_rtrim`:: - - Strip whitespace from the end of a string. - -`strbuf_ltrim`:: - - Strip whitespace from the beginning of a string. - -`strbuf_reencode`:: - - Replace the contents of the strbuf with a reencoded form. Returns -1 - on error, 0 on success. - -`strbuf_tolower`:: - - Lowercase each character in the buffer using `tolower`. - -`strbuf_cmp`:: - - Compare two buffers. Returns an integer less than, equal to, or greater - than zero if the first buffer is found, respectively, to be less than, - to match, or be greater than the second buffer. - -* Adding data to the buffer - -NOTE: All of the functions in this section will grow the buffer as necessary. -If they fail for some reason other than memory shortage and the buffer hadn't -been allocated before (i.e. the `struct strbuf` was set to `STRBUF_INIT`), -then they will free() it. - -`strbuf_addch`:: - - Add a single character to the buffer. - -`strbuf_addchars`:: - - Add a character the specified number of times to the buffer. - -`strbuf_insert`:: - - Insert data to the given position of the buffer. The remaining contents - will be shifted, not overwritten. - -`strbuf_remove`:: - - Remove given amount of data from a given position of the buffer. - -`strbuf_splice`:: - - Remove the bytes between `pos..pos+len` and replace it with the given - data. - -`strbuf_add_commented_lines`:: - - Add a NUL-terminated string to the buffer. Each line will be prepended - by a comment character and a blank. - -`strbuf_add`:: - - Add data of given length to the buffer. - -`strbuf_addstr`:: - -Add a NUL-terminated string to the buffer. -+ -NOTE: This function will *always* be implemented as an inline or a macro -that expands to: -+ ----- -strbuf_add(..., s, strlen(s)); ----- -+ -Meaning that this is efficient to write things like: -+ ----- -strbuf_addstr(sb, "immediate string"); ----- - -`strbuf_addbuf`:: - - Copy the contents of another buffer at the end of the current one. - -`strbuf_adddup`:: - - Copy part of the buffer from a given position till a given length to the - end of the buffer. - -`strbuf_expand`:: - - This function can be used to expand a format string containing - placeholders. To that end, it parses the string and calls the specified - function for every percent sign found. -+ -The callback function is given a pointer to the character after the `%` -and a pointer to the struct strbuf. It is expected to add the expanded -version of the placeholder to the strbuf, e.g. to add a newline -character if the letter `n` appears after a `%`. The function returns -the length of the placeholder recognized and `strbuf_expand()` skips -over it. -+ -The format `%%` is automatically expanded to a single `%` as a quoting -mechanism; callers do not need to handle the `%` placeholder themselves, -and the callback function will not be invoked for this placeholder. -+ -All other characters (non-percent and not skipped ones) are copied -verbatim to the strbuf. If the callback returned zero, meaning that the -placeholder is unknown, then the percent sign is copied, too. -+ -In order to facilitate caching and to make it possible to give -parameters to the callback, `strbuf_expand()` passes a context pointer, -which can be used by the programmer of the callback as she sees fit. - -`strbuf_expand_dict_cb`:: - - Used as callback for `strbuf_expand()`, expects an array of - struct strbuf_expand_dict_entry as context, i.e. pairs of - placeholder and replacement string. The array needs to be - terminated by an entry with placeholder set to NULL. - -`strbuf_addbuf_percentquote`:: - - Append the contents of one strbuf to another, quoting any - percent signs ("%") into double-percents ("%%") in the - destination. This is useful for literal data to be fed to either - strbuf_expand or to the *printf family of functions. - -`strbuf_humanise_bytes`:: - - Append the given byte size as a human-readable string (i.e. 12.23 KiB, - 3.50 MiB). - -`strbuf_addf`:: - - Add a formatted string to the buffer. - -`strbuf_commented_addf`:: - - Add a formatted string prepended by a comment character and a - blank to the buffer. - -`strbuf_fread`:: - - Read a given size of data from a FILE* pointer to the buffer. -+ -NOTE: The buffer is rewound if the read fails. If -1 is returned, -`errno` must be consulted, like you would do for `read(3)`. -`strbuf_read()`, `strbuf_read_file()` and `strbuf_getline()` has the -same behaviour as well. - -`strbuf_read`:: - - Read the contents of a given file descriptor. The third argument can be - used to give a hint about the file size, to avoid reallocs. - -`strbuf_read_file`:: - - Read the contents of a file, specified by its path. The third argument - can be used to give a hint about the file size, to avoid reallocs. - -`strbuf_readlink`:: - - Read the target of a symbolic link, specified by its path. The third - argument can be used to give a hint about the size, to avoid reallocs. - -`strbuf_getline`:: - - Read a line from a FILE *, overwriting the existing contents - of the strbuf. The second argument specifies the line - terminator character, typically `'\n'`. - Reading stops after the terminator or at EOF. The terminator - is removed from the buffer before returning. Returns 0 unless - there was nothing left before EOF, in which case it returns `EOF`. - -`strbuf_getwholeline`:: - - Like `strbuf_getline`, but keeps the trailing terminator (if - any) in the buffer. - -`strbuf_getwholeline_fd`:: - - Like `strbuf_getwholeline`, but operates on a file descriptor. - It reads one character at a time, so it is very slow. Do not - use it unless you need the correct position in the file - descriptor. - -`strbuf_getcwd`:: - - Set the buffer to the path of the current working directory. - -`strbuf_add_absolute_path` - - Add a path to a buffer, converting a relative path to an - absolute one in the process. Symbolic links are not - resolved. - -`stripspace`:: - - Strip whitespace from a buffer. The second parameter controls if - comments are considered contents to be removed or not. - -`strbuf_split_buf`:: -`strbuf_split_str`:: -`strbuf_split_max`:: -`strbuf_split`:: - - Split a string or strbuf into a list of strbufs at a specified - terminator character. The returned substrings include the - terminator characters. Some of these functions take a `max` - parameter, which, if positive, limits the output to that - number of substrings. - -`strbuf_list_free`:: - - Free a list of strbufs (for example, the return values of the - `strbuf_split()` functions). - -`launch_editor`:: - - Launch the user preferred editor to edit a file and fill the buffer - with the file's contents upon the user completing their editing. The - third argument can be used to set the environment which the editor is - run in. If the buffer is NULL the editor is launched as usual but the - file's contents are not read into the buffer upon completion. diff --git a/Documentation/technical/protocol-capabilities.txt b/Documentation/technical/protocol-capabilities.txt index 6d5424c1bd..4f8a7bfb4c 100644 --- a/Documentation/technical/protocol-capabilities.txt +++ b/Documentation/technical/protocol-capabilities.txt @@ -18,8 +18,9 @@ was sent. Server MUST NOT ignore capabilities that client requested and server advertised. As a consequence of these rules, server MUST NOT advertise capabilities it does not understand. -The 'report-status', 'delete-refs', 'quiet', and 'push-cert' capabilities -are sent and recognized by the receive-pack (push to server) process. +The 'atomic', 'report-status', 'delete-refs', 'quiet', and 'push-cert' +capabilities are sent and recognized by the receive-pack (push to server) +process. The 'ofs-delta' and 'side-band-64k' capabilities are sent and recognized by both upload-pack and receive-pack protocols. The 'agent' capability @@ -244,6 +245,14 @@ respond with the 'quiet' capability to suppress server-side progress reporting if the local progress reporting is also being suppressed (e.g., via `push -q`, or if stderr does not go to a tty). +atomic +------ + +If the server sends the 'atomic' capability it is capable of accepting +atomic pushes. If the pushing client requests this capability, the server +will update the refs in one atomic transaction. Either all refs are +updated or none. + allow-tip-sha1-in-want ---------------------- diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index 7330d880f3..68978f5338 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -1200,7 +1200,7 @@ for other users who clone your repository. If you wish the exclude patterns to affect only certain repositories (instead of every repository for a given project), you may instead put them in a file in your repository named `.git/info/exclude`, or in any -file specified by the `core.excludesfile` configuration variable. +file specified by the `core.excludesFile` configuration variable. Some Git commands can also take exclude patterns directly on the command line. See linkgit:gitignore[5] for the details. |