From: Junio C Hamano Date: Thu, 29 Sep 2016 23:49:44 +0000 (-0700) Subject: Merge branch 'js/regexec-buf' into maint X-Git-Tag: v2.10.1~9 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/300e95f7df240a0f6efea09d5e21fcc350e5ce83?hp=b7d36ffca02c23f545d6e098d78180e6e72dfd8d Merge branch 'js/regexec-buf' into maint Some codepaths in "git diff" used regexec(3) on a buffer that was mmap(2)ed, which may not have a terminating NUL, leading to a read beyond the end of the mapped region. This was fixed by introducing a regexec_buf() helper that takes a pair with REG_STARTEND extension. * js/regexec-buf: regex: use regexec_buf() regex: add regexec_buf() that can work on a non NUL-terminated string regex: -G feeds a non NUL-terminated string to regexec() and fails --- diff --git a/.gitattributes b/.gitattributes index 5e98806c6c..320e33c327 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,3 @@ * whitespace=!indent,trail,space -*.[ch] whitespace=indent,trail,space +*.[ch] whitespace=indent,trail,space diff=cpp *.sh whitespace=indent,trail,space diff --git a/.gitignore b/.gitignore index 5087ce1eb7..05cb58a3d4 100644 --- a/.gitignore +++ b/.gitignore @@ -179,39 +179,6 @@ /gitweb/gitweb.cgi /gitweb/static/gitweb.js /gitweb/static/gitweb.min.* -/test-chmtime -/test-ctype -/test-config -/test-date -/test-delta -/test-dump-cache-tree -/test-dump-split-index -/test-dump-untracked-cache -/test-fake-ssh -/test-scrap-cache-tree -/test-genrandom -/test-hashmap -/test-index-version -/test-line-buffer -/test-match-trees -/test-mergesort -/test-mktemp -/test-parse-options -/test-path-utils -/test-prio-queue -/test-read-cache -/test-regex -/test-revision-walking -/test-run-command -/test-sha1 -/test-sha1-array -/test-sigchain -/test-string-list -/test-submodule-config -/test-subprocess -/test-svn-fe -/test-urlmatch-normalization -/test-wildmatch /common-cmds.h *.tar.gz *.dsc diff --git a/.mailmap b/.mailmap index a9162c0095..9441a54b0d 100644 --- a/.mailmap +++ b/.mailmap @@ -33,6 +33,7 @@ Cheng Renquan Chris Shoemaker Chris Wright Cord Seele +Christian Couder Christian Stimming Csaba Henk Dan Johnson @@ -46,6 +47,7 @@ David D. Kilzer David Kågedal David Reiss David S. Miller +David Turner Deskin Miller Dirk Süsserott Eric Blake diff --git a/.travis.yml b/.travis.yml index adab5b89bb..477c3d2efb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,8 @@ addons: apt: packages: - language-pack-is + - git-svn + - apache2 env: global: @@ -30,6 +32,7 @@ env: - DEFAULT_TEST_TARGET=prove - GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save" - GIT_TEST_OPTS="--verbose --tee" + - GIT_TEST_HTTPD=true - GIT_TEST_CLONE_2GB=YesPlease # t9810 occasionally fails on Travis CI OS X # t9816 occasionally fails with "TAP out of sequence errors" on Travis CI OS X @@ -81,6 +84,8 @@ before_install: brew tap homebrew/binary --quiet brew_force_set_latest_binary_hash perforce brew_force_set_latest_binary_hash perforce-server + # Uncomment this if you want to run perf tests: + # brew install gnu-time brew install git-lfs perforce-server perforce gettext brew link --force gettext ;; diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index 0ddd36879a..4cd95da6b1 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -526,12 +526,20 @@ Writing Documentation: modifying paragraphs or option/command explanations that contain options or commands: - Literal examples (e.g. use of command-line options, command names, and - configuration variables) are typeset in monospace, and if you can use - `backticks around word phrases`, do so. + Literal examples (e.g. use of command-line options, command names, + branch names, configuration and environment variables) must be + typeset in monospace (i.e. wrapped with backticks): `--pretty=oneline` `git rev-list` `remote.pushDefault` + `GIT_DIR` + `HEAD` + + An environment variable must be prefixed with "$" only when referring to its + value and not when referring to the variable itself, in this case there is + nothing to add except the backticks: + `GIT_DIR` is specified + `$GIT_DIR/hooks/pre-receive` 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/Makefile b/Documentation/Makefile index 3e39e2815b..b43d66eae6 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -76,6 +76,7 @@ TECH_DOCS += technical/protocol-common TECH_DOCS += technical/racy-git TECH_DOCS += technical/send-pack-pipeline TECH_DOCS += technical/shallow +TECH_DOCS += technical/signature-format TECH_DOCS += technical/trivial-merge SP_ARTICLES += $(TECH_DOCS) SP_ARTICLES += technical/api-index @@ -146,7 +147,7 @@ else ASCIIDOC_EXTRA += -a git-asciidoc-no-roff endif endif -ifdef MAN_BOLD_LITERAL +ifndef NO_MAN_BOLD_LITERAL XMLTO_EXTRA += -m manpage-bold-literal.xsl endif ifdef DOCBOOK_SUPPRESS_SP @@ -204,6 +205,7 @@ ifndef V QUIET_DBLATEX = @echo ' ' DBLATEX $@; QUIET_XSLTPROC = @echo ' ' XSLTPROC $@; QUIET_GEN = @echo ' ' GEN $@; + QUIET_LINT = @echo ' ' LINT $@; QUIET_STDERR = 2> /dev/null QUIET_SUBDIR0 = +@subdir= QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \ @@ -427,4 +429,7 @@ quick-install-html: require-htmlrepo print-man1: @for i in $(MAN1_TXT); do echo $$i; done +lint-docs:: + $(QUIET_LINT)$(PERL_PATH) lint-gitlink.perl + .PHONY: FORCE diff --git a/Documentation/RelNotes/2.10.0.txt b/Documentation/RelNotes/2.10.0.txt new file mode 100644 index 0000000000..f4da28ab66 --- /dev/null +++ b/Documentation/RelNotes/2.10.0.txt @@ -0,0 +1,675 @@ +Git 2.10 Release Notes +====================== + +Backward compatibility notes +---------------------------- + +Updates since v2.9 +------------------ + +UI, Workflows & Features + + * "git pull --rebase --verify-signature" learned to warn the user + that "--verify-signature" is a no-op when rebasing. + + * An upstream project can make a recommendation to shallowly clone + some submodules in the .gitmodules file it ships. + + * "git worktree add" learned that '-' can be used as a short-hand for + "@{-1}", the previous branch. + + * Update the funcname definition to support css files. + + * The completion script (in contrib/) learned to complete "git + status" options. + + * Messages that are generated by auto gc during "git push" on the + receiving end are now passed back to the sending end in such a way + that they are shown with "remote: " prefix to avoid confusing the + users. + + * "git add -i/-p" learned to honor diff.compactionHeuristic + experimental knob, so that the user can work on the same hunk split + as "git diff" output. + + * "upload-pack" allows a custom "git pack-objects" replacement when + responding to "fetch/clone" via the uploadpack.packObjectsHook. + (merge b738396 jk/upload-pack-hook later to maint). + + * Teach format-patch and mailsplit (hence "am") how a line that + happens to begin with "From " in the e-mail message is quoted with + ">", so that these lines can be restored to their original shape. + (merge d9925d1 ew/mboxrd-format-am later to maint). + + * "git repack" learned the "--keep-unreachable" option, which sends + loose unreachable objects to a pack instead of leaving them loose. + This helps heuristics based on the number of loose objects + (e.g. "gc --auto"). + (merge e26a8c4 jk/repack-keep-unreachable later to maint). + + * "log --graph --format=" learned that "%>|(N)" specifies the width + relative to the terminal's left edge, not relative to the area to + draw text that is to the right of the ancestry-graph section. It + also now accepts negative N that means the column limit is relative + to the right border. + + * A careless invocation of "git send-email directory/" after editing + 0001-change.patch with an editor often ends up sending both + 0001-change.patch and its backup file, 0001-change.patch~, causing + embarrassment and a minor confusion. Detect such an input and + offer to skip the backup files when sending the patches out. + (merge 531220b jc/send-email-skip-backup later to maint). + + * "git submodule update" that drives many "git clone" could + eventually hit flaky servers/network conditions on one of the + submodules; the command learned to retry the attempt. + + * The output coloring scheme learned two new attributes, italic and + strike, in addition to existing bold, reverse, etc. + + * "git log" learns log.showSignature configuration variable, and a + command line option "--no-show-signature" to countermand it. + (merge fce04c3 mj/log-show-signature-conf later to maint). + + * More markings of messages for i18n, with updates to various tests + to pass GETTEXT_POISON tests. + + * "git archive" learned to handle files that are larger than 8GB and + commits far in the future than expressible by the traditional US-TAR + format. + (merge 560b0e8 jk/big-and-future-archive-tar later to maint). + + + * A new configuration variable core.sshCommand has been added to + specify what value for GIT_SSH_COMMAND to use per repository. + + * "git worktree prune" protected worktrees that are marked as + "locked" by creating a file in a known location. "git worktree" + command learned a dedicated command pair to create and remove such + a file, so that the users do not have to do this with editor. + + * A handful of "git svn" updates. + + * "git push" learned to accept and pass extra options to the + receiving end so that hooks can read and react to them. + + * "git status" learned to suggest "merge --abort" during a conflicted + merge, just like it already suggests "rebase --abort" during a + conflicted rebase. + + * "git jump" script (in contrib/) has been updated a bit. + (merge a91e692 jk/git-jump later to maint). + + * "git push" and "git clone" learned to give better progress meters + to the end user who is waiting on the terminal. + + * An entry "git log --decorate" for the tip of the current branch is + shown as "HEAD -> name" (where "name" is the name of the branch); + the arrow is now painted in the same color as "HEAD", not in the + color for commits. + + * "git format-patch" learned format.from configuration variable to + specify the default settings for its "--from" option. + + * "git am -3" calls "git merge-recursive" when it needs to fall back + to a three-way merge; this call has been turned into an internal + subroutine call instead of spawning a separate subprocess. + + * The command line completion scripts (in contrib/) now knows about + "git branch --delete/--move [--remote]". + (merge 2703c22 vs/completion-branch-fully-spelled-d-m-r later to maint). + + * "git rev-parse --git-path hooks/" learned to take + core.hooksPath configuration variable (introduced during 2.9 cycle) + into account. + (merge 9445b49 ab/hooks later to maint). + + * "git log --show-signature" and other commands that display the + verification status of PGP signature now shows the longer key-id, + as 32-bit key-id is so last century. + + +Performance, Internal Implementation, Development Support etc. + + * "git fast-import" learned the same performance trick to avoid + creating too small a packfile as "git fetch" and "git push" have, + using *.unpackLimit configuration. + + * When "git daemon" is run without --[init-]timeout specified, a + connection from a client that silently goes offline can hang around + for a long time, wasting resources. The socket-level KEEPALIVE has + been enabled to allow the OS to notice such failed connections. + + * "git upload-pack" command has been updated to use the parse-options + API. + + * The "git apply" standalone program is being libified; the first + step to move many state variables into a structure that can be + explicitly (re)initialized to make the machinery callable more + than once has been merged. + + * HTTP transport gained an option to produce more detailed debugging + trace. + (merge 73e57aa ep/http-curl-trace later to maint). + + * Instead of taking advantage of the fact that a struct string_list + that is allocated with all NULs happens to be the INIT_NODUP kind, + the users of string_list structures are taught to initialize them + explicitly as such, to document their behaviour better. + (merge 2721ce2 jk/string-list-static-init later to maint). + + * HTTPd tests learned to show the server error log to help diagnosing + a failing tests. + (merge 44f243d nd/test-lib-httpd-show-error-log-in-verbose later to maint). + + * The ownership rule for the piece of memory that hold references to + be fetched in "git fetch" was screwy, which has been cleaned up. + + * "git bisect" makes an internal call to "git diff-tree" when + bisection finds the culprit, but this call did not initialize the + data structure to pass to the diff-tree API correctly. + + * Further preparatory clean-up for "worktree" feature continues. + (merge 0409e0b nd/worktree-cleanup-post-head-protection later to maint). + + * Formats of the various data (and how to validate them) where we use + GPG signature have been documented. + + * A new run-command API function pipe_command() is introduced to + sanely feed data to the standard input while capturing data from + the standard output and the standard error of an external process, + which is cumbersome to hand-roll correctly without deadlocking. + + * The codepath to sign data in a prepared buffer with GPG has been + updated to use this API to read from the status-fd to check for + errors (instead of relying on GPG's exit status). + (merge efee955 jk/gpg-interface-cleanup later to maint). + + * Allow t/perf framework to use the features from the most recent + version of Git even when testing an older installed version. + + * The commands in the "log/diff" family have had an FILE* pointer in the + data structure they pass around for a long time, but some codepaths + used to always write to the standard output. As a preparatory step + to make "git format-patch" available to the internal callers, these + codepaths have been updated to consistently write into that FILE* + instead. + + * Conversion from unsigned char sha1[20] to struct object_id + continues. + + * Improve the look of the way "git fetch" reports what happened to + each ref that was fetched. + + * The .c/.h sources are marked as such in our .gitattributes file so + that "git diff -W" and friends would work better. + + * Code clean-up to avoid using a variable string that compilers may + feel untrustable as printf-style format given to write_file() + helper function. + + * "git p4" used a location outside $GIT_DIR/refs/ to place its + temporary branches, which has been moved to refs/git-p4-tmp/. + + * Existing autoconf generated test for the need to link with pthread + library did not check all the functions from pthread libraries; + recent FreeBSD has some functions in libc but not others, and we + mistakenly thought linking with libc is enough when it is not. + + * When "git fsck" reports a broken link (e.g. a tree object contains + a blob that does not exist), both containing object and the object + that is referred to were reported with their 40-hex object names. + The command learned the "--name-objects" option to show the path to + the containing object from existing refs (e.g. "HEAD~24^2:file.txt"). + + * Allow http daemon tests in Travis CI tests. + + * Makefile assumed that -lrt is always available on platforms that + want to use clock_gettime() and CLOCK_MONOTONIC, which is not a + case for recent Mac OS X. The necessary symbols are often found in + libc on many modern systems and having -lrt on the command line, as + long as the library exists, had no effect, but when the platform + removes librt.a that is a different matter--having -lrt will break + the linkage. + + This change could be seen as a regression for those who do need to + specify -lrt, as they now specifically ask for NEEDS_LIBRT when + building. Hopefully they are in the minority these days. + + * Further preparatory work on the refs API before the pluggable + backend series can land. + + * Error handling in the codepaths that updates refs has been + improved. + + * The API to iterate over all the refs (i.e. for_each_ref(), etc.) + has been revamped. + + * The handling of the "text=auto" attribute has been corrected. + $ echo "* text=auto eol=crlf" >.gitattributes + used to have the same effect as + $ echo "* text eol=crlf" >.gitattributes + i.e. declaring all files are text (ignoring "auto"). The + combination has been fixed to be equivalent to doing + $ git config core.autocrlf true + + * Documentation has been updated to show better example usage + of the updated "text=auto" attribute. + + * A few tests that specifically target "git rebase -i" have been + added. + + * Dumb http transport on the client side has been optimized. + (merge ecba195 ew/http-walker later to maint). + + * Users of the parse_options_concat() API function need to allocate + extra slots in advance and fill them with OPT_END() when they want + to decide the set of supported options dynamically, which makes the + code error-prone and hard to read. This has been corrected by tweaking + the API to allocate and return a new copy of "struct option" array. + + * "git fetch" exchanges batched have/ack messages between the sender + and the receiver, initially doubling every time and then falling + back to enlarge the window size linearly. The "smart http" + transport, being an half-duplex protocol, outgrows the preset limit + too quickly and becomes inefficient when interacting with a large + repository. The internal mechanism learned to grow the window size + more aggressively when working with the "smart http" transport. + + * Tests for "git svn" have been taught to reuse the lib-httpd test + infrastructure when testing the subversion integration that + interacts with subversion repositories served over the http:// + protocol. + (merge a8a5d25 ew/git-svn-http-tests later to maint). + + * "git pack-objects" has a few options that tell it not to pack + objects found in certain packfiles, which require it to scan .idx + files of all available packs. The codepaths involved in these + operations have been optimized for a common case of not having any + non-local pack and/or any .kept pack. + + * The t3700 test about "add --chmod=-x" have been made a bit more + robust and generally cleaned up. + (merge 766cdc4 ib/t3700-add-chmod-x-updates later to maint). + + * The build procedure learned PAGER_ENV knob that lists what default + environment variable settings to export for popular pagers. This + mechanism is used to tweak the default settings to MORE on FreeBSD. + (merge 995bc22 ew/build-time-pager-tweaks later to maint). + + * The http-backend (the server-side component of smart-http + transport) used to trickle the HTTP header one at a time. Now + these write(2)s are batched. + (merge b36045c ew/http-backend-batch-headers later to maint). + + * When "git rebase" tries to compare set of changes on the updated + upstream and our own branch, it computes patch-id for all of these + changes and attempts to find matches. This has been optimized by + lazily computing the full patch-id (which is expensive) to be + compared only for changes that touch the same set of paths. + (merge ba67504 kw/patch-ids-optim later to maint). + + * A handful of tests that were broken under gettext-poison build have + been fixed. + + * The recent i18n patch we added during this cycle did a bit too much + refactoring of the messages to avoid word-legos; the repetition has + been reduced to help translators. + + +Also contains various documentation updates and code clean-ups. + + +Fixes since v2.9 +---------------- + +Unless otherwise noted, all the fixes since v2.8 in the maintenance +track are contained in this release (see the maintenance releases' +notes for details). + + * The commands in `git log` family take %C(auto) in a custom format + string. This unconditionally turned the color on, ignoring + --no-color or with --color=auto when the output is not connected to + a tty; this was corrected to make the format truly behave as + "auto". + + * "git rev-list --count" whose walk-length is limited with "-n" + option did not work well with the counting optimized to look at the + bitmap index. + + * "git show -W" (extend hunks to cover the entire function, delimited + by lines that match the "funcname" pattern) used to show the entire + file when a change added an entire function at the end of the file, + which has been fixed. + + * The documentation set has been updated so that literal commands, + configuration variables and environment variables are consistently + typeset in fixed-width font and bold in manpages. + + * "git svn propset" subcommand that was added in 2.3 days is + documented now. + + * The documentation tries to consistently spell "GPG"; when + referring to the specific program name, "gpg" is used. + + * "git reflog" stopped upon seeing an entry that denotes a branch + creation event (aka "unborn"), which made it appear as if the + reflog was truncated. + + * The git-prompt scriptlet (in contrib/) was not friendly with those + who uses "set -u", which has been fixed. + + * compat/regex code did not cleanly compile. + + * A codepath that used alloca(3) to place an unbounded amount of data + on the stack has been updated to avoid doing so. + + * "git update-index --add --chmod=+x file" may be usable as an escape + hatch, but not a friendly thing to force for people who do need to + use it regularly. "git add --chmod=+x file" can be used instead. + + * Build improvements for gnome-keyring (in contrib/) + + * "git status" used to say "working directory" when it meant "working + tree". + + * Comments about misbehaving FreeBSD shells have been clarified with + the version number (9.x and before are broken, newer ones are OK). + + * "git cherry-pick A" worked on an unborn branch, but "git + cherry-pick A..B" didn't. + + * Fix an unintended regression in v2.9 that breaks "clone --depth" + that recurses down to submodules by forcing the submodules to also + be cloned shallowly, which many server instances that host upstream + of the submodules are not prepared for. + + * Fix unnecessarily waste in the idiomatic use of ': ${VAR=default}' + to set the default value, without enclosing it in double quotes. + + * Some platform-specific code had non-ANSI strict declarations of C + functions that do not take any parameters, which has been + corrected. + + * The internal code used to show local timezone offset is not + prepared to handle timestamps beyond year 2100, and gave a + bogus offset value to the caller. Use a more benign looking + +0000 instead and let "git log" going in such a case, instead + of aborting. + + * One among four invocations of readlink(1) in our test suite has + been rewritten so that the test can run on systems without the + command (others are in valgrind test framework and t9802). + + * t/perf needs /usr/bin/time with GNU extension; the invocation of it + is updated to "gtime" on Darwin. + + * A bug, which caused "git p4" while running under verbose mode to + report paths that are omitted due to branch prefix incorrectly, has + been fixed; the command said "Ignoring file outside of prefix" for + paths that are _inside_. + + * The top level documentation "git help git" still pointed at the + documentation set hosted at now-defunct google-code repository. + Update it to point to https://git.github.io/htmldocs/git.html + instead. + + * A helper function that takes the contents of a commit object and + finds its subject line did not ignore leading blank lines, as is + commonly done by other codepaths. Make it ignore leading blank + lines to match. + + * For a long time, we carried an in-code comment that said our + colored output would work only when we use fprintf/fputs on + Windows, which no longer is the case for the past few years. + + * "gc.autoPackLimit" when set to 1 should not trigger a repacking + when there is only one pack, but the code counted poorly and did + so. + + * Add a test to specify the desired behaviour that currently is not + available in "git rebase -Xsubtree=...". + + * More mark-up updates to typeset strings that are expected to + literally typed by the end user in fixed-width font. + + * "git commit --amend --allow-empty-message -S" for a commit without + any message body could have misidentified where the header of the + commit object ends. + + * "git rebase -i --autostash" did not restore the auto-stashed change + when the operation was aborted. + + * Git does not know what the contents in the index should be for a + path added with "git add -N" yet, so "git grep --cached" should not + show hits (or show lack of hits, with -L) in such a path, but that + logic does not apply to "git grep", i.e. searching in the working + tree files. But we did so by mistake, which has been corrected. + + * "git blame -M" missed a single line that was moved within the file. + + * Fix recently introduced codepaths that are involved in parallel + submodule operations, which gave up on reading too early, and + could have wasted CPU while attempting to write under a corner + case condition. + + * "git grep -i" has been taught to fold case in non-ascii locales + correctly. + + * A test that unconditionally used "mktemp" learned that the command + is not necessarily available everywhere. + + * There are certain house-keeping tasks that need to be performed at + the very beginning of any Git program, and programs that are not + built-in commands had to do them exactly the same way as "git" + potty does. It was easy to make mistakes in one-off standalone + programs (like test helpers). A common "main()" function that + calls cmd_main() of individual program has been introduced to + make it harder to make mistakes. + (merge de61ceb jk/common-main later to maint). + + * The test framework learned a new helper test_match_signal to + check an exit code from getting killed by an expected signal. + + * General code clean-up around a helper function to write a + single-liner to a file. + (merge 7eb6e10 jk/write-file later to maint). + + * One part of "git am" had an oddball helper function that called + stuff from outside "his" as opposed to calling what we have "ours", + which was not gender-neutral and also inconsistent with the rest of + the system where outside stuff is usuall called "theirs" in + contrast to "ours". + + * "git blame file" allowed the lineage of lines in the uncommitted, + unadded contents of "file" to be inspected, but it refused when + "file" did not appear in the current commit. When "file" was + created by renaming an existing file (but the change has not been + committed), this restriction was unnecessarily tight. + + * "git add -N dir/file && git write-tree" produced an incorrect tree + when there are other paths in the same directory that sorts after + "file". + + * "git fetch http://user:pass@host/repo..." scrubbed the userinfo + part, but "git push" didn't. + + * "git merge" with renormalization did not work well with + merge-recursive, due to "safer crlf" conversion kicking in when it + shouldn't. + (merge 1335d76 jc/renormalize-merge-kill-safer-crlf later to maint). + + * The use of strbuf in "git rm" to build filename to remove was a bit + suboptimal, which has been fixed. + + * An age old bug that caused "git diff --ignore-space-at-eol" + misbehave has been fixed. + + * "git notes merge" had a code to see if a path exists (and fails if + it does) and then open the path for writing (when it doesn't). + Replace it with open with O_EXCL. + + * "git pack-objects" and "git index-pack" mostly operate with off_t + when talking about the offset of objects in a packfile, but there + were a handful of places that used "unsigned long" to hold that + value, leading to an unintended truncation. + + * Recent update to "git daemon" tries to enable the socket-level + KEEPALIVE, but when it is spawned via inetd, the standard input + file descriptor may not necessarily be connected to a socket. + Suppress an ENOTSOCK error from setsockopt(). + + * Recent FreeBSD stopped making perl available at /usr/bin/perl; + switch the default the built-in path to /usr/local/bin/perl on not + too ancient FreeBSD releases. + + * "git commit --help" said "--no-verify" is only about skipping the + pre-commit hook, and failed to say that it also skipped the + commit-msg hook. + + * "git merge" in Git v2.9 was taught to forbid merging an unrelated + lines of history by default, but that is exactly the kind of thing + the "--rejoin" mode of "git subtree" (in contrib/) wants to do. + "git subtree" has been taught to use the "--allow-unrelated-histories" + option to override the default. + + * The build procedure for "git persistent-https" helper (in contrib/) + has been updated so that it can be built with more recent versions + of Go. + + * There is an optimization used in "git diff $treeA $treeB" to borrow + an already checked-out copy in the working tree when it is known to + be the same as the blob being compared, expecting that open/mmap of + such a file is faster than reading it from the object store, which + involves inflating and applying delta. This however kicked in even + when the checked-out copy needs to go through the convert-to-git + conversion (including the clean filter), which defeats the whole + point of the optimization. The optimization has been disabled when + the conversion is necessary. + + * "git -c grep.patternType=extended log --basic-regexp" misbehaved + because the internal API to access the grep machinery was not + designed well. + + * Windows port was failing some tests in t4130, due to the lack of + inum in the returned values by its lstat(2) emulation. + + * The reflog output format is documented better, and a new format + --date=unix to report the seconds-since-epoch (without timezone) + has been added. + (merge 442f6fd jk/reflog-date later to maint). + + * "git difftool ..." started in a subdirectory failed to + interpret the paths relative to that directory, which has been + fixed. + + * The characters in the label shown for tags/refs for commits in + "gitweb" output are now properly escaped for proper HTML output. + + * FreeBSD can lie when asked mtime of a directory, which made the + untracked cache code to fall back to a slow-path, which in turn + caused tests in t7063 to fail because it wanted to verify the + behaviour of the fast-path. + + * Squelch compiler warnings for nedmalloc (in compat/) library. + + * A small memory leak in the command line parsing of "git blame" + has been plugged. + + * The API documentation for hashmap was unclear if hashmap_entry + can be safely discarded without any other consideration. State + that it is safe to do so. + + * Not-so-recent rewrite of "git am" that started making internal + calls into the commit machinery had an unintended regression, in + that no matter how many seconds it took to apply many patches, the + resulting committer timestamp for the resulting commits were all + the same. + + * "git push --force-with-lease" already had enough logic to allow + ensuring that such a push results in creation of a ref (i.e. the + receiving end did not have another push from sideways that would be + discarded by our force-pushing), but didn't expose this possibility + to the users. It does so now. + (merge 9eed4f3 jk/push-force-with-lease-creation later to maint). + + * The mechanism to limit the pack window memory size, when packing is + done using multiple threads (which is the default), is per-thread, + but this was not documented clearly. + (merge 954176c ms/document-pack-window-memory-is-per-thread later to maint). + + * "import-tars" fast-import script (in contrib/) used to ignore a + hardlink target and replaced it with an empty file, which has been + corrected to record the same blob as the other file the hardlink is + shared with. + (merge 04e0869 js/import-tars-hardlinks later to maint). + + * "git mv dir non-existing-dir/" did not work in some environments + the same way as existing mainstream platforms. The code now moves + "dir" to "non-existing-dir", without relying on rename("A", "B/") + that strips the trailing slash of '/'. + (merge 189d035 js/mv-dir-to-new-directory later to maint). + + * The "t/" hierarchy is prone to get an unusual pathname; "make test" + has been taught to make sure they do not contain paths that cannot + be checked out on Windows (and the mechanism can be reusable to + catch pathnames that are not portable to other platforms as need + arises). + (merge c2cafd3 js/test-lint-pathname later to maint). + + * When "git merge-recursive" works on history with many criss-cross + merges in "verbose" mode, the names the command assigns to the + virtual merge bases could have overwritten each other by unintended + reuse of the same piece of memory. + (merge 5447a76 rs/pull-signed-tag later to maint). + + * "git checkout --detach " used to give the same advice + message as that is issued when "git checkout " (or anything + that is not a branch name) is given, but asking with "--detach" is + an explicit enough sign that the user knows what is going on. The + advice message has been squelched in this case. + (merge 779b88a sb/checkout-explit-detach-no-advice later to maint). + + * "git difftool" by default ignores the error exit from the backend + commands it spawns, because often they signal that they found + differences by exiting with a non-zero status code just like "diff" + does; the exit status codes 126 and above however are special in + that they are used to signal that the command is not executable, + does not exist, or killed by a signal. "git difftool" has been + taught to notice these exit status codes. + (merge 45a4f5d jk/difftool-command-not-found later to maint). + + * On Windows, help.browser configuration variable used to be ignored, + which has been corrected. + (merge 6db5967 js/no-html-bypass-on-windows later to maint). + + * The "git -c var[=val] cmd" facility to append a configuration + variable definition at the end of the search order was described in + git(1) manual page, but not in git-config(1), which was more likely + place for people to look for when they ask "can I make a one-shot + override, and if so how?" + (merge ae1f709 dg/document-git-c-in-git-config-doc later to maint). + + * The tempfile (hence its user lockfile) API lets the caller to open + a file descriptor to a temporary file, write into it and then + finalize it by first closing the filehandle and then either + removing or renaming the temporary file. When the process spawns a + subprocess after obtaining the file descriptor, and if the + subprocess has not exited when the attempt to remove or rename is + made, the last step fails on Windows, because the subprocess has + the file descriptor still open. Open tempfile with O_CLOEXEC flag + to avoid this (on Windows, this is mapped to O_NOINHERIT). + (merge 05d1ed6 bw/mingw-avoid-inheriting-fd-to-lockfile later to maint). + + * Correct an age-old calco (is that a typo-like word for calc) + in the documentation. + (merge 7841c48 ls/packet-line-protocol-doc-fix later to maint). + + * Other minor clean-ups and documentation updates + (merge 02a8cfa rs/merge-add-strategies-simplification later to maint). + (merge af4941d rs/merge-recursive-string-list-init later to maint). + (merge 1eb47f1 rs/use-strbuf-add-unique-abbrev later to maint). + (merge ddd0bfa jk/tighten-alloc later to maint). + (merge ecf30b2 rs/mailinfo-lib later to maint). + (merge 0eb75ce sg/reflog-past-root later to maint). + (merge 4369523 hv/doc-commit-reference-style later to maint). diff --git a/Documentation/RelNotes/2.10.1.txt b/Documentation/RelNotes/2.10.1.txt new file mode 100644 index 0000000000..75c07e199e --- /dev/null +++ b/Documentation/RelNotes/2.10.1.txt @@ -0,0 +1,33 @@ +Git v2.10.1 Release Notes +========================= + +Fixes since v2.10 +----------------- + + * Clarify various ways to specify the "revision ranges" in the + documentation. + + * "diff-highlight" script (in contrib/) learned to work better with + "git log -p --graph" output. + + * The test framework left the number of tests and success/failure + count in the t/test-results directory, keyed by the name of the + test script plus the process ID. The latter however turned out not + to serve any useful purpose. The process ID part of the filename + has been removed. + + * Having a submodule whose ".git" repository is somehow corrupt + caused a few commands that recurse into submodules loop forever. + + * "git symbolic-ref -d HEAD" happily removes the symbolic ref, but + the resulting repository becomes an invalid one. Teach the command + to forbid removal of HEAD. + + * A test spawned a short-lived background process, which sometimes + prevented the test directory from getting removed at the end of the + script on some platforms. + + * Update a few tests that used to use GIT_CURL_VERBOSE to use the + newer GIT_TRACE_CURL. + +Also contains minor documentation updates and code clean-ups. diff --git a/Documentation/RelNotes/2.3.10.txt b/Documentation/RelNotes/2.3.10.txt index 9d425d814d..20c2d2cacc 100644 --- a/Documentation/RelNotes/2.3.10.txt +++ b/Documentation/RelNotes/2.3.10.txt @@ -7,7 +7,7 @@ Fixes since v2.3.9 * xdiff code we use to generate diffs is not prepared to handle extremely large files. It uses "int" in many places, which can overflow if we have a very large number of lines or even bytes in - our input files, for example. Cap the input size to soemwhere + our input files, for example. Cap the input size to somewhere around 1GB for now. * Some protocols (like git-remote-ext) can execute arbitrary code diff --git a/Documentation/RelNotes/2.4.10.txt b/Documentation/RelNotes/2.4.10.txt index 8621199bc6..702d8d4e22 100644 --- a/Documentation/RelNotes/2.4.10.txt +++ b/Documentation/RelNotes/2.4.10.txt @@ -7,7 +7,7 @@ Fixes since v2.4.9 * xdiff code we use to generate diffs is not prepared to handle extremely large files. It uses "int" in many places, which can overflow if we have a very large number of lines or even bytes in - our input files, for example. Cap the input size to soemwhere + our input files, for example. Cap the input size to somewhere around 1GB for now. * Some protocols (like git-remote-ext) can execute arbitrary code diff --git a/Documentation/RelNotes/2.5.4.txt b/Documentation/RelNotes/2.5.4.txt index a5e8477a4a..b8a2f93ee7 100644 --- a/Documentation/RelNotes/2.5.4.txt +++ b/Documentation/RelNotes/2.5.4.txt @@ -7,7 +7,7 @@ Fixes since v2.5.4 * xdiff code we use to generate diffs is not prepared to handle extremely large files. It uses "int" in many places, which can overflow if we have a very large number of lines or even bytes in - our input files, for example. Cap the input size to soemwhere + our input files, for example. Cap the input size to somewhere around 1GB for now. * Some protocols (like git-remote-ext) can execute arbitrary code diff --git a/Documentation/RelNotes/2.6.1.txt b/Documentation/RelNotes/2.6.1.txt index 1e51363e3c..f37ea89cda 100644 --- a/Documentation/RelNotes/2.6.1.txt +++ b/Documentation/RelNotes/2.6.1.txt @@ -7,7 +7,7 @@ Fixes since v2.6 * xdiff code we use to generate diffs is not prepared to handle extremely large files. It uses "int" in many places, which can overflow if we have a very large number of lines or even bytes in - our input files, for example. Cap the input size to soemwhere + our input files, for example. Cap the input size to somewhere around 1GB for now. * Some protocols (like git-remote-ext) can execute arbitrary code diff --git a/Documentation/RelNotes/2.9.0.txt b/Documentation/RelNotes/2.9.0.txt new file mode 100644 index 0000000000..b61d36712f --- /dev/null +++ b/Documentation/RelNotes/2.9.0.txt @@ -0,0 +1,512 @@ +Git 2.9 Release Notes +===================== + +Backward compatibility notes +---------------------------- + +The end-user facing Porcelain level commands in the "git diff" and +"git log" family by default enable the rename detection; you can still +use "diff.renames" configuration variable to disable this. + +Merging two branches that have no common ancestor with "git merge" is +by default forbidden now to prevent creating such an unusual merge by +mistake. + +The output formats of "git log" that indents the commit log message by +4 spaces now expands HT in the log message by default. You can use +the "--no-expand-tabs" option to disable this. + +"git commit-tree" plumbing command required the user to always sign +its result when the user sets the commit.gpgsign configuration +variable, which was an ancient mistake, which this release corrects. +A script that drives commit-tree, if it relies on this mistake, now +needs to read commit.gpgsign and pass the -S option as necessary. + + +Updates since v2.8 +------------------ + +UI, Workflows & Features + + * Comes with git-multimail 1.3.1 (in contrib/). + + * The end-user facing commands like "git diff" and "git log" + now enable the rename detection by default. + + * The credential.helper configuration variable is cumulative and + there is no good way to override it from the command line. As + a special case, giving an empty string as its value now serves + as the signal to clear the values specified in various files. + + * A new "interactive.diffFilter" configuration can be used to + customize the diff shown in "git add -i" sessions. + + * "git p4" now allows P4 author names to be mapped to Git author + names. + + * "git rebase -x" can be used without passing "-i" option. + + * "git -c credential.= submodule" can now be used to + propagate configuration variables related to credential helper + down to the submodules. + + * "git tag" can create an annotated tag without explicitly given an + "-a" (or "-s") option (i.e. when a tag message is given). A new + configuration variable, tag.forceSignAnnotated, can be used to tell + the command to create signed tag in such a situation. + + * "git merge" used to allow merging two branches that have no common + base by default, which led to a brand new history of an existing + project created and then get pulled by an unsuspecting maintainer, + which allowed an unnecessary parallel history merged into the + existing project. The command has been taught not to allow this by + default, with an escape hatch "--allow-unrelated-histories" option + to be used in a rare event that merges histories of two projects + that started their lives independently. + + * "git pull" has been taught to pass the "--allow-unrelated-histories" + option to underlying "git merge". + + * "git apply -v" learned to report paths in the patch that were + skipped via --include/--exclude mechanism or being outside the + current working directory. + + * Shell completion (in contrib/) updates. + + * The commit object name reported when "rebase -i" stops has been + shortened. + + * "git worktree add" can be given "--no-checkout" option to only + create an empty worktree without checking out the files. + + * "git mergetools" learned to drive ExamDiff. + + * "git pull --rebase" learned "--[no-]autostash" option, so that + the rebase.autostash configuration variable set to true can be + overridden from the command line. + + * When "git log" shows the log message indented by 4-spaces, the + remainder of a line after a HT does not align in the way the author + originally intended. The command now expands tabs by default to help + such a case, and allows the users to override it with a new option, + "--no-expand-tabs". + + * "git send-email" now uses a more readable timestamps when + formulating a message ID. + + * "git rerere" can encounter two or more files with the same conflict + signature that have to be resolved in different ways, but there was + no way to record these separate resolutions. + + * "git p4" learned to record P4 jobs in Git commit that imports from + the history in Perforce. + + * "git describe --contains" often made a hard-to-justify choice of + tag to name a given commit, because it tried to come up + with a name with smallest number of hops from a tag, causing an old + commit whose close descendant that is recently tagged were not + described with respect to an old tag but with a newer tag. It did + not help that its computation of "hop" count was further tweaked to + penalize being on a side branch of a merge. The logic has been + updated to favor using the tag with the oldest tagger date, which + is a lot easier to explain to the end users: "We describe a commit + in terms of the (chronologically) oldest tag that contains the + commit." + + * "git clone" learned the "--shallow-submodules" option. + + * HTTP transport clients learned to throw extra HTTP headers at the + server, specified via http.extraHeader configuration variable. + + * The "--compaction-heuristic" option to "git diff" family of + commands enables a heuristic to make the patch output more readable + by using a blank line as a strong hint that the contents before and + after it belong to logically separate units. It is still + experimental. + + * A new configuration variable core.hooksPath allows customizing + where the hook directory is. + + * An earlier addition of "sanitize_submodule_env" with 14111fc4 (git: + submodule honor -c credential.* from command line, 2016-02-29) + turned out to be a convoluted no-op; implement what it wanted to do + correctly, and stop filtering settings given via "git -c var=val". + + * "git commit --dry-run" reported "No, no, you cannot commit." in one + case where "git commit" would have allowed you to commit, and this + improves it a little bit ("git commit --dry-run --short" still does + not give you the correct answer, for example). This is a stop-gap + measure in that "commit --short --dry-run" still gives an incorrect + result. + + * The experimental "multiple worktree" feature gains more safety to + forbid operations on a branch that is checked out or being actively + worked on elsewhere, by noticing that e.g. it is being rebased. + + * "git format-patch" learned a new "--base" option to record what + (public, well-known) commit the original series was built on in + its output. + + * "git commit" learned to pay attention to the "commit.verbose" + configuration variable and act as if the "--verbose" option + was given from the command line. + + * Updated documentation gives hints to GMail users with two-factor + auth enabled that they need app-specific-password when using + "git send-email". + + * The manpage output of our documentation did not render well in + terminal; typeset literals in bold by default to make them stand + out more. + + * The mark-up in the top-level README.md file has been updated to + typeset CLI command names differently from the body text. + + +Performance, Internal Implementation, Development Support etc. + + * The embedded args argv-array in the child process is used to build + the command line to run pack-objects instead of using a separate + array of strings. + + * A test for tags has been restructured so that more parts of it can + easily be run on a platform without a working GnuPG. + + * The startup_info data, which records if we are working inside a + repository (among other things), are now uniformly available to Git + subcommand implementations, and Git avoids attempting to touch + references when we are not in a repository. + + * The command line argument parser for "receive-pack" has been + rewritten to use parse-options. + + * A major part of "git submodule update" has been ported to C to take + advantage of the recently added framework to run download tasks in + parallel. Other updates to "git submodule" that move pieces of + logic to C continues. + + * Rename bunch of tests on "git clone" for better organization. + + * The tests that involve running httpd leaked the system-wide + configuration in /etc/gitconfig to the tested environment. + + * Build updates for MSVC. + + * The repository set-up sequence has been streamlined (the biggest + change is that there is no longer git_config_early()), so that we + do not attempt to look into refs/* when we know we do not have a + Git repository. + + * Code restructuring around the "refs" API to prepare for pluggable + refs backends. + + * Sources to many test helper binaries and the generated helpers + have been moved to t/helper/ subdirectory to reduce clutter at the + top level of the tree. + + * Unify internal logic between "git tag -v" and "git verify-tag" + commands by making one directly call into the other. + + * "merge-recursive" strategy incorrectly checked if a path that is + involved in its internal merge exists in the working tree. + + * The test scripts for "git p4" (but not "git p4" implementation + itself) has been updated so that they would work even on a system + where the installed version of Python is python 3. + + * As nobody maintains our in-tree git.spec.in and distros use their + own spec file, we stopped pretending that we support "make rpm". + + * Move from "unsigned char[20]" to "struct object_id" continues. + + * The code for warning_errno/die_errno has been refactored and a new + error_errno() reporting helper is introduced. + (merge 1da045f nd/error-errno later to maint). + + * Running tests with '-x' option to trace the individual command + executions is a useful way to debug test scripts, but some tests + that capture the standard error stream and check what the command + said can be broken with the trace output mixed in. When running + our tests under "bash", however, we can redirect the trace output + to another file descriptor to keep the standard error of programs + being tested intact. + + * t0040 had too many unnecessary repetitions in its test data. Teach + test-parse-options program so that a caller can tell what it + expects in its output, so that these repetitions can be cleaned up. + + * Add perf test for "rebase -i". + + * Common mistakes when writing gitlink: in our documentation are + found by "make check-docs". + + * t9xxx series has been updated primarily for readability, while + fixing small bugs in it. A few scripted Porcelain commands have + also been updated to fix possible bugs around their use of + "test -z" and "test -n". + + * CI test was taught to run git-svn tests. + + * "git cat-file --batch-all" has been sped up, by taking advantage + of the fact that it does not have to read a list of objects, in two + ways. + + * test updates to make it more readable and maintainable. + (merge e6273f4 es/t1500-modernize later to maint). + + * "make DEVELOPER=1" worked as expected; setting DEVELOPER=1 in + config.mak didn't. + (merge 51dd3e8 mm/makefile-developer-can-be-in-config-mak later to maint). + + * The way how "submodule--helper list" signals unmatch error to its + callers has been updated. + + * A bash-ism "local" has been removed from "git submodule" scripted + Porcelain. + + +Also contains various documentation updates and code clean-ups. + + +Fixes since v2.8 +---------------- + +Unless otherwise noted, all the fixes since v2.8 in the maintenance +track are contained in this release (see the maintenance releases' +notes for details). + + * "git config --get-urlmatch", unlike other variants of the "git + config --get" family, did not signal error with its exit status + when there was no matching configuration. + + * The "--local-env-vars" and "--resolve-git-dir" options of "git + rev-parse" failed to work outside a repository when the command's + option parsing was rewritten in 1.8.5 era. + + * "git index-pack --keep[=] pack-$name.pack" simply did not work. + + * Fetching of history by naming a commit object name directly didn't + work across remote-curl transport. + + * A small memory leak in an error codepath has been plugged in xdiff + code. + + * strbuf_getwholeline() did not NUL-terminate the buffer on certain + corner cases in its error codepath. + + * "git mergetool" did not work well with conflicts that both sides + deleted. + + * "git send-email" had trouble parsing alias file in mailrc format + when lines in it had trailing whitespaces on them. + + * When "git merge --squash" stopped due to conflict, the concluding + "git commit" failed to read in the SQUASH_MSG that shows the log + messages from all the squashed commits. + + * "git merge FETCH_HEAD" dereferenced NULL pointer when merging + nothing into an unborn history (which is arguably unusual usage, + which perhaps was the reason why nobody noticed it). + + * When "git worktree" feature is in use, "git branch -d" allowed + deletion of a branch that is checked out in another worktree, + which was wrong. + + * When "git worktree" feature is in use, "git branch -m" renamed a + branch that is checked out in another worktree without adjusting + the HEAD symbolic ref for the worktree. + + * "git diff -M" used to work better when two originally identical + files A and B got renamed to X/A and X/B by pairing A to X/A and B + to X/B, but this was broken in the 2.0 timeframe. + + * "git send-pack --all " was broken when its command line + option parsing was written in the 2.6 timeframe. + + * "git format-patch --help" showed `-s` and `--no-patch` as if these + are valid options to the command. We already hide `--patch` option + from the documentation, because format-patch is about showing the + diff, and the documentation now hides these options as well. + + * When running "git blame $path" with unnormalized data in the index + for the path, the data in the working tree was blamed, even though + "git add" would not have changed what is already in the index, due + to "safe crlf" that disables the line-end conversion. It has been + corrected. + + * A change back in version 2.7 to "git branch" broke display of a + symbolic ref in a non-standard place in the refs/ hierarchy (we + expect symbolic refs to appear in refs/remotes/*/HEAD to point at + the primary branch the remote has, and as .git/HEAD to point at the + branch we locally checked out). + + * A partial rewrite of "git submodule" in the 2.7 timeframe changed + the way the gitdir: pointer in the submodules point at the real + repository location to use absolute paths by accident. This has + been corrected. + + * "git commit" misbehaved in a few minor ways when an empty message + is given via -m '', all of which has been corrected. + + * Support for CRAM-MD5 authentication method in "git imap-send" did + not work well. + + * Upcoming OpenSSL 1.1.0 will break compilation by updating a few API + elements we use in imap-send, which has been adjusted for the change. + + * The socks5:// proxy support added back in 2.6.4 days was not aware + that socks5h:// proxies behave differently from socks5:// proxies. + + * "git config" had a codepath that tried to pass a NULL to + printf("%s"), which nobody seems to have noticed. + + * On Cygwin, object creation uses the "create a temporary and then + rename it to the final name" pattern, not "create a temporary, + hardlink it to the final name and then unlink the temporary" + pattern. + + This is necessary to use Git on Windows shared directories, and is + already enabled for the MinGW and plain Windows builds. It also + has been used in Cygwin packaged versions of Git for quite a while. + See http://thread.gmane.org/gmane.comp.version-control.git/291853 + + * "merge-octopus" strategy did not ensure that the index is clean + when merge begins. + + * When "git merge" notices that the merge can be resolved purely at + the tree level (without having to merge blobs) and the resulting + tree happens to already exist in the object store, it forgot to + update the index, which left an inconsistent state that would + break later operations. + + * "git submodule" reports the paths of submodules the command + recurses into, but these paths were incorrectly reported when + the command was not run from the root level of the superproject. + + * The "user.useConfigOnly" configuration variable makes it an error + if users do not explicitly set user.name and user.email. However, + its check was not done early enough and allowed another error to + trigger, reporting that the default value we guessed from the + system setting was unusable. This was a suboptimal end-user + experience as we want the users to set user.name/user.email without + relying on the auto-detection at all. + + * "git mv old new" did not adjust the path for a submodule that lives + as a subdirectory inside old/ directory correctly. + + * "git replace -e" did not honour "core.editor" configuration. + + * "git push" from a corrupt repository that attempts to push a large + number of refs deadlocked; the thread to relay rejection notices + for these ref updates blocked on writing them to the main thread, + after the main thread at the receiving end notices that the push + failed and decides not to read these notices and return a failure. + + * mmap emulation on Windows has been optimized and work better without + consuming paging store when not needed. + + * A question by "git send-email" to ask the identity of the sender + has been updated. + + * UI consistency improvements for "git mergetool". + + * "git rebase -m" could be asked to rebase an entire branch starting + from the root, but failed by assuming that there always is a parent + commit to the first commit on the branch. + + * Fix a broken "p4 lfs" test. + + * Recent update to Git LFS broke "git p4" by changing the output from + its "lfs pointer" subcommand. + + * "git fetch" test t5510 was flaky while running a (forced) automagic + garbage collection. + + * Documentation updates to help contributors setting up Travis CI + test for their patches. + + * Some multi-byte encoding can have a backslash byte as a later part + of one letter, which would confuse "highlight" filter used in + gitweb. + + * "git commit-tree" plumbing command required the user to always sign + its result when the user sets the commit.gpgsign configuration + variable, which was an ancient mistake. Rework "git rebase" that + relied on this mistake so that it reads commit.gpgsign and pass (or + not pass) the -S option to "git commit-tree" to keep the end-user + expectation the same, while teaching "git commit-tree" to ignore + the configuration variable. This will stop requiring the users to + sign commit objects used internally as an implementation detail of + "git stash". + + * "http.cookieFile" configuration variable clearly wants a pathname, + but we forgot to treat it as such by e.g. applying tilde expansion. + + * Consolidate description of tilde-expansion that is done to + configuration variables that take pathname to a single place. + + * Correct faulty recommendation to use "git submodule deinit ." when + de-initialising all submodules, which would result in a strange + error message in a pathological corner case. + + * Many 'linkgit:' references were broken, + which are all fixed with this. + + * "git rerere" can get confused by conflict markers deliberately left + by the inner merge step, because they are indistinguishable from + the real conflict markers left by the outermost merge which are + what the end user and "rerere" need to look at. This was fixed by + making the conflict markers left by the inner merges a bit longer. + (merge 0f9fd5c jc/ll-merge-internal later to maint). + + * CI test was taught to build documentation pages. + + * "git fsck" learned to catch NUL byte in a commit object as + potential error and warn. + + * Portability enhancement for "rebase -i" to help platforms whose + shell does not like "for i in " (which is not POSIX-kosher). + + * On Windows, .git and optionally any files whose name starts with a + dot are now marked as hidden, with a core.hideDotFiles knob to + customize this behaviour. + + * Documentation for "git merge --verify-signatures" has been updated + to clarify that the signature of only the commit at the tip is + verified. Also the phrasing used for signature and key validity is + adjusted to align with that used by OpenPGP. + + * A couple of bugs around core.autocrlf have been fixed. + + * Many commands normalize command line arguments from NFD to NFC + variant of UTF-8 on OSX, but commands in the "diff" family did + not, causing "git diff $path" to complain that no such path is + known to Git. They have been taught to do the normalization. + + * "git difftool" learned to handle unmerged paths correctly in + dir-diff mode. + + * The "are we talking with TTY, doing an interactive session?" + detection has been updated to work better for "Git for Windows". + + * We forgot to add "git log --decorate=auto" to documentation when we + added the feature back in v2.1.0 timeframe. + (merge 462cbb4 rj/log-decorate-auto later to maint). + + * "git fast-import --export-marks" would overwrite the existing marks + file even when it makes a dump from its custom die routine. + Prevent it from doing so when we have an import-marks file but + haven't finished reading it. + (merge f4beed6 fc/fast-import-broken-marks-file later to maint). + + * "git rebase -i", after it fails to auto-resolve the conflict, had + an unnecessary call to "git rerere" from its very early days, which + was spotted recently; the call has been removed. + (merge 7063693 js/rebase-i-dedup-call-to-rerere later to maint). + + * Other minor clean-ups and documentation updates + (merge cd82b7a pa/cherry-pick-doc-typo later to maint). + (merge 2bb73ae rs/patch-id-use-skip-prefix later to maint). + (merge aa20cbc rs/apply-name-terminate later to maint). + (merge fe17fc0 jc/t2300-setup later to maint). + (merge e256eec jk/shell-portability later to maint). diff --git a/Documentation/RelNotes/2.9.1.txt b/Documentation/RelNotes/2.9.1.txt new file mode 100644 index 0000000000..338394097e --- /dev/null +++ b/Documentation/RelNotes/2.9.1.txt @@ -0,0 +1,117 @@ +Git v2.9.1 Release Notes +======================== + +Fixes since v2.9 +---------------- + + * When "git daemon" is run without --[init-]timeout specified, a + connection from a client that silently goes offline can hang around + for a long time, wasting resources. The socket-level KEEPALIVE has + been enabled to allow the OS to notice such failed connections. + + * The commands in `git log` family take %C(auto) in a custom format + string. This unconditionally turned the color on, ignoring + --no-color or with --color=auto when the output is not connected to + a tty; this was corrected to make the format truly behave as + "auto". + + * "git rev-list --count" whose walk-length is limited with "-n" + option did not work well with the counting optimized to look at the + bitmap index. + + * "git show -W" (extend hunks to cover the entire function, delimited + by lines that match the "funcname" pattern) used to show the entire + file when a change added an entire function at the end of the file, + which has been fixed. + + * The documentation set has been updated so that literal commands, + configuration variables and environment variables are consistently + typeset in fixed-width font and bold in manpages. + + * "git svn propset" subcommand that was added in 2.3 days is + documented now. + + * The documentation tries to consistently spell "GPG"; when + referring to the specific program name, "gpg" is used. + + * "git reflog" stopped upon seeing an entry that denotes a branch + creation event (aka "unborn"), which made it appear as if the + reflog was truncated. + + * The git-prompt scriptlet (in contrib/) was not friendly with those + who uses "set -u", which has been fixed. + + * A codepath that used alloca(3) to place an unbounded amount of data + on the stack has been updated to avoid doing so. + + * "git update-index --add --chmod=+x file" may be usable as an escape + hatch, but not a friendly thing to force for people who do need to + use it regularly. "git add --chmod=+x file" can be used instead. + + * Build improvements for gnome-keyring (in contrib/) + + * "git status" used to say "working directory" when it meant "working + tree". + + * Comments about misbehaving FreeBSD shells have been clarified with + the version number (9.x and before are broken, newer ones are OK). + + * "git cherry-pick A" worked on an unborn branch, but "git + cherry-pick A..B" didn't. + + * "git add -i/-p" learned to honor diff.compactionHeuristic + experimental knob, so that the user can work on the same hunk split + as "git diff" output. + + * "log --graph --format=" learned that "%>|(N)" specifies the width + relative to the terminal's left edge, not relative to the area to + draw text that is to the right of the ancestry-graph section. It + also now accepts negative N that means the column limit is relative + to the right border. + + * The ownership rule for the piece of memory that hold references to + be fetched in "git fetch" was screwy, which has been cleaned up. + + * "git bisect" makes an internal call to "git diff-tree" when + bisection finds the culprit, but this call did not initialize the + data structure to pass to the diff-tree API correctly. + + * Formats of the various data (and how to validate them) where we use + GPG signature have been documented. + + * Fix an unintended regression in v2.9 that breaks "clone --depth" + that recurses down to submodules by forcing the submodules to also + be cloned shallowly, which many server instances that host upstream + of the submodules are not prepared for. + + * Fix unnecessarily waste in the idiomatic use of ': ${VAR=default}' + to set the default value, without enclosing it in double quotes. + + * Some platform-specific code had non-ANSI strict declarations of C + functions that do not take any parameters, which has been + corrected. + + * The internal code used to show local timezone offset is not + prepared to handle timestamps beyond year 2100, and gave a + bogus offset value to the caller. Use a more benign looking + +0000 instead and let "git log" going in such a case, instead + of aborting. + + * One among four invocations of readlink(1) in our test suite has + been rewritten so that the test can run on systems without the + command (others are in valgrind test framework and t9802). + + * t/perf needs /usr/bin/time with GNU extension; the invocation of it + is updated to "gtime" on Darwin. + + * A bug, which caused "git p4" while running under verbose mode to + report paths that are omitted due to branch prefix incorrectly, has + been fixed; the command said "Ignoring file outside of prefix" for + paths that are _inside_. + + * The top level documentation "git help git" still pointed at the + documentation set hosted at now-defunct google-code repository. + Update it to point to https://git.github.io/htmldocs/git.html + instead. + +Also contains minor documentation updates and code clean-ups. diff --git a/Documentation/RelNotes/2.9.2.txt b/Documentation/RelNotes/2.9.2.txt new file mode 100644 index 0000000000..2620003dcf --- /dev/null +++ b/Documentation/RelNotes/2.9.2.txt @@ -0,0 +1,13 @@ +Git v2.9.2 Release Notes +======================== + +Fixes since v2.9.1 +------------------ + + * A fix merged to v2.9.1 had a few tests that are not meant to be + run on platforms without 64-bit long, which caused unnecessary + test failures on them because we didn't detect the platform and + skip them. These tests are now skipped on platforms that they + are not applicable to. + +No other change is included in this update. diff --git a/Documentation/RelNotes/2.9.3.txt b/Documentation/RelNotes/2.9.3.txt new file mode 100644 index 0000000000..695b86f612 --- /dev/null +++ b/Documentation/RelNotes/2.9.3.txt @@ -0,0 +1,170 @@ +Git v2.9.3 Release Notes +======================== + +Fixes since v2.9.2 +------------------ + + * A helper function that takes the contents of a commit object and + finds its subject line did not ignore leading blank lines, as is + commonly done by other codepaths. Make it ignore leading blank + lines to match. + + * Git does not know what the contents in the index should be for a + path added with "git add -N" yet, so "git grep --cached" should not + show hits (or show lack of hits, with -L) in such a path, but that + logic does not apply to "git grep", i.e. searching in the working + tree files. But we did so by mistake, which has been corrected. + + * "git rebase -i --autostash" did not restore the auto-stashed change + when the operation was aborted. + + * "git commit --amend --allow-empty-message -S" for a commit without + any message body could have misidentified where the header of the + commit object ends. + + * More mark-up updates to typeset strings that are expected to + literally typed by the end user in fixed-width font. + + * For a long time, we carried an in-code comment that said our + colored output would work only when we use fprintf/fputs on + Windows, which no longer is the case for the past few years. + + * "gc.autoPackLimit" when set to 1 should not trigger a repacking + when there is only one pack, but the code counted poorly and did + so. + + * One part of "git am" had an oddball helper function that called + stuff from outside "his" as opposed to calling what we have "ours", + which was not gender-neutral and also inconsistent with the rest of + the system where outside stuff is usuall called "theirs" in + contrast to "ours". + + * The test framework learned a new helper test_match_signal to + check an exit code from getting killed by an expected signal. + + * "git blame -M" missed a single line that was moved within the file. + + * Fix recently introduced codepaths that are involved in parallel + submodule operations, which gave up on reading too early, and + could have wasted CPU while attempting to write under a corner + case condition. + + * "git grep -i" has been taught to fold case in non-ascii locales + correctly. + + * A test that unconditionally used "mktemp" learned that the command + is not necessarily available everywhere. + + * "git blame file" allowed the lineage of lines in the uncommitted, + unadded contents of "file" to be inspected, but it refused when + "file" did not appear in the current commit. When "file" was + created by renaming an existing file (but the change has not been + committed), this restriction was unnecessarily tight. + + * "git add -N dir/file && git write-tree" produced an incorrect tree + when there are other paths in the same directory that sorts after + "file". + + * "git fetch http://user:pass@host/repo..." scrubbed the userinfo + part, but "git push" didn't. + + * An age old bug that caused "git diff --ignore-space-at-eol" + misbehave has been fixed. + + * "git notes merge" had a code to see if a path exists (and fails if + it does) and then open the path for writing (when it doesn't). + Replace it with open with O_EXCL. + + * "git pack-objects" and "git index-pack" mostly operate with off_t + when talking about the offset of objects in a packfile, but there + were a handful of places that used "unsigned long" to hold that + value, leading to an unintended truncation. + + * Recent update to "git daemon" tries to enable the socket-level + KEEPALIVE, but when it is spawned via inetd, the standard input + file descriptor may not necessarily be connected to a socket. + Suppress an ENOTSOCK error from setsockopt(). + + * Recent FreeBSD stopped making perl available at /usr/bin/perl; + switch the default the built-in path to /usr/local/bin/perl on not + too ancient FreeBSD releases. + + * "git status" learned to suggest "merge --abort" during a conflicted + merge, just like it already suggests "rebase --abort" during a + conflicted rebase. + + * The .c/.h sources are marked as such in our .gitattributes file so + that "git diff -W" and friends would work better. + + * Existing autoconf generated test for the need to link with pthread + library did not check all the functions from pthread libraries; + recent FreeBSD has some functions in libc but not others, and we + mistakenly thought linking with libc is enough when it is not. + + * Allow http daemon tests in Travis CI tests. + + * Users of the parse_options_concat() API function need to allocate + extra slots in advance and fill them with OPT_END() when they want + to decide the set of supported options dynamically, which makes the + code error-prone and hard to read. This has been corrected by tweaking + the API to allocate and return a new copy of "struct option" array. + + * The use of strbuf in "git rm" to build filename to remove was a bit + suboptimal, which has been fixed. + + * "git commit --help" said "--no-verify" is only about skipping the + pre-commit hook, and failed to say that it also skipped the + commit-msg hook. + + * "git merge" in Git v2.9 was taught to forbid merging an unrelated + lines of history by default, but that is exactly the kind of thing + the "--rejoin" mode of "git subtree" (in contrib/) wants to do. + "git subtree" has been taught to use the "--allow-unrelated-histories" + option to override the default. + + * The build procedure for "git persistent-https" helper (in contrib/) + has been updated so that it can be built with more recent versions + of Go. + + * There is an optimization used in "git diff $treeA $treeB" to borrow + an already checked-out copy in the working tree when it is known to + be the same as the blob being compared, expecting that open/mmap of + such a file is faster than reading it from the object store, which + involves inflating and applying delta. This however kicked in even + when the checked-out copy needs to go through the convert-to-git + conversion (including the clean filter), which defeats the whole + point of the optimization. The optimization has been disabled when + the conversion is necessary. + + * "git -c grep.patternType=extended log --basic-regexp" misbehaved + because the internal API to access the grep machinery was not + designed well. + + * Windows port was failing some tests in t4130, due to the lack of + inum in the returned values by its lstat(2) emulation. + + * The characters in the label shown for tags/refs for commits in + "gitweb" output are now properly escaped for proper HTML output. + + * FreeBSD can lie when asked mtime of a directory, which made the + untracked cache code to fall back to a slow-path, which in turn + caused tests in t7063 to fail because it wanted to verify the + behaviour of the fast-path. + + * Squelch compiler warnings for netmalloc (in compat/) library. + + * The API documentation for hashmap was unclear if hashmap_entry + can be safely discarded without any other consideration. State + that it is safe to do so. + + * Not-so-recent rewrite of "git am" that started making internal + calls into the commit machinery had an unintended regression, in + that no matter how many seconds it took to apply many patches, the + resulting committer timestamp for the resulting commits were all + the same. + + * "git difftool ..." started in a subdirectory failed to + interpret the paths relative to that directory, which has been + fixed. + +Also contains minor documentation updates and code clean-ups. diff --git a/Documentation/RelNotes/2.9.4.txt b/Documentation/RelNotes/2.9.4.txt new file mode 100644 index 0000000000..01e864278b --- /dev/null +++ b/Documentation/RelNotes/2.9.4.txt @@ -0,0 +1,83 @@ +Git v2.9.4 Release Notes +======================== + +Fixes since v2.9.3 +------------------ + + * There are certain house-keeping tasks that need to be performed at + the very beginning of any Git program, and programs that are not + built-in commands had to do them exactly the same way as "git" + potty does. It was easy to make mistakes in one-off standalone + programs (like test helpers). A common "main()" function that + calls cmd_main() of individual program has been introduced to + make it harder to make mistakes. + + * "git merge" with renormalization did not work well with + merge-recursive, due to "safer crlf" conversion kicking in when it + shouldn't. + + * The reflog output format is documented better, and a new format + --date=unix to report the seconds-since-epoch (without timezone) + has been added. + + * "git push --force-with-lease" already had enough logic to allow + ensuring that such a push results in creation of a ref (i.e. the + receiving end did not have another push from sideways that would be + discarded by our force-pushing), but didn't expose this possibility + to the users. It does so now. + + * "import-tars" fast-import script (in contrib/) used to ignore a + hardlink target and replaced it with an empty file, which has been + corrected to record the same blob as the other file the hardlink is + shared with. + + * "git mv dir non-existing-dir/" did not work in some environments + the same way as existing mainstream platforms. The code now moves + "dir" to "non-existing-dir", without relying on rename("A", "B/") + that strips the trailing slash of '/'. + + * The "t/" hierarchy is prone to get an unusual pathname; "make test" + has been taught to make sure they do not contain paths that cannot + be checked out on Windows (and the mechanism can be reusable to + catch pathnames that are not portable to other platforms as need + arises). + + * When "git merge-recursive" works on history with many criss-cross + merges in "verbose" mode, the names the command assigns to the + virtual merge bases could have overwritten each other by unintended + reuse of the same piece of memory. + + * "git checkout --detach " used to give the same advice + message as that is issued when "git checkout " (or anything + that is not a branch name) is given, but asking with "--detach" is + an explicit enough sign that the user knows what is going on. The + advice message has been squelched in this case. + + * "git difftool" by default ignores the error exit from the backend + commands it spawns, because often they signal that they found + differences by exiting with a non-zero status code just like "diff" + does; the exit status codes 126 and above however are special in + that they are used to signal that the command is not executable, + does not exist, or killed by a signal. "git difftool" has been + taught to notice these exit status codes. + + * On Windows, help.browser configuration variable used to be ignored, + which has been corrected. + + * The "git -c var[=val] cmd" facility to append a configuration + variable definition at the end of the search order was described in + git(1) manual page, but not in git-config(1), which was more likely + place for people to look for when they ask "can I make a one-shot + override, and if so how?" + + * The tempfile (hence its user lockfile) API lets the caller to open + a file descriptor to a temporary file, write into it and then + finalize it by first closing the filehandle and then either + removing or renaming the temporary file. When the process spawns a + subprocess after obtaining the file descriptor, and if the + subprocess has not exited when the attempt to remove or rename is + made, the last step fails on Windows, because the subprocess has + the file descriptor still open. Open tempfile with O_CLOEXEC flag + to avoid this (on Windows, this is mapped to O_NOINHERIT). + +Also contains minor documentation updates and code clean-ups. diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index e8ad978824..08352deaae 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches @@ -121,6 +121,16 @@ its behaviour. Try to make sure your explanation can be understood without external resources. Instead of giving a URL to a mailing list archive, summarize the relevant points of the discussion. +If you want to reference a previous commit in the history of a stable +branch, use the format "abbreviated sha1 (subject, date)", +with the subject enclosed in a pair of double-quotes, like this: + + Commit f86a374 ("pack-bitmap.c: fix a memleak", 2015-03-30) + noticed that ... + +The "Copy commit summary" command of gitk can be used to obtain this +format. + (3) Generate your patch using Git tools out of your commits. diff --git a/Documentation/config.txt b/Documentation/config.txt index 02696208c9..a077c64ef0 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -140,7 +140,7 @@ boolean:: false;; Boolean false can be spelled as `no`, `off`, `false`, or `0`. + -When converting value to the canonical form using '--bool' type +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). @@ -150,27 +150,34 @@ integer:: 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. + The value for a variable that takes a color is a list of + colors (at most two, one for foreground and one for background) + and attributes (as many as you want), separated by spaces. ++ +The basic colors accepted are `normal`, `black`, `red`, `green`, `yellow`, +`blue`, `magenta`, `cyan` and `white`. The first color given is the +foreground; the second is the background. ++ +Colors 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 accepted attributes are `bold`, `dim`, `ul`, `blink`, `reverse`, +`italic`, and `strike` (for crossed-out or "strikethrough" letters). +The position of any attributes with respect to the colors +(before, after, or in between), doesn't matter. Specific attributes may +be turned off by prefixing them with `no` or `no-` (e.g., `noreverse`, +`no-ul`, etc). ++ +For git's pre-defined color slots, 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. +However, custom log formats may do more complicated and layered +coloring, and the negated forms may be useful there. pathname:: A variable that takes a pathname value can be given a @@ -405,13 +412,11 @@ file with mixed line endings would be reported by the `core.safecrlf` mechanism. core.autocrlf:: - Setting this variable to "true" is almost the same as setting - the `text` attribute to "auto" on all files except that text - files are not guaranteed to be normalized: files that contain - `CRLF` in the repository will not be touched. Use this - setting if you want to have `CRLF` line endings in your - working directory even though the repository does not have - normalized line endings. This variable can be set to 'input', + Setting this variable to "true" is the same as setting + the `text` attribute to "auto" on all files and core.eol to "crlf". + Set to true if you want to have `CRLF` line endings in your + working directory and the repository has LF line endings. + This variable can be set to 'input', in which case no output conversion is performed. core.symlinks:: @@ -434,7 +439,7 @@ core.gitProxy:: may be set multiple times and is matched in the given order; the first match wins. + -Can be overridden by the 'GIT_PROXY_COMMAND' environment variable +Can be overridden by the `GIT_PROXY_COMMAND` environment variable (which always applies universally, without the special "for" handling). + @@ -443,6 +448,13 @@ specify that no proxy be used for a given domain pattern. This is useful for excluding servers inside a firewall from proxy use, while defaulting to a common proxy for external domains. +core.sshCommand:: + If this variable is set, `git fetch` and `git push` will + use the specified command instead of `ssh` when they need to + connect to a remote system. The command is in the same form as + the `GIT_SSH_COMMAND` environment variable and is overridden + when the environment variable is set. + core.ignoreStat:: If true, Git will avoid using lstat() calls to detect if files have changed by setting the "assume-unchanged" bit for those tracked files @@ -478,10 +490,10 @@ false), while all other repositories are assumed to be bare (bare core.worktree:: Set the path to the root of the working tree. - If GIT_COMMON_DIR environment variable is set, core.worktree + If `GIT_COMMON_DIR` environment variable is set, core.worktree is ignored and not used for determining the root of working tree. - This can be overridden by the GIT_WORK_TREE environment - variable and the '--work-tree' command-line option. + This can be overridden by the `GIT_WORK_TREE` environment + variable and the `--work-tree` command-line option. The value can be an absolute path or relative to the path to the .git directory, which is either specified by --git-dir or GIT_DIR, or automatically discovered. @@ -545,7 +557,7 @@ 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:: An integer -1..9, indicating the compression level for objects that @@ -619,9 +631,9 @@ core.excludesFile:: 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' + via the value of this variable. Can be overridden by the `GIT_ASKPASS` environment variable. If not set, fall back to the value of the - 'SSH_ASKPASS' environment variable or, failing that, a simple password + `SSH_ASKPASS` environment variable or, failing that, a simple password prompt. The external program shall be given a suitable prompt as command-line argument and write the password on its STDOUT. @@ -633,6 +645,23 @@ core.attributesFile:: `$XDG_CONFIG_HOME/git/attributes`. If `$XDG_CONFIG_HOME` is either not set or empty, `$HOME/.config/git/attributes` is used instead. +core.hooksPath:: + By default Git will look for your hooks in the + '$GIT_DIR/hooks' directory. Set this to different path, + e.g. '/etc/git/hooks', and Git will try to find your hooks in + that directory, e.g. '/etc/git/hooks/pre-receive' instead of + in '$GIT_DIR/hooks/pre-receive'. ++ +The path can be either absolute or relative. A relative path is +taken as relative to the directory where the hooks are run (see +the "DESCRIPTION" section of linkgit:githooks[5]). ++ +This configuration variable is useful in cases where you'd like to +centrally configure your Git hooks instead of configuring them on a +per-repository basis, or as a more flexible and centralized +alternative to having an `init.templateDir` where you've changed +default hooks. + core.editor:: Commands such as `commit` and `tag` that lets you edit messages by launching an editor uses the value of this @@ -747,7 +776,7 @@ core.notesRef:: notes should be printed. + This setting defaults to "refs/notes/commits", and it can be overridden by -the 'GIT_NOTES_REF' environment variable. See linkgit:git-notes[1]. +the `GIT_NOTES_REF` environment variable. See linkgit:git-notes[1]. core.sparseCheckout:: Enable "sparse checkout" feature. See section "Sparse checkout" in @@ -762,7 +791,7 @@ core.abbrev:: 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' + added due to indexing errors. Equivalent to the `--ignore-errors` option of linkgit:git-add[1]. `add.ignore-errors` is deprecated, as it does not follow the usual naming convention for configuration variables. @@ -783,14 +812,14 @@ it will be treated as a shell command. For example, defining "gitk --all --not ORIG_HEAD". Note that shell commands will be executed from the top-level directory of a repository, which may not necessarily be the current directory. -'GIT_PREFIX' is set as returned by running 'git rev-parse --show-prefix' +`GIT_PREFIX` is set as returned by running 'git rev-parse --show-prefix' from the original current directory. See linkgit:git-rev-parse[1]. am.keepcr:: If true, git-am will call git-mailsplit for patches in mbox format - with parameter '--keep-cr'. In this case git-mailsplit will + with parameter `--keep-cr`. In this case git-mailsplit will not remove `\r` from lines ending with `\r\n`. Can be overridden - by giving '--no-keep-cr' from the command line. + by giving `--no-keep-cr` from the command line. See linkgit:git-am[1], linkgit:git-mailsplit[1]. am.threeWay:: @@ -803,7 +832,7 @@ am.threeWay:: apply.ignoreWhitespace:: When set to 'change', tells 'git apply' to ignore changes in - whitespace, in the same way as the '--ignore-space-change' + whitespace, in the same way as the `--ignore-space-change` option. When set to one of: no, none, never, false tells 'git apply' to respect all whitespace differences. @@ -811,7 +840,7 @@ apply.ignoreWhitespace:: apply.whitespace:: Tells 'git apply' how to handle whitespaces, in the same way - as the '--whitespace' option. See linkgit:git-apply[1]. + as the `--whitespace` option. See linkgit:git-apply[1]. branch.autoSetupMerge:: Tells 'git branch' and 'git checkout' to set up new branches @@ -913,7 +942,7 @@ browser..cmd:: browser..path:: Override the path for the given tool that may be used to - browse HTML help (see '-w' option in linkgit:git-help[1]) or a + browse HTML help (see `-w` option in linkgit:git-help[1]) or a working repository in gitweb (see linkgit:git-instaweb[1]). clean.requireForce:: @@ -924,7 +953,8 @@ color.branch:: A boolean to enable/disable color in the output of linkgit:git-branch[1]. May be set to `always`, `false` (or `never`) or `auto` (or `true`), in which case colors are used - only when the output is to a terminal. Defaults to false. + only when the output is to a terminal. If unset, then the + value of `color.ui` is used (`auto` by default). color.branch.:: Use customized color for branch coloration. `` is one of @@ -939,7 +969,8 @@ color.diff:: linkgit:git-log[1], and linkgit:git-show[1] will use color for all patches. If it is set to `true` or `auto`, those commands will only use color when output is to the terminal. - Defaults to false. + If unset, then the value of `color.ui` is used (`auto` by + default). + This does not affect linkgit:git-format-patch[1] or the 'git-diff-{asterisk}' plumbing commands. Can be overridden on the @@ -962,7 +993,8 @@ color.decorate.:: color.grep:: When set to `always`, always highlight matches. When `false` (or `never`), never. When set to `true` or `auto`, use color only - when the output is written to the terminal. Defaults to `false`. + when the output is written to the terminal. If unset, then the + value of `color.ui` is used (`auto` by default). color.grep.:: Use customized color for grep colorization. `` specifies which @@ -995,7 +1027,8 @@ color.interactive:: and displays (such as those used by "git-add --interactive" and "git-clean --interactive"). When false (or `never`), never. When set to `true` or `auto`, use colors only when the output is - to the terminal. Defaults to false. + to the terminal. If unset, then the value of `color.ui` is + used (`auto` by default). color.interactive.:: Use customized color for 'git add --interactive' and 'git clean @@ -1011,13 +1044,15 @@ 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 - only when the output is to a terminal. Defaults to false. + only when the output is to a terminal. If unset, then the + value of `color.ui` is used (`auto` by default). color.status:: A boolean to enable/disable color in the output of linkgit:git-status[1]. May be set to `always`, `false` (or `never`) or `auto` (or `true`), in which case colors are used - only when the output is to a terminal. Defaults to false. + only when the output is to a terminal. If unset, then the + value of `color.ui` is used (`auto` by default). color.status.:: Use customized color for status colorization. `` is @@ -1124,11 +1159,16 @@ commit.template:: Specify the pathname of a file to use as the template for new commit messages. +commit.verbose:: + A boolean or int to specify the level of verbose with `git commit`. + See linkgit:git-commit[1]. + credential.helper:: Specify an external helper to be called when a username or password credential is needed; the helper may consult external - storage to avoid prompting the user for the credentials. See - linkgit:gitcredentials[7] for details. + storage to avoid prompting the user for the credentials. Note + that multiple helpers may be defined. See linkgit:gitcredentials[7] + for details. credential.useHttpPath:: When acquiring credentials, consider the "path" component of an http @@ -1167,6 +1207,15 @@ difftool..cmd:: difftool.prompt:: Prompt before each invocation of the diff tool. +fastimport.unpackLimit:: + If the number of objects imported by linkgit:git-fast-import[1] + is below this limit, then the objects will be unpacked into + loose object files. However if the number of imported objects + equals or exceeds this limit then the pack will be stored as a + pack. Storing the pack from a fast-import can make the import + operation complete faster, especially on slow filesystems. If + not set, the value of `transfer.unpackLimit` is used instead. + fetch.recurseSubmodules:: This option can be either set to a boolean value or to 'on-demand'. Setting it to a boolean changes the behavior of fetch and pull to @@ -1198,6 +1247,11 @@ fetch.prune:: If true, fetch will automatically behave as if the `--prune` option was given on the command line. See also `remote..prune`. +fetch.output:: + Control how ref update status is printed. Valid values are + `full` and `compact`. Default value is `full`. See section + OUTPUT in linkgit:git-fetch[1] for detail. + format.attach:: Enable multipart/mixed attachments as the default for 'format-patch'. The value can also be a double quoted string @@ -1205,6 +1259,16 @@ format.attach:: value as the boundary. See the --attach option in linkgit:git-format-patch[1]. +format.from:: + Provides the default value for the `--from` option to format-patch. + Accepts a boolean value, or a name and email address. If false, + format-patch defaults to `--no-from`, using commit authors directly in + the "From:" field of patch mails. If true, format-patch defaults to + `--from`, using your committer identity in the "From:" field of patch + mails and including a "From:" field in the body of the patch mail if + different. If set to a non-boolean value, format-patch uses that + value instead of your committer identity. Defaults to false. + format.numbered:: A boolean which can enable or disable sequence numbers in patch subjects. It defaults to "auto" which enables it only if there @@ -1272,6 +1336,10 @@ format.outputDirectory:: Set a custom directory to store the resulting files instead of the current working directory. +format.useAutoBase:: + A boolean value which lets you enable the `--base=auto` option of + format-patch by default. + filter..clean:: The command which is used to convert the content of a worktree file to a blob upon checkin. See linkgit:gitattributes[5] for @@ -1304,7 +1372,7 @@ fsck.skipList:: gc.aggressiveDepth:: The depth parameter used in the delta compression algorithm used by 'git gc --aggressive'. This defaults - to 250. + to 50. gc.aggressiveWindow:: The window size parameter used in the delta compression @@ -1394,24 +1462,24 @@ gitcvs.logFile:: gitcvs.usecrlfattr:: If true, the server will look up the end-of-line conversion - attributes for files to determine the '-k' modes to use. If + attributes for files to determine the `-k` modes to use. If the attributes force Git to treat a file as text, - the '-k' mode will be left blank so CVS clients will + the `-k` mode will be left blank so CVS clients will 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:: - This is used if 'gitcvs.usecrlfattr' does not resolve + 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 mode '-kb'. This causes the client to treat them as binary files, which suppresses any newline munging it otherwise might do. Alternatively, if it is set to "guess", then the contents of the file are examined to decide if - it is binary, similar to 'core.autocrlf'. + it is binary, similar to `core.autocrlf`. gitcvs.dbName:: Database used by git-cvsserver to cache revision information @@ -1430,7 +1498,7 @@ gitcvs.dbDriver:: See linkgit:git-cvsserver[1]. gitcvs.dbUser, gitcvs.dbPass:: - Database user and password. Only useful if setting 'gitcvs.dbDriver', + 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 linkgit:git-cvsserver[1] for details). @@ -1442,8 +1510,8 @@ gitcvs.dbTableNamePrefix:: linkgit:git-cvsserver[1] for details). Any non-alphabetic characters will be replaced with underscores. -All gitcvs variables except for 'gitcvs.usecrlfattr' and -'gitcvs.allBinary' can also be specified as +All gitcvs variables except for `gitcvs.usecrlfattr` and +`gitcvs.allBinary` can also be specified as 'gitcvs..' (where 'access_method' is one of "ext" and "pserver") to make them apply only for the given access method. @@ -1466,17 +1534,17 @@ gitweb.snapshot:: See linkgit:gitweb.conf[5] for description. grep.lineNumber:: - If set to true, enable '-n' option by default. + If set to true, enable `-n` option by default. grep.patternType:: Set the default matching behavior. Using a value of 'basic', 'extended', - 'fixed', or 'perl' will enable the '--basic-regexp', '--extended-regexp', - '--fixed-strings', or '--perl-regexp' option accordingly, while the + 'fixed', or 'perl' will enable the `--basic-regexp`, `--extended-regexp`, + `--fixed-strings`, or `--perl-regexp` option accordingly, while the value 'default' will return to the default matching behavior. grep.extendedRegexp:: - If set to true, enable '--extended-regexp' option by default. This - option is ignored when the 'grep.patternType' option is set to a value + If set to true, enable `--extended-regexp` option by default. This + option is ignored when the `grep.patternType` option is set to a value other than 'default'. grep.threads:: @@ -1561,7 +1629,7 @@ guitool..cmd:: of the linkgit:git-gui[1] `Tools` menu is invoked. This option is mandatory for every tool. The command is executed from the root of the working directory, and in the environment it receives the name of - the tool as 'GIT_GUITOOL', the name of the currently selected file as + the tool as `GIT_GUITOOL`, the name of the currently selected file as 'FILENAME', and the name of the current branch as 'CUR_BRANCH' (if the head is detached, 'CUR_BRANCH' is empty). @@ -1582,7 +1650,7 @@ guitool..confirm:: guitool..argPrompt:: Request a string argument from the user, and pass it to the tool - through the 'ARGS' environment variable. Since requesting an + through the `ARGS` environment variable. Since requesting an argument implies confirmation, the 'confirm' option has no effect if this is enabled. If the option is set to 'true', 'yes', or '1', the dialog uses a built-in generic prompt; otherwise the exact @@ -1590,7 +1658,7 @@ guitool..argPrompt:: guitool..revPrompt:: Request a single valid revision from the user, and set the - 'REVISION' environment variable. In other aspects this option + `REVISION` environment variable. In other aspects this option is similar to 'argPrompt', and can be used together with it. guitool..revUnmerged:: @@ -1646,7 +1714,7 @@ http.proxyAuthMethod:: only takes effect if the configured proxy string contains a user name part (i.e. is of the form 'user@host' or 'user@host:port'). This can be overridden on a per-remote basis; see `remote..proxyAuthMethod`. - Both can be overridden by the 'GIT_HTTP_PROXY_AUTHMETHOD' environment + Both can be overridden by the `GIT_HTTP_PROXY_AUTHMETHOD` environment variable. Possible values are: + -- @@ -1668,6 +1736,12 @@ http.emptyAuth:: a username in the URL, as libcurl normally requires a username for authentication. +http.extraHeader:: + Pass an additional HTTP header when communicating with a server. If + more than one such entry exists, all of them are added as extra + headers. To allow overriding the settings inherited from the system + config, an empty value will reset the extra headers to the empty list. + http.cookieFile:: The pathname of a file containing previously stored cookie lines, which should be used @@ -1699,9 +1773,9 @@ http.sslVersion:: - tlsv1.2 + -Can be overridden by the 'GIT_SSL_VERSION' environment variable. +Can be overridden by the `GIT_SSL_VERSION` environment variable. To force git to use libcurl's default ssl version and ignore any -explicit http.sslversion option, set 'GIT_SSL_VERSION' to the +explicit http.sslversion option, set `GIT_SSL_VERSION` to the empty string. http.sslCipherList:: @@ -1712,41 +1786,41 @@ http.sslCipherList:: option; see the libcurl documentation for more details on the format of this list. + -Can be overridden by the 'GIT_SSL_CIPHER_LIST' environment variable. +Can be overridden by the `GIT_SSL_CIPHER_LIST` environment variable. To force git to use libcurl's default cipher list and ignore any -explicit http.sslCipherList option, set 'GIT_SSL_CIPHER_LIST' to the +explicit http.sslCipherList option, set `GIT_SSL_CIPHER_LIST` to the empty string. http.sslVerify:: Whether to verify the SSL certificate when fetching or pushing - over HTTPS. Can be overridden by the 'GIT_SSL_NO_VERIFY' environment + over HTTPS. Can be overridden by the `GIT_SSL_NO_VERIFY` environment variable. http.sslCert:: File containing the SSL certificate when fetching or pushing - over HTTPS. Can be overridden by the 'GIT_SSL_CERT' environment + over HTTPS. Can be overridden by the `GIT_SSL_CERT` environment variable. http.sslKey:: File containing the SSL private key when fetching or pushing - over HTTPS. Can be overridden by the 'GIT_SSL_KEY' environment + over HTTPS. Can be overridden by the `GIT_SSL_KEY` environment variable. http.sslCertPasswordProtected:: Enable Git's password prompt for the SSL certificate. Otherwise OpenSSL will prompt the user, possibly many times, if the certificate or private key is encrypted. Can be overridden by the - 'GIT_SSL_CERT_PASSWORD_PROTECTED' environment variable. + `GIT_SSL_CERT_PASSWORD_PROTECTED` environment variable. http.sslCAInfo:: File containing the certificates to verify the peer with when fetching or pushing over HTTPS. Can be overridden by the - 'GIT_SSL_CAINFO' environment variable. + `GIT_SSL_CAINFO` environment variable. http.sslCAPath:: Path containing files with the CA certificates to verify the peer with when fetching or pushing over HTTPS. Can be overridden - by the 'GIT_SSL_CAPATH' environment variable. + by the `GIT_SSL_CAPATH` environment variable. http.pinnedpubkey:: Public key of the https service. It may either be the filename of @@ -1766,7 +1840,7 @@ http.sslTry:: http.maxRequests:: How many HTTP requests to launch in parallel. Can be overridden - by the 'GIT_HTTP_MAX_REQUESTS' environment variable. Default is 5. + by the `GIT_HTTP_MAX_REQUESTS` environment variable. Default is 5. http.minSessions:: The number of curl sessions (counted across slots) to be kept across @@ -1785,13 +1859,13 @@ http.postBuffer:: http.lowSpeedLimit, http.lowSpeedTime:: If the HTTP transfer speed is less than 'http.lowSpeedLimit' for longer than 'http.lowSpeedTime' seconds, the transfer is aborted. - Can be overridden by the 'GIT_HTTP_LOW_SPEED_LIMIT' and - 'GIT_HTTP_LOW_SPEED_TIME' environment variables. + Can be overridden by the `GIT_HTTP_LOW_SPEED_LIMIT` and + `GIT_HTTP_LOW_SPEED_TIME` environment variables. http.noEPSV:: A boolean which disables using of EPSV ftp command by curl. This can helpful with some "poor" ftp servers which don't - support EPSV mode. Can be overridden by the 'GIT_CURL_FTP_NO_EPSV' + support EPSV mode. Can be overridden by the `GIT_CURL_FTP_NO_EPSV` environment variable. Default is false (curl will use EPSV). http.userAgent:: @@ -1801,7 +1875,7 @@ http.userAgent:: such as Mozilla/4.0. This may be necessary, for instance, if connecting through a firewall that restricts HTTP connections to a set of common USER_AGENT strings (but not including those like git/1.7.1). - Can be overridden by the 'GIT_HTTP_USER_AGENT' environment variable. + Can be overridden by the `GIT_HTTP_USER_AGENT` environment variable. http..*:: Any of the http.* options above can be applied selectively to some URLs. @@ -1901,6 +1975,14 @@ interactive.singleKey:: setting is silently ignored if portable keystroke input is not available; requires the Perl module Term::ReadKey. +interactive.diffFilter:: + When an interactive command (such as `git add --patch`) shows + a colorized diff, git will pipe the diff through the shell + command defined by this configuration variable. The command may + mark up the diff further for human consumption, provided that it + retains a one-to-one correspondence with the lines in the + original diff. Defaults to disabled (no filtering). + log.abbrevCommit:: If true, makes linkgit:git-log[1], linkgit:git-show[1], and linkgit:git-whatchanged[1] assume `--abbrev-commit`. You may @@ -1916,7 +1998,10 @@ log.decorate:: command. If 'short' is specified, the ref name prefixes 'refs/heads/', 'refs/tags/' and 'refs/remotes/' will not be printed. If 'full' is specified, the full ref name (including prefix) will be printed. - This is the same as the log commands '--decorate' option. + If 'auto' is specified, then if the output is going to a terminal, + the ref names are shown as if 'short' were given, otherwise no ref + names are shown. This is the same as the `--decorate` option + of the `git log`. log.follow:: If `true`, `git log` will act as if the `--follow` option was used when @@ -2298,16 +2383,16 @@ new default). -- push.followTags:: - If set to true enable '--follow-tags' option by default. You + If set to true enable `--follow-tags` option by default. You may override this configuration at time of push by specifying - '--no-follow-tags'. + `--no-follow-tags`. push.gpgSign:: May be set to a boolean value, or the string 'if-asked'. A true - value causes all pushes to be GPG signed, as if '--signed' is + value causes all pushes to be GPG signed, as if `--signed` is passed to linkgit:git-push[1]. The string 'if-asked' causes pushes to be signed if the server supports it, as if - '--signed=if-asked' is passed to 'git push'. A false value may + `--signed=if-asked` is passed to 'git push'. A false value may override a value from a lower-priority config file. An explicit command-line flag always overrides this config option. @@ -2330,7 +2415,7 @@ rebase.stat:: rebase. False by default. rebase.autoSquash:: - If set to true enable '--autosquash' option by default. + If set to true enable `--autosquash` option by default. rebase.autoStash:: When set to true, automatically create a temporary stash @@ -2358,8 +2443,13 @@ rebase.instructionFormat 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. + capability to its clients. If you don't want to advertise this + capability, set this variable to false. + +receive.advertisePushOptions:: + By default, git-receive-pack will advertise the push options + capability to its clients. If you don't want to advertise this + capability, set this variable to false. receive.autogc:: By default, git-receive-pack will run "git-gc --auto" after @@ -2414,6 +2504,15 @@ receive.fsck.skipList:: can be safely ignored such as invalid committer email addresses. Note: corrupt objects cannot be skipped with this setting. +receive.keepAlive:: + After receiving the pack from the client, `receive-pack` may + produce no output (if `--quiet` was specified) while processing + the pack, causing some networks to drop the TCP connection. + With this option set, if `receive-pack` does not transmit + any data in this phase for `receive.keepAlive` seconds, it will + send a short keepalive packet. The default is 5 seconds; set + to 0 to disable keepalives entirely. + receive.unpackLimit:: If the number of objects received in a push is below this limit then the objects will be unpacked into loose object @@ -2587,7 +2686,7 @@ sendemail.identity:: A configuration identity. When given, causes values in the 'sendemail.' subsection to take precedence over values in the 'sendemail' section. The default identity is - the value of 'sendemail.identity'. + the value of `sendemail.identity`. sendemail.smtpEncryption:: See linkgit:git-send-email[1] for description. Note that this @@ -2604,7 +2703,7 @@ sendemail..*:: Identity-specific versions of the 'sendemail.*' parameters found below, taking precedence over those when the this identity is selected, through command-line or - 'sendemail.identity'. + `sendemail.identity`. sendemail.aliasesFile:: sendemail.aliasFileType:: @@ -2634,7 +2733,7 @@ sendemail.xmailer:: See linkgit:git-send-email[1] for description. sendemail.signedoffcc (deprecated):: - Deprecated alias for 'sendemail.signedoffbycc'. + Deprecated alias for `sendemail.signedoffbycc`. showbranch.default:: The default set of branches for linkgit:git-show-branch[1]. @@ -2748,6 +2847,17 @@ submodule..ignore:: "--ignore-submodules" option. The 'git submodule' commands are not affected by this setting. +submodule.fetchJobs:: + Specifies how many submodules are fetched/cloned at the same time. + A positive integer allows up to that number of submodules fetched + in parallel. A value of 0 will give some reasonable default. + If unset, it defaults to 1. + +tag.forceSignAnnotated:: + A boolean to specify whether annotated tags created should be GPG signed. + If `--annotate` is specified on the command line, it takes + precedence over this option. + tag.sort:: This variable controls the sort ordering of tags when displayed by linkgit:git-tag[1]. Without the "--sort=" option provided, the @@ -2829,6 +2939,21 @@ uploadpack.keepAlive:: `uploadpack.keepAlive` seconds. Setting this option to 0 disables keepalive packets entirely. The default is 5 seconds. +uploadpack.packObjectsHook:: + If this option is set, when `upload-pack` would run + `git pack-objects` to create a packfile for a client, it will + run this shell command instead. The `pack-objects` command and + arguments it _would_ have run (including the `git pack-objects` + at the beginning) are appended to the shell command. The stdin + and stdout of the hook are treated as if `pack-objects` itself + was run. I.e., `upload-pack` will feed input intended for + `pack-objects` to the hook, and expects a completed packfile on + stdout. ++ +Note that this configuration variable is ignored if it is seen in the +repository-level config (this is a safety measure against fetching from +untrusted repositories). + url..insteadOf:: Any URL that starts with this value will be rewritten to start, instead, with . In cases where some site serves a @@ -2855,17 +2980,17 @@ url..pushInsteadOf:: user.email:: Your email address to be recorded in any newly created commits. - Can be overridden by the 'GIT_AUTHOR_EMAIL', 'GIT_COMMITTER_EMAIL', and - 'EMAIL' environment variables. See linkgit:git-commit-tree[1]. + Can be overridden by the `GIT_AUTHOR_EMAIL`, `GIT_COMMITTER_EMAIL`, and + `EMAIL` environment variables. See linkgit:git-commit-tree[1]. user.name:: Your full name to be recorded in any newly created commits. - Can be overridden by the 'GIT_AUTHOR_NAME' and 'GIT_COMMITTER_NAME' + Can be overridden by the `GIT_AUTHOR_NAME` and `GIT_COMMITTER_NAME` environment variables. See linkgit:git-commit-tree[1]. user.useConfigOnly:: - Instruct Git to avoid trying to guess defaults for 'user.email' - and 'user.name', and instead retrieve the values only from the + Instruct Git to avoid trying to guess defaults for `user.email` + and `user.name`, and instead retrieve the values only from the configuration. For example, if you have multiple email addresses and would like to use a different one for each repository, then with this configuration option set to `true` in the global config diff --git a/Documentation/date-formats.txt b/Documentation/date-formats.txt index ccd1fc8122..35e8da2010 100644 --- a/Documentation/date-formats.txt +++ b/Documentation/date-formats.txt @@ -1,7 +1,7 @@ DATE FORMATS ------------ -The GIT_AUTHOR_DATE, GIT_COMMITTER_DATE environment variables +The `GIT_AUTHOR_DATE`, `GIT_COMMITTER_DATE` environment variables ifdef::git-commit[] and the `--date` option endif::git-commit[] diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt index 6eaa45271c..d5a5b17d50 100644 --- a/Documentation/diff-config.txt +++ b/Documentation/diff-config.txt @@ -75,7 +75,7 @@ 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. @@ -105,12 +105,16 @@ diff.orderFile:: diff.renameLimit:: The number of files to consider when performing the copy/rename - detection; equivalent to the 'git diff' option '-l'. + detection; equivalent to the 'git diff' option `-l`. diff.renames:: - Tells Git to detect renames. If set to any boolean value, it - will enable basic rename detection. If set to "copies" or - "copy", it will detect copies, as well. + Whether and how Git detects renames. If set to "false", + rename detection is disabled. If set to "true", basic rename + detection is enabled. If set to "copies" or "copy", Git will + detect copies, as well. Defaults to true. Note that this + affects only 'git diff' Porcelain like linkgit:git-diff[1] and + linkgit:git-log[1], and not lower level commands such as + linkgit:git-diff-files[1]. diff.suppressBlankEmpty:: A boolean to inhibit the standard behavior of printing a space @@ -166,6 +170,11 @@ diff.tool:: include::mergetools-diff.txt[] +diff.compactionHeuristic:: + Set this option to `true` to enable an experimental heuristic that + shifts the hunk boundary in an attempt to make the resulting + patch easier to read. + diff.algorithm:: Choose a diff algorithm. The variants are as follows: + diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt index 85b08909ce..cf5262622f 100644 --- a/Documentation/diff-format.txt +++ b/Documentation/diff-format.txt @@ -46,11 +46,11 @@ That is, from the left to the right: . sha1 for "dst"; 0\{40\} if creation, unmerged or "look at work tree". . a space. . status, followed by optional "score" number. -. a tab or a NUL when '-z' option is used. +. a tab or a NUL when `-z` option is used. . path for "src" -. a tab or a NUL when '-z' option is used; only exists for C or R. +. a tab or a NUL when `-z` option is used; only exists for C or R. . path for "dst"; only exists for C or R. -. an LF or a NUL when '-z' option is used, to terminate the record. +. an LF or a NUL when `-z` option is used, to terminate the record. Possible status letters are: @@ -86,7 +86,7 @@ diff format for merges ---------------------- "git-diff-tree", "git-diff-files" and "git-diff --raw" -can take '-c' or '--cc' option +can take `-c` or `--cc` option to generate diff output also for merge commits. The output differs from the format described above in the following way: diff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt index bcf54da82a..d2a7ff56e8 100644 --- a/Documentation/diff-generate-patch.txt +++ b/Documentation/diff-generate-patch.txt @@ -2,11 +2,11 @@ Generating patches with -p -------------------------- When "git-diff-index", "git-diff-tree", or "git-diff-files" are run -with a '-p' option, "git diff" without the '--raw' option, or +with a `-p` option, "git diff" without the `--raw` option, or "git log" with the "-p" option, they do not produce the output described above; instead they produce a patch file. You can customize the creation of such patches via the -GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables. +`GIT_EXTERNAL_DIFF` and the `GIT_DIFF_OPTS` environment variables. What the -p option produces is slightly different from the traditional diff format: @@ -114,11 +114,11 @@ index fabadb8,cc95eb0..4866510 ------------ 1. It is preceded with a "git diff" header, that looks like - this (when '-c' option is used): + this (when `-c` option is used): diff --combined file + -or like this (when '--cc' option is used): +or like this (when `--cc` option is used): diff --cc file diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 3cb301556e..705a873942 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -63,6 +63,13 @@ ifndef::git-format-patch[] Synonym for `-p --raw`. endif::git-format-patch[] +--compaction-heuristic:: +--no-compaction-heuristic:: + These are to help debugging and tuning an experimental + heuristic (which is off by default) that shifts the hunk + boundary in an attempt to make the resulting patch easier + to read. + --minimal:: Spend extra time to make sure the smallest possible diff is produced. @@ -412,6 +419,9 @@ ifndef::git-format-patch[] paths are selected if there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected. ++ +Also, these upper-case letters can be downcased to exclude. E.g. +`--diff-filter=ad` excludes added and deleted paths. -S:: Look for differences that change the number of occurrences of diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index 036edfb099..9eab1f5fa4 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -52,7 +52,7 @@ ifndef::git-pull[] -p:: --prune:: - After fetching, remove any remote-tracking references that no + Before fetching, remove any remote-tracking references that no longer exist on the remote. Tags are not subject to pruning if they are fetched only because of the default tag auto-following or due to a --tags option. However, if tags @@ -88,7 +88,7 @@ ifndef::git-pull[] to whatever else would otherwise be fetched. Using this option alone does not subject tags to pruning, even if --prune is used (though tags may be pruned anyway if they are also the - destination of an explicit refspec; see '--prune'). + destination of an explicit refspec; see `--prune`). --recurse-submodules[=yes|on-demand|no]:: This option controls if and under what conditions new commits of @@ -110,7 +110,7 @@ ifndef::git-pull[] --no-recurse-submodules:: Disable recursive fetching of submodules (this has the same effect as - using the '--recurse-submodules=no' option). + using the `--recurse-submodules=no` option). --submodule-prefix=:: Prepend to paths printed in informative messages @@ -137,7 +137,7 @@ endif::git-pull[] --upload-pack :: When given, and the repository to fetch from is handled - by 'git fetch-pack', '--exec=' is passed to + by 'git fetch-pack', `--exec=` is passed to the command to specify non-default path for the command run on the other end. diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 13cdd7f3b6..12879e4029 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -116,7 +116,8 @@ default. You can use `--no-utf8` to override this. By default the command will try to detect the patch format automatically. This option allows the user to bypass the automatic detection and specify the patch format that the patch(es) should be - interpreted as. Valid formats are mbox, stgit, stgit-series and hg. + interpreted as. Valid formats are mbox, mboxrd, + stgit, stgit-series and hg. -i:: --interactive:: @@ -198,12 +199,12 @@ When initially invoking `git am`, you give it the names of the mailboxes to process. Upon seeing the first patch that does not apply, it aborts in the middle. You can recover from this in one of two ways: -. skip the current patch by re-running the command with the '--skip' +. skip the current patch by re-running the command with the `--skip` option. . hand resolve the conflict in the working directory, and update the index file to bring it into a state that the patch should - have produced. Then run the command with the '--continue' option. + have produced. Then run the command with the `--continue` option. The command refuses to process new mailboxes until the current operation is finished, so if you decide to start over from scratch, diff --git a/Documentation/git-bisect-lk2009.txt b/Documentation/git-bisect-lk2009.txt index c06efbd42a..e015f5b3cc 100644 --- a/Documentation/git-bisect-lk2009.txt +++ b/Documentation/git-bisect-lk2009.txt @@ -366,7 +366,7 @@ skip" to do the same thing. (In fact the special exit code 125 makes Or if you want more control, you can inspect the current state using for example "git bisect visualize". It will launch gitk (or "git log" -if the DISPLAY environment variable is not set) to help you find a +if the `DISPLAY` environment variable is not set) to help you find a better bisection point. Either way, if you have a string of untestable commits, it might diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt index 7e79aaedeb..2bb9a577a2 100644 --- a/Documentation/git-bisect.txt +++ b/Documentation/git-bisect.txt @@ -205,7 +205,7 @@ $ git bisect visualize `view` may also be used as a synonym for `visualize`. -If the 'DISPLAY' environment variable is not set, 'git log' is used +If the `DISPLAY` environment variable is not set, 'git log' is used instead. You can also give command-line options such as `-p` and `--stat`. @@ -358,7 +358,7 @@ OPTIONS --no-checkout:: + Do not checkout the new working tree at each iteration of the bisection -process. Instead just update a special reference named 'BISECT_HEAD' to make +process. Instead just update a special reference named `BISECT_HEAD` to make it point to the commit that should be tested. + This option may be useful when the test you would perform in each step diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 4a7037f1c8..1fe73448f3 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -39,10 +39,10 @@ named commit). With `--merged`, only branches merged into the named commit (i.e. the branches whose tip commits are reachable from the named commit) will be listed. With `--no-merged` only branches not merged into the named commit will be listed. If the argument is missing it -defaults to 'HEAD' (i.e. the tip of the current branch). +defaults to `HEAD` (i.e. the tip of the current branch). The command's second form creates a new branch head named -which points to the current 'HEAD', or if given. +which points to the current `HEAD`, or if given. Note that this will create the new branch, but it will not switch the working tree to it; use "git checkout " to switch to the @@ -172,7 +172,7 @@ This option is only applicable in non-verbose mode. + This behavior is the default when the start point is a remote-tracking branch. Set the branch.autoSetupMerge configuration variable to `false` if you -want `git checkout` and `git branch` to always behave as if '--no-track' +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. diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt index eb3d6945a9..18d03d8e8b 100644 --- a/Documentation/git-cat-file.txt +++ b/Documentation/git-cat-file.txt @@ -15,8 +15,8 @@ SYNOPSIS DESCRIPTION ----------- In its first form, the command provides the content or the type of an object in -the repository. The type is required unless '-t' or '-p' is used to find the -object type, or '-s' is used to find the object size, or '--textconv' is used +the repository. The type is required unless `-t` or `-p` is used to find the +object type, or `-s` is used to find the object size, or `--textconv` is used (which implies type "blob"). In the second form, a list of objects (separated by linefeeds) is provided on @@ -144,13 +144,13 @@ respectively print: OUTPUT ------ -If '-t' is specified, one of the . +If `-t` is specified, one of the . -If '-s' is specified, the size of the in bytes. +If `-s` is specified, the size of the in bytes. -If '-e' is specified, no output. +If `-e` is specified, no output. -If '-p' is specified, the contents of are pretty-printed. +If `-p` is specified, the contents of are pretty-printed. If is specified, the raw (though uncompressed) contents of the will be returned. diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt index 91a3622ee4..8611a99120 100644 --- a/Documentation/git-check-ref-format.txt +++ b/Documentation/git-check-ref-format.txt @@ -118,8 +118,8 @@ $ git check-ref-format --branch @{-1} * Determine the reference name to use for a new branch: + ------------ -$ ref=$(git check-ref-format --normalize "refs/heads/$newbranch") || -die "we do not like '$newbranch' as a branch name." +$ ref=$(git check-ref-format --normalize "refs/heads/$newbranch")|| +{ echo "we do not like '$newbranch' as a branch name." >&2 ; exit 1 ; } ------------ GIT diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 5e5273e073..8e2c0662dd 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -157,7 +157,7 @@ of it"). When creating a new branch, set up "upstream" configuration. See "--track" in linkgit:git-branch[1] for details. + -If no '-b' option is given, the name of the new branch will be +If no `-b` option is given, the name of the new branch will be derived from the remote-tracking branch, by looking at the local part of the refspec configured for the corresponding remote, and then stripping the initial part up to the "*". @@ -165,7 +165,7 @@ This would tell us to use "hack" as the local branch when branching off of "origin/hack" (or "remotes/origin/hack", or even "refs/remotes/origin/hack"). If the given name has no slash, or the above guessing results in an empty name, the guessing is aborted. You can -explicitly give a name with '-b' in such a case. +explicitly give a name with `-b` in such a case. --no-track:: Do not set up "upstream" configuration, even if the @@ -419,6 +419,18 @@ $ git reflog -2 HEAD # or $ git log -g -2 HEAD ------------ +ARGUMENT DISAMBIGUATION +----------------------- + +When there is only one argument given and it is not `--` (e.g. "git +checkout abc"), and when the argument is both a valid `` +(e.g. a branch "abc" exists) and a valid `` (e.g. a file +or a directory whose name is "abc" exists), Git would usually ask +you to disambiguate. Because checking out a branch is so common an +operation, however, "git checkout abc" takes "abc" as a `` +in such a situation. Use `git checkout -- ` if you want +to checkout these paths out of the index. + EXAMPLES -------- diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt index 6154e57238..d35d771fc8 100644 --- a/Documentation/git-cherry-pick.txt +++ b/Documentation/git-cherry-pick.txt @@ -47,7 +47,7 @@ OPTIONS For a more complete list of ways to spell commits, see linkgit:gitrevisions[7]. Sets of commits can be passed but no traversal is done by - default, as if the '--no-walk' option was specified, see + default, as if the `--no-walk` option was specified, see linkgit:git-rev-list[1]. Note that specifying a range will feed all ... arguments to a single revision walk (see a later example that uses 'maint master..next'). @@ -128,7 +128,7 @@ effect to your index in a row. --allow-empty-message:: By default, cherry-picking a commit with an empty message will fail. - This option overrides that behaviour, allowing commits with empty + This option overrides that behavior, allowing commits with empty messages to be cherry picked. --keep-redundant-commits:: diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt index 51a7e26a8e..03056dad0d 100644 --- a/Documentation/git-clean.txt +++ b/Documentation/git-clean.txt @@ -16,7 +16,7 @@ DESCRIPTION Cleans the working tree by recursively removing files that are not under version control, starting from the current directory. -Normally, only files unknown to Git are removed, but if the '-x' +Normally, only files unknown to Git are removed, but if the `-x` option is specified, ignored files are also removed. This can, for example, be useful to remove all build products. diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index b7c467a001..ec41d3d698 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -14,8 +14,8 @@ SYNOPSIS [-o ] [-b ] [-u ] [--reference ] [--dissociate] [--separate-git-dir ] [--depth ] [--[no-]single-branch] - [--recursive | --recurse-submodules] [--] - [] + [--recursive | --recurse-submodules] [--[no-]shallow-submodules] + [--jobs ] [--] [] DESCRIPTION ----------- @@ -191,7 +191,8 @@ objects from the source repository into a pack in the cloned repository. Create a 'shallow' clone with a history truncated to the specified number of commits. Implies `--single-branch` unless `--no-single-branch` is given to fetch the histories near the - tips of all branches. + tips of all branches. If you want to clone submodules shallowly, + also pass `--shallow-submodules`. --[no-]single-branch:: Clone only the history leading to the tip of a single branch, @@ -212,6 +213,9 @@ objects from the source repository into a pack in the cloned repository. repository does not have a worktree/checkout (i.e. if any of `--no-checkout`/`-n`, `--bare`, or `--mirror` is given) +--[no-]shallow-submodules:: + All submodules which are cloned will be shallow with a depth of 1. + --separate-git-dir=:: Instead of placing the cloned repository where it is supposed to be, place the cloned repository at the specified directory, @@ -219,6 +223,10 @@ objects from the source repository into a pack in the cloned repository. The result is Git repository can be separated from working tree. +-j :: +--jobs :: + The number of submodules fetched at the same time. + Defaults to the `submodule.fetchJobs` option. :: The (possibly remote) repository to clone from. See the diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt index 48c33d7ed7..002dae625e 100644 --- a/Documentation/git-commit-tree.txt +++ b/Documentation/git-commit-tree.txt @@ -44,7 +44,7 @@ OPTIONS An existing tree object -p :: - Each '-p' indicates the id of a parent commit object. + Each `-p` indicates the id of a parent commit object. -m :: A paragraph in the commit log message. This can be given more than @@ -61,8 +61,8 @@ OPTIONS stuck to the option without a space. --no-gpg-sign:: - Countermand `commit.gpgSign` configuration variable that is - set to force each and every commit to be signed. + Do not GPG-sign commit, to countermand a `--gpg-sign` option + given earlier on the command line. Commit Information diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 9ec6b3cc17..b0a294d3b5 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -75,7 +75,7 @@ OPTIONS -c :: --reedit-message=:: - Like '-C', but with '-c' the editor is invoked, so that + Like '-C', but with `-c` the editor is invoked, so that the user can further edit the commit message. --fixup=:: @@ -201,7 +201,7 @@ default:: Otherwise `whitespace`. -- + -The default can be changed by the 'commit.cleanup' configuration +The default can be changed by the `commit.cleanup` configuration variable (see linkgit:git-config[1]). -e:: @@ -260,7 +260,7 @@ FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].) staged for other paths. This is the default mode of operation of 'git commit' if any paths are given on the command line, in which case this option can be omitted. - If this option is specified together with '--amend', then + If this option is specified together with `--amend`, then no paths need to be specified, which can be used to amend the last commit without committing changes that have already been staged. @@ -290,7 +290,8 @@ configuration variable documented in linkgit:git-config[1]. what changes the commit has. Note that this diff output doesn't have its lines prefixed with '#'. This diff will not be a part - of the commit message. + of the commit message. See the `commit.verbose` configuration + variable in linkgit:git-config[1]. + If specified twice, show in addition the unified diff between what would be committed and the worktree files, i.e. the unstaged @@ -449,8 +450,8 @@ include::i18n.txt[] ENVIRONMENT AND CONFIGURATION VARIABLES --------------------------------------- The editor used to edit the commit log message will be chosen from the -GIT_EDITOR environment variable, the core.editor configuration variable, the -VISUAL environment variable, or the EDITOR environment variable (in that +`GIT_EDITOR` environment variable, the core.editor configuration variable, the +`VISUAL` environment variable, or the `EDITOR` environment variable (in that order). See linkgit:git-var[1] for details. HOOKS diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index 6843114fc0..83f86b9231 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@ -31,29 +31,29 @@ You can query/set/replace/unset options with this command. The name is actually the section and the key separated by a dot, and the value will be escaped. -Multiple lines can be added to an option by using the '--add' option. +Multiple lines can be added to an option by using the `--add` option. If you want to update or unset an option which can occur on multiple lines, a POSIX regexp `value_regex` needs to be given. Only the existing values that match the regexp are updated or unset. If you want to handle the lines that do *not* match the regex, just prepend a single exclamation mark in front (see also <>). -The type specifier can be either '--int' or '--bool', to make +The type specifier can be either `--int` or `--bool`, to make 'git config' ensure that the variable(s) are of the given type and convert the value to the canonical form (simple decimal number for int, -a "true" or "false" string for bool), or '--path', which does some -path expansion (see '--path' below). If no type specifier is passed, no +a "true" or "false" string for bool), or `--path`, which does some +path expansion (see `--path` below). If no type specifier is passed, no checks or transformations are performed on the value. When reading, the values are read from the system, global and repository local configuration files by default, and options -'--system', '--global', '--local' and '--file ' can be +`--system`, `--global`, `--local` and `--file ` can be used to tell the command to read from only that location (see <>). When writing, the new value is written to the repository local -configuration file by default, and options '--system', '--global', -'--file ' can be used to tell the command to write to -that location (you can say '--local' but that is the default). +configuration file by default, and options `--system`, `--global`, +`--file ` can be used to tell the command to write to +that location (you can say `--local` but that is the default). This command will fail with non-zero status upon error. Some exit codes are: @@ -138,7 +138,7 @@ See also <>. Use the given config file instead of the one specified by GIT_CONFIG. --blob blob:: - Similar to '--file' but use the given blob instead of a file. E.g. + Similar to `--file` but use the given blob instead of a file. E.g. you can use 'master:.gitmodules' to read values from the file '.gitmodules' in the master branch. See "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7] for a more complete list of @@ -220,7 +220,7 @@ See also <>. -e:: --edit:: Opens an editor to modify the specified config file; either - '--system', '--global', or repository (default). + `--system`, `--global`, or repository (default). --[no-]includes:: Respect `include.*` directives in config files when looking up @@ -232,7 +232,7 @@ See also <>. FILES ----- -If not set explicitly with '--file', there are four files where +If not set explicitly with `--file`, there are four files where 'git config' will search for configuration options: $(prefix)/etc/gitconfig:: @@ -263,13 +263,16 @@ The files are read in the order given above, with last value found taking precedence over values read earlier. When multiple values are taken then all values of a key from all files will be used. +You may override individual configuration parameters when running any git +command by using the `-c` option. See linkgit:git[1] for details. + All writing options will per default write to the repository specific -configuration file. Note that this also affects options like '--replace-all' -and '--unset'. *'git config' will only ever change one file at a time*. +configuration file. Note that this also affects options like `--replace-all` +and `--unset`. *'git config' will only ever change one file at a time*. You can override these rules either by command-line options or by environment -variables. The '--global' and the '--system' options will limit the file used -to the global or system-wide file respectively. The GIT_CONFIG environment +variables. The `--global` and the `--system` options will limit the file used +to the global or system-wide file respectively. The `GIT_CONFIG` environment variable has a similar effect, but you can specify any filename you want. diff --git a/Documentation/git-credential-store.txt b/Documentation/git-credential-store.txt index e3c8f276b1..25fb963f4b 100644 --- a/Documentation/git-credential-store.txt +++ b/Documentation/git-credential-store.txt @@ -44,7 +44,7 @@ OPTIONS FILES ----- -If not set explicitly with '--file', there are two files where +If not set explicitly with `--file`, there are two files where git-credential-store will search for credentials in order of precedence: ~/.git-credentials:: diff --git a/Documentation/git-cvsimport.txt b/Documentation/git-cvsimport.txt index 00a0679a28..41207a24b0 100644 --- a/Documentation/git-cvsimport.txt +++ b/Documentation/git-cvsimport.txt @@ -74,10 +74,10 @@ OPTIONS akin to the way 'git clone' uses 'origin' by default. -o :: - When no remote is specified (via -r) the 'HEAD' branch + When no remote is specified (via -r) the `HEAD` branch from CVS is imported to the 'origin' branch within the Git - repository, as 'HEAD' already has a special meaning for Git. - When a remote is specified the 'HEAD' branch is named + repository, as `HEAD` already has a special meaning for Git. + When a remote is specified the `HEAD` branch is named remotes//master mirroring 'git clone' behaviour. Use this option if you want to import into a different branch. @@ -103,7 +103,7 @@ the old cvs2git tool. -p :: Additional options for cvsps. - The options '-u' and '-A' are implicit and should not be used here. + The options `-u` and '-A' are implicit and should not be used here. + If you need to pass multiple options, separate them with a comma. @@ -122,7 +122,7 @@ If you need to pass multiple options, separate them with a comma. -M :: Attempt to detect merges based on the commit message with a custom - regex. It can be used with '-m' to enable the default regexes + regex. It can be used with `-m` to enable the default regexes as well. You must escape forward slashes. + The regex must capture the source branch name in $1. @@ -186,7 +186,7 @@ messages, bug-tracking systems, email archives, and the like. OUTPUT ------ -If '-v' is specified, the script reports what it is doing. +If `-v` is specified, the script reports what it is doing. Otherwise, success is indicated the Unix way, i.e. by simply exiting with a zero exit status. diff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt index db4d7a917c..a336ae5f6f 100644 --- a/Documentation/git-cvsserver.txt +++ b/Documentation/git-cvsserver.txt @@ -54,7 +54,7 @@ Print usage information and exit You can specify a list of allowed directories. If no directories are given, all are allowed. This is an additional restriction, gitcvs access still needs to be enabled by the `gitcvs.enabled` config option -unless '--export-all' was given, too. +unless `--export-all` was given, too. DESCRIPTION @@ -332,7 +332,7 @@ To get a checkout with the Eclipse CVS client: 3. Browse the 'modules' available. It will give you a list of the heads in the repository. You will not be able to browse the tree from there. Only the heads. -4. Pick 'HEAD' when it asks what branch/tag to check out. Untick the +4. Pick `HEAD` when it asks what branch/tag to check out. Untick the "launch commit wizard" to avoid committing the .project file. Protocol notes: If you are using anonymous access via pserver, just select that. @@ -402,12 +402,12 @@ Exports and tagging (tags and branches) are not supported at this stage. CRLF Line Ending Conversions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -By default the server leaves the '-k' mode blank for all files, +By default the server leaves the `-k` mode blank for all files, which causes the CVS client to treat them as a text files, subject to end-of-line conversion on some platforms. You can make the server use the end-of-line conversion attributes to -set the '-k' modes for files by setting the `gitcvs.usecrlfattr` +set the `-k` modes for files by setting the `gitcvs.usecrlfattr` config variable. See linkgit:gitattributes[5] for more information about end-of-line conversion. @@ -415,9 +415,9 @@ 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 -specified will default to '-kb' mode. Otherwise the '-k' mode +specified will default to '-kb' mode. Otherwise the `-k` mode 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 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 diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index a69b3616ec..3c91db7bed 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -30,7 +30,7 @@ that service if it is enabled. It verifies that the directory has the magic file "git-daemon-export-ok", and it will refuse to export any Git directory that hasn't explicitly been marked -for export this way (unless the '--export-all' parameter is specified). If you +for export this way (unless the `--export-all` parameter is specified). If you pass some directory paths as 'git daemon' arguments, you can further restrict the offers to a whitelist comprising of those. @@ -90,10 +90,10 @@ OPTIONS is not supported, then --listen=hostname is also not supported and --listen must be given an IPv4 address. Can be given more than once. - Incompatible with '--inetd' option. + Incompatible with `--inetd` option. --port=:: - Listen on an alternative port. Incompatible with '--inetd' option. + Listen on an alternative port. Incompatible with `--inetd` option. --init-timeout=:: Timeout (in seconds) between the moment the connection is established @@ -188,7 +188,7 @@ Git configuration files in that directory are readable by ``. arguments. The external command can decide to decline the service by exiting with a non-zero status (or to allow it by exiting with a zero status). It can also look at the $REMOTE_ADDR - and $REMOTE_PORT environment variables to learn about the + and `$REMOTE_PORT` environment variables to learn about the requestor when making this decision. + The external command can optionally write a single line to its @@ -296,7 +296,7 @@ they correspond to these IP addresses. selectively enable/disable services per repository:: To enable 'git archive --remote' and disable 'git fetch' against a repository, have the following in the configuration file in the - repository (that is the file 'config' next to 'HEAD', 'refs' and + repository (that is the file 'config' next to `HEAD`, 'refs' and 'objects'). + ---------------------------------------------------------------- diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt index c8f28c8c86..e4ac448ff5 100644 --- a/Documentation/git-describe.txt +++ b/Documentation/git-describe.txt @@ -154,7 +154,7 @@ is found, its name will be output and searching will stop. If an exact match was not found, 'git describe' will walk back through the commit history to locate an ancestor commit which has been tagged. The ancestor's tag will be output along with an -abbreviation of the input commit-ish's SHA-1. If '--first-parent' was +abbreviation of the input commit-ish's SHA-1. If `--first-parent` was specified then the walk will only consider the first parent of each commit. diff --git a/Documentation/git-diff-index.txt b/Documentation/git-diff-index.txt index a86cf62e68..a171506952 100644 --- a/Documentation/git-diff-index.txt +++ b/Documentation/git-diff-index.txt @@ -40,13 +40,13 @@ include::diff-format.txt[] Operating Modes --------------- You can choose whether you want to trust the index file entirely -(using the '--cached' flag) or ask the diff logic to show any files +(using the `--cached` flag) or ask the diff logic to show any files that don't match the stat state as being "tentatively changed". Both of these operations are very useful indeed. Cached Mode ----------- -If '--cached' is specified, it allows you to ask: +If `--cached` is specified, it allows you to ask: show me the differences between HEAD and the current index contents (the ones I'd write using 'git write-tree') diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt index 1439486e40..7870e175b7 100644 --- a/Documentation/git-diff-tree.txt +++ b/Documentation/git-diff-tree.txt @@ -43,11 +43,11 @@ include::diff-options.txt[] show tree entry itself as well as subtrees. Implies -r. --root:: - When '--root' is specified the initial commit will be shown as a big + When `--root` is specified the initial commit will be shown as a big creation event. This is equivalent to a diff against the NULL tree. --stdin:: - When '--stdin' is specified, the command does not take + When `--stdin` is specified, the command does not take arguments from the command line. Instead, it reads lines containing either two , one , or a list of from its standard input. (Use a single space @@ -70,13 +70,13 @@ commits (but not trees). By default, 'git diff-tree --stdin' does not show differences for merge commits. With this flag, it shows differences to that commit from all of its parents. See - also '-c'. + also `-c`. -s:: By default, 'git diff-tree --stdin' shows differences, - either in machine-readable form (without '-p') or in patch - form (with '-p'). This output can be suppressed. It is - only useful with '-v' flag. + either in machine-readable form (without `-p`) or in patch + form (with `-p`). This output can be suppressed. It is + only useful with `-v` flag. -v:: This flag causes 'git diff-tree --stdin' to also show @@ -91,17 +91,17 @@ include::pretty-options.txt[] -c:: This flag changes the way a merge commit is displayed (which means it is useful only when the command is given - one , or '--stdin'). It shows the differences + one , or `--stdin`). It shows the differences from each of the parents to the merge result simultaneously instead of showing pairwise diff between a parent and the - result one at a time (which is what the '-m' option does). + result one at a time (which is what the `-m` option does). Furthermore, it lists only files which were modified from all parents. --cc:: This flag changes the way a merge commit patch is displayed, - in a similar way to the '-c' option. It implies the '-c' - and '-p' options and further compresses the patch output + in a similar way to the `-c` option. It implies the `-c` + and `-p` options and further compresses the patch output by omitting uninteresting hunks whose the contents in the parents have only two variants and the merge result picks one of them without modification. When all hunks are uninteresting, the commit diff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt index 333cf6ff91..224fb3090b 100644 --- a/Documentation/git-difftool.txt +++ b/Documentation/git-difftool.txt @@ -98,7 +98,7 @@ instead. `--no-symlinks` is the default on Windows. invoked diff tool returns a non-zero exit code. + 'git-difftool' will forward the exit code of the invoked tool when -'--trust-exit-code' is used. +`--trust-exit-code` is used. See linkgit:git-diff[1] for the full list of supported options. diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt index 66910aa2fa..2b762654bf 100644 --- a/Documentation/git-fast-import.txt +++ b/Documentation/git-fast-import.txt @@ -136,6 +136,8 @@ Performance and Compression Tuning Maximum size of each output packfile. The default is unlimited. +fastimport.unpackLimit:: + See linkgit:git-config[1] Performance ----------- @@ -1054,7 +1056,7 @@ relative-marks:: no-relative-marks:: force:: Act as though the corresponding command-line option with - a leading '--' was passed on the command line + a leading `--` was passed on the command line (see OPTIONS, above). import-marks:: @@ -1105,7 +1107,7 @@ options the user may specify to git fast-import itself. The `