From: Junio C Hamano Date: Fri, 6 Jun 2014 18:36:06 +0000 (-0700) Subject: Merge branch 'mt/rebase-i-keep-empty-test' X-Git-Tag: v2.1.0-rc0~153 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/075652953772dbabd01d471a4c73200b0ab5d8a6?hp=bd46cfae8224ec2240e58302e8ddd16b701cbe6a Merge branch 'mt/rebase-i-keep-empty-test' * mt/rebase-i-keep-empty-test: rebase --keep-empty -i: add test --- diff --git a/.gitignore b/.gitignore index 66199edd4a..42294e59a1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /GIT-CFLAGS /GIT-LDFLAGS /GIT-PREFIX +/GIT-PERL-DEFINES /GIT-PYTHON-VARS /GIT-SCRIPT-DEFINES /GIT-USER-AGENT @@ -75,7 +76,6 @@ /git-init-db /git-instaweb /git-log -/git-lost-found /git-ls-files /git-ls-remote /git-ls-tree @@ -105,7 +105,6 @@ /git-pack-refs /git-parse-remote /git-patch-id -/git-peek-remote /git-prune /git-prune-packed /git-pull @@ -131,7 +130,6 @@ /git-remote-testsvn /git-repack /git-replace -/git-repo-config /git-request-pull /git-rerere /git-reset @@ -159,7 +157,6 @@ /git-svn /git-symbolic-ref /git-tag -/git-tar-tree /git-unpack-file /git-unpack-objects /git-update-index @@ -185,6 +182,7 @@ /test-dump-cache-tree /test-scrap-cache-tree /test-genrandom +/test-hashmap /test-index-version /test-line-buffer /test-match-trees @@ -228,6 +226,7 @@ /config.mak.autogen /config.mak.append /configure +/unicode /tags /TAGS /cscope* diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index ef67b53f72..f424dbd75c 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -91,13 +91,13 @@ For shell scripts specifically (not exhaustive): E.g.: my_function () { - As to use of grep, stick to a subset of BRE (namely, no \{m,n\}, - [::], [==], nor [..]) for portability. + [::], [==], or [..]) for portability. - We do not use \{m,n\}; - We do not use -E; - - We do not use ? nor + (which are \{0,1\} and \{1,\} + - We do not use ? or + (which are \{0,1\} and \{1,\} respectively in BRE) but that goes without saying as these are ERE elements not BRE (note that \? and \+ are not even part of BRE -- making them accessible from BRE is a GNU extension). @@ -126,6 +126,17 @@ For C programs: "char * string". This makes it easier to understand code like "char *string, c;". + - Use whitespace around operators and keywords, but not inside + parentheses and not around functions. So: + + while (condition) + func(bar + 1); + + and not: + + while( condition ) + func (bar+1); + - We avoid using braces unnecessarily. I.e. if (bla) { @@ -153,6 +164,16 @@ For C programs: * multi-line comment. */ + Note however that a comment that explains a translatable string to + translators uses a convention of starting with a magic token + "TRANSLATORS: " immediately after the opening delimiter, even when + it spans multiple lines. We do not add an asterisk at the beginning + of each line, either. E.g. + + /* TRANSLATORS: here is a comment that explains the string + to be translated, that follows immediately after it */ + _("Here is a translatable string explained by the above."); + - Double negation is often harder to understand than no negation at all. diff --git a/Documentation/Makefile b/Documentation/Makefile index 91a12c7e51..fc6b2cf9ec 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -2,6 +2,9 @@ MAN1_TXT = MAN5_TXT = MAN7_TXT = +TECH_DOCS = +ARTICLES = +SP_ARTICLES = MAN1_TXT += $(filter-out \ $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \ @@ -37,12 +40,12 @@ MAN_HTML = $(patsubst %.txt,%.html,$(MAN_TXT)) OBSOLETE_HTML = git-remote-helpers.html DOC_HTML = $(MAN_HTML) $(OBSOLETE_HTML) -ARTICLES = howto-index +ARTICLES += howto-index ARTICLES += everyday ARTICLES += git-tools ARTICLES += git-bisect-lk2009 # with their own formatting rules. -SP_ARTICLES = user-manual +SP_ARTICLES += user-manual SP_ARTICLES += howto/new-command SP_ARTICLES += howto/revert-branch-rebase SP_ARTICLES += howto/using-merge-subtree @@ -60,7 +63,8 @@ SP_ARTICLES += howto/maintain-git API_DOCS = $(patsubst %.txt,%,$(filter-out technical/api-index-skel.txt technical/api-index.txt, $(wildcard technical/api-*.txt))) SP_ARTICLES += $(API_DOCS) -TECH_DOCS = technical/index-format +TECH_DOCS += technical/http-protocol +TECH_DOCS += technical/index-format TECH_DOCS += technical/pack-format TECH_DOCS += technical/pack-heuristics TECH_DOCS += technical/pack-protocol @@ -324,7 +328,7 @@ manpage-base-url.xsl: manpage-base-url.xsl.in user-manual.xml: user-manual.txt user-manual.conf $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ - $(ASCIIDOC) $(ASCIIDOC_EXTRA) -b docbook -d book -o $@+ $< && \ + $(ASCIIDOC) $(ASCIIDOC_EXTRA) -b docbook -d article -o $@+ $< && \ mv $@+ $@ technical/api-index.txt: technical/api-index-skel.txt \ diff --git a/Documentation/RelNotes/1.9.0.txt b/Documentation/RelNotes/1.9.0.txt new file mode 100644 index 0000000000..752d79127a --- /dev/null +++ b/Documentation/RelNotes/1.9.0.txt @@ -0,0 +1,345 @@ +Git v1.9.0 Release Notes +======================== + +Backward compatibility notes +---------------------------- + +"git submodule foreach $cmd $args" used to treat "$cmd $args" the same +way "ssh" did, concatenating them into a single string and letting the +shell unquote. Careless users who forget to sufficiently quote $args +get their argument split at $IFS whitespaces by the shell, and got +unexpected results due to this. Starting from this release, the +command line is passed directly to the shell, if it has an argument. + +Read-only support for experimental loose-object format, in which users +could optionally choose to write their loose objects for a short +while between v1.4.3 and v1.5.3 era, has been dropped. + +The meanings of the "--tags" option to "git fetch" has changed; the +command fetches tags _in addition to_ what is fetched by the same +command line without the option. + +The way "git push $there $what" interprets the $what part given on the +command line, when it does not have a colon that explicitly tells us +what ref at the $there repository is to be updated, has been enhanced. + +A handful of ancient commands that have long been deprecated are +finally gone (repo-config, tar-tree, lost-found, and peek-remote). + + +Backward compatibility notes (for Git 2.0.0) +-------------------------------------------- + +When "git push [$there]" does not say what to push, we have used the +traditional "matching" semantics so far (all your branches were sent +to the remote as long as there already are branches of the same name +over there). In Git 2.0, the default will change to the "simple" +semantics, which pushes: + + - only the current branch to the branch with the same name, and only + when the current branch is set to integrate with that remote + branch, if you are pushing to the same remote as you fetch from; or + + - only the current branch to the branch with the same name, if you + are pushing to a remote that is not where you usually fetch from. + +Use the user preference configuration variable "push.default" to +change this. If you are an old-timer who is used to the "matching" +semantics, you can set the variable to "matching" to keep the +traditional behaviour. If you want to live in the future early, you +can set it to "simple" today without waiting for Git 2.0. + +When "git add -u" (and "git add -A") is run inside a subdirectory and +does not specify which paths to add on the command line, it +will operate on the entire tree in Git 2.0 for consistency +with "git commit -a" and other commands. There will be no +mechanism to make plain "git add -u" behave like "git add -u .". +Current users of "git add -u" (without a pathspec) should start +training their fingers to explicitly say "git add -u ." +before Git 2.0 comes. A warning is issued when these commands are +run without a pathspec and when you have local changes outside the +current directory, because the behaviour in Git 2.0 will be different +from today's version in such a situation. + +In Git 2.0, "git add " will behave as "git add -A ", so +that "git add dir/" will notice paths you removed from the directory +and record the removal. Versions before Git 2.0, including this +release, will keep ignoring removals, but the users who rely on this +behaviour are encouraged to start using "git add --ignore-removal " +now before 2.0 is released. + +The default prefix for "git svn" will change in Git 2.0. For a long +time, "git svn" created its remote-tracking branches directly under +refs/remotes, but it will place them under refs/remotes/origin/ unless +it is told otherwise with its --prefix option. + + +Updates since v1.8.5 +-------------------- + +Foreign interfaces, subsystems and ports. + + * The HTTP transport, when talking GSS-Negotiate, uses "100 + Continue" response to avoid having to rewind and resend a large + payload, which may not be always doable. + + * Various bugfixes to remote-bzr and remote-hg (in contrib/). + + * The build procedure is aware of MirBSD now. + + * Various "git p4", "git svn" and "gitk" updates. + + +UI, Workflows & Features + + * Fetching from a shallowly-cloned repository used to be forbidden, + primarily because the codepaths involved were not carefully vetted + and we did not bother supporting such usage. This release attempts + to allow object transfer out of a shallowly-cloned repository in a + more controlled way (i.e. the receiver becomes a shallow repository + with a truncated history). + + * Just like we give a reasonable default for "less" via the LESS + environment variable, we now specify a reasonable default for "lv" + via the "LV" environment variable when spawning the pager. + + * Two-level configuration variable names in "branch.*" and "remote.*" + hierarchies, whose variables are predominantly three-level, were + not completed by hitting a in bash and zsh completions. + + * Fetching a 'frotz' branch with "git fetch", while a 'frotz/nitfol' + remote-tracking branch from an earlier fetch was still there, would + error out, primarily because the command was not told that it is + allowed to lose any information on our side. "git fetch --prune" + now can be used to remove 'frotz/nitfol' to make room for fetching and + storing the 'frotz' remote-tracking branch. + + * "diff.orderfile=" configuration variable can be used to + pretend as if the "-O" option were given from the command + line of "git diff", etc. + + * The negative pathspec syntax allows "git log -- . ':!dir'" to tell + us "I am interested in everything but 'dir' directory". + + * "git difftool" shows how many different paths there are in total, + and how many of them have been shown so far, to indicate progress. + + * "git push origin master" used to push our 'master' branch to update + the 'master' branch at the 'origin' repository. This has been + enhanced to use the same ref mapping "git push origin" would use to + determine what ref at the 'origin' to be updated with our 'master'. + For example, with this configuration + + [remote "origin"] + push = refs/heads/*:refs/review/* + + that would cause "git push origin" to push out our local branches + to corresponding refs under refs/review/ hierarchy at 'origin', + "git push origin master" would update 'refs/review/master' over + there. Alternatively, if push.default is set to 'upstream' and our + 'master' is set to integrate with 'topic' from the 'origin' branch, + running "git push origin" while on our 'master' would update their + 'topic' branch, and running "git push origin master" while on any + of our branches does the same. + + * "gitweb" learned to treat ref hierarchies other than refs/heads as + if they are additional branch namespaces (e.g. refs/changes/ in + Gerrit). + + * "git for-each-ref --format=..." learned a few formatting directives; + e.g. "%(color:red)%(HEAD)%(color:reset) %(refname:short) %(subject)". + + * The command string given to "git submodule foreach" is passed + directly to the shell, without being eval'ed. This is a backward + incompatible change that may break existing users. + + * "git log" and friends learned the "--exclude=" option, to + allow people to say "list history of all branches except those that + match this pattern" with "git log --exclude='*/*' --branches". + + * "git rev-parse --parseopt" learned a new "--stuck-long" option to + help scripts parse options with an optional parameter. + + * The "--tags" option to "git fetch" no longer tells the command to + fetch _only_ the tags. It instead fetches tags _in addition to_ + what are fetched by the same command line without the option. + + +Performance, Internal Implementation, etc. + + * When parsing a 40-hex string into the object name, the string is + checked to see if it can be interpreted as a ref so that a warning + can be given for ambiguity. The code kicked in even when the + core.warnambiguousrefs is set to false to squelch this warning, in + which case the cycles spent to look at the ref namespace were an + expensive no-op, as the result was discarded without being used. + + * The naming convention of the packfiles has been updated; it used to + be based on the enumeration of names of the objects that are + contained in the pack, but now it also depends on how the packed + result is represented---packing the same set of objects using + different settings (or delta order) would produce a pack with + different name. + + * "git diff --no-index" mode used to unnecessarily attempt to read + the index when there is one. + + * The deprecated parse-options macro OPT_BOOLEAN has been removed; + use OPT_BOOL or OPT_COUNTUP in new code. + + * A few duplicate implementations of prefix/suffix string comparison + functions have been unified to starts_with() and ends_with(). + + * The new PERLLIB_EXTRA makefile variable can be used to specify + additional directories Perl modules (e.g. the ones necessary to run + git-svn) are installed on the platform when building. + + * "git merge-base" learned the "--fork-point" mode, that implements + the same logic used in "git pull --rebase" to find a suitable fork + point out of the reflog entries for the remote-tracking branch the + work has been based on. "git rebase" has the same logic that can be + triggered with the "--fork-point" option. + + * A third-party "receive-pack" (the responder to "git push") can + advertise the "no-thin" capability to tell "git push" not to use + the thin-pack optimization. Our receive-pack has always been + capable of accepting and fattening a thin-pack, and will continue + not to ask "git push" to use a non-thin pack. + + +Also contains various documentation updates and code clean-ups. + + +Fixes since v1.8.5 +------------------ + +Unless otherwise noted, all the fixes since v1.8.5 in the maintenance +track are contained in this release (see the maintenance releases' notes +for details). + + * The pathspec matching code, while comparing two trees (e.g. "git + diff A B -- path1 path2") was too aggressive and failed to match + some paths when multiple pathspecs were involved. + + * "git repack --max-pack-size=8g" stopped being parsed correctly when + the command was reimplemented in C. + + * An earlier update in v1.8.4.x to "git rev-list --objects" with + negative ref had a performance regression. + (merge 200abe7 jk/mark-edges-uninteresting later to maint). + + * A recent update to "git send-email" broke platforms where + /etc/ssl/certs/ directory exists but cannot be used as SSL_ca_path + (e.g. Fedora rawhide). + + * A handful of bugs around interpreting $branch@{upstream} notation + and its lookalike, when $branch part has interesting characters, + e.g. "@", and ":", have been fixed. + + * "git clone" would fail to clone from a repository that has a ref + directly under "refs/", e.g. "refs/stash", because different + validation paths do different things on such a refname. Loosen the + client side's validation to allow such a ref. + + * "git log --left-right A...B" lost the "leftness" of commits + reachable from A when A is a tag as a side effect of a recent + bugfix. This is a regression in 1.8.4.x series. + + * documentations to "git pull" hinted there is an "-m" option because + it incorrectly shared the documentation with "git merge". + + * "git diff A B submod" and "git diff A B submod/" ought to have done + the same for a submodule "submod", but didn't. + + * "git clone $origin foo\bar\baz" on Windows failed to create the + leading directories (i.e. a moral-equivalent of "mkdir -p"). + + * "submodule.*.update=checkout", when propagated from .gitmodules to + .git/config, turned into a "submodule.*.update=none", which did not + make much sense. + (merge efa8fd7 fp/submodule-checkout-mode later to maint). + + * The implementation of 'git stash $cmd "stash@{...}"' did not quote + the stash argument properly and left it split at IFS whitespace. + + * The "--[no-]informative-errors" options to "git daemon" were parsed + a bit too loosely, allowing any other string after these option + names. + + * There is no reason to have a hardcoded upper limit for the number of + parents of an octopus merge, created via the graft mechanism, but + there was. + + * The basic test used to leave unnecessary trash directories in the + t/ directory. + (merge 738a8be jk/test-framework-updates later to maint). + + * "git merge-base --octopus" used to leave cleaning up suboptimal + result to the caller, but now it does the clean-up itself. + + * A "gc" process running as a different user should be able to stop a + new "gc" process from starting, but it didn't. + + * An earlier "clean-up" introduced an unnecessary memory leak. + + * "git add -A" (no other arguments) in a totally empty working tree + used to emit an error. + + * "git log --decorate" did not handle a tag pointed by another tag + nicely. + + * When we figure out how many file descriptors to allocate for + keeping packfiles open, a system with non-working getrlimit() could + cause us to die(), but because we make this call only to get a + rough estimate of how many are available and we do not even attempt + to use up all available file descriptors ourselves, it is nicer to + fall back to a reasonable low value rather than dying. + + * read_sha1_file(), that is the workhorse to read the contents given + an object name, honoured object replacements, but there was no + corresponding mechanism to sha1_object_info() that was used to + obtain the metainfo (e.g. type & size) about the object. This led + callers to weird inconsistencies. + (merge 663a856 cc/replace-object-info later to maint). + + * "git cat-file --batch=", an admittedly useless command, did not + behave very well. + + * "git rev-parse -- " did not implement the usual + disambiguation rules the commands in the "git log" family used in + the same way. + + * "git mv A B/", when B does not exist as a directory, should error + out, but it didn't. + + * A workaround to an old bug in glibc prior to glibc 2.17 has been + retired; this would remove a side effect of the workaround that + corrupts system error messages in non-C locales. + + * SSL-related options were not passed correctly to underlying socket + layer in "git send-email". + + * "git commit -v" appends the patch to the log message before + editing, and then removes the patch when the editor returned + control. However, the patch was not stripped correctly when the + first modified path was a submodule. + + * "git fetch --depth=0" was a no-op, and was silently ignored. + Diagnose it as an error. + + * Remote repository URLs expressed in scp-style host:path notation are + parsed more carefully (e.g. "foo/bar:baz" is local, "[::1]:/~user" asks + to connect to user's home directory on host at address ::1. + + * "git diff -- ':(icase)makefile'" was unnecessarily rejected at the + command line parser. + + * "git cat-file --batch-check=ok" did not check the existence of + the named object. + + * "git am --abort" sometimes complained about not being able to write + a tree with an 0{40} object in it. + + * Two processes creating loose objects at the same time could have + failed unnecessarily when the name of their new objects started + with the same byte value, due to a race condition. diff --git a/Documentation/RelNotes/1.9.1.txt b/Documentation/RelNotes/1.9.1.txt new file mode 100644 index 0000000000..5b0602053c --- /dev/null +++ b/Documentation/RelNotes/1.9.1.txt @@ -0,0 +1,59 @@ +Git v1.9.1 Release Notes +======================== + +Fixes since v1.9.0 +------------------ + + * "git clean -d pathspec" did not use the given pathspec correctly + and ended up cleaning too much. + + * "git difftool" misbehaved when the repository is bound to the + working tree with the ".git file" mechanism, where a textual file + ".git" tells us where it is. + + * "git push" did not pay attention to branch.*.pushremote if it is + defined earlier than remote.pushdefault; the order of these two + variables in the configuration file should not matter, but it did + by mistake. + + * Codepaths that parse timestamps in commit objects have been + tightened. + + * "git diff --external-diff" incorrectly fed the submodule directory + in the working tree to the external diff driver when it knew it is + the same as one of the versions being compared. + + * "git reset" needs to refresh the index when working in a working + tree (it can also be used to match the index to the HEAD in an + otherwise bare repository), but it failed to set up the working + tree properly, causing GIT_WORK_TREE to be ignored. + + * "git check-attr" when working on a repository with a working tree + did not work well when the working tree was specified via the + --work-tree (and obviously with --git-dir) option. + + * "merge-recursive" was broken in 1.7.7 era and stopped working in + an empty (temporary) working tree, when there are renames + involved. This has been corrected. + + * "git rev-parse" was loose in rejecting command line arguments + that do not make sense, e.g. "--default" without the required + value for that option. + + * include.path variable (or any variable that expects a path that + can use ~username expansion) in the configuration file is not a + boolean, but the code failed to check it. + + * "git diff --quiet -- pathspec1 pathspec2" sometimes did not return + correct status value. + + * Attempting to deepen a shallow repository by fetching over smart + HTTP transport failed in the protocol exchange, when no-done + extension was used. The fetching side waited for the list of + shallow boundary commits after the sending end stopped talking to + it. + + * Allow "git cmd path/", when the 'path' is where a submodule is + bound to the top-level working tree, to match 'path', despite the + extra and unnecessary trailing slash (such a slash is often + given by command line completion). diff --git a/Documentation/RelNotes/1.9.2.txt b/Documentation/RelNotes/1.9.2.txt new file mode 100644 index 0000000000..47a34ca964 --- /dev/null +++ b/Documentation/RelNotes/1.9.2.txt @@ -0,0 +1,67 @@ +Git v1.9.2 Release Notes +======================== + +Fixes since v1.9.1 +------------------ + + * Documentation and in-code comments had many instances of mistaken + use of "nor", which have been corrected. + + * "git fetch --prune", when the right-hand-side of multiple fetch + refspecs overlap (e.g. storing "refs/heads/*" to + "refs/remotes/origin/*", while storing "refs/frotz/*" to + "refs/remotes/origin/fr/*"), aggressively thought that lack of + "refs/heads/fr/otz" on the origin site meant we should remove + "refs/remotes/origin/fr/otz" from us, without checking their + "refs/frotz/otz" first. + + Note that such a configuration is inherently unsafe (think what + should happen when "refs/heads/fr/otz" does appear on the origin + site), but that is not a reason not to be extra careful. + + * "git update-ref --stdin" did not fail a request to create a ref + when the ref already existed. + + * "git diff --no-index -Mq a b" fell into an infinite loop. + + * When it is not necessary to edit a commit log message (e.g. "git + commit -m" is given a message without specifying "-e"), we used to + disable the spawning of the editor by overriding GIT_EDITOR, but + this means all the uses of the editor, other than to edit the + commit log message, are also affected. + + * "git status --porcelain --branch" showed its output with labels + "ahead/behind/gone" translated to the user's locale. + + * "git mv" that moves a submodule forgot to adjust the array that + uses to keep track of which submodules were to be moved to update + its configuration. + + * Length limit for the pathname used when removing a path in a deep + subdirectory has been removed to avoid buffer overflows. + + * The test helper lib-terminal always run an actual test_expect_* + when included, which screwed up with the use of skil-all that may + have to be done later. + + * "git index-pack" used a wrong variable to name the keep-file in an + error message when the file cannot be written or closed. + + * "rebase -i" produced a broken insn sheet when the title of a commit + happened to contain '\n' (or ended with '\c') due to a careless use + of 'echo'. + + * There were a few instances of 'git-foo' remaining in the + documentation that should have been spelled 'git foo'. + + * Serving objects from a shallow repository needs to write a + new file to hold the temporary shallow boundaries but it was not + cleaned when we exit due to die() or a signal. + + * When "git stash pop" stops after failing to apply the stash + (e.g. due to conflicting changes), the stash is not dropped. State + that explicitly in the output to let the users know. + + * The labels in "git status" output that describe the nature of + conflicts (e.g. "both deleted") were limited to 20 bytes, which was + too short for some l10n (e.g. fr). diff --git a/Documentation/RelNotes/1.9.3.txt b/Documentation/RelNotes/1.9.3.txt new file mode 100644 index 0000000000..17b05ca7b5 --- /dev/null +++ b/Documentation/RelNotes/1.9.3.txt @@ -0,0 +1,21 @@ +Git v1.9.3 Release Notes +======================== + +Fixes since v1.9.2 +------------------ + + * "git p4" dealing with changes in binary files were broken by a + change in 1.9 release. + + * The shell prompt script (in contrib/), when using the PROMPT_COMMAND + interface, used an unsafe construct when showing the branch name in + $PS1. + + * "git rebase" used a POSIX shell construct FreeBSD /bin/sh does not + work well with. + + * Some more Unicode codepoints defined in Unicode 6.3 as having + zero width have been taught to our display column counting logic. + + * Some tests used shell constructs that did not work well on + FreeBSD. diff --git a/Documentation/RelNotes/1.9.4.txt b/Documentation/RelNotes/1.9.4.txt new file mode 100644 index 0000000000..e1d1835436 --- /dev/null +++ b/Documentation/RelNotes/1.9.4.txt @@ -0,0 +1,16 @@ +Git v1.9.4 Release Notes +======================== + +Fixes since v1.9.3 +------------------ + + * Commands that take pathspecs on the command line misbehaved when + the pathspec is given as an absolute pathname (which is a + practice not particularly encouraged) that points at a symbolic + link in the working tree. + + * An earlier fix to the shell prompt script (in contrib/) for using + the PROMPT_COMMAND interface did not correctly check if the extra + code path needs to trigger, causing the branch name not to appear + when 'promptvars' option is disabled in bash or PROMPT_SUBST is + unset in zsh. diff --git a/Documentation/RelNotes/2.0.0.txt b/Documentation/RelNotes/2.0.0.txt new file mode 100644 index 0000000000..2617372a0c --- /dev/null +++ b/Documentation/RelNotes/2.0.0.txt @@ -0,0 +1,364 @@ +Git v2.0 Release Notes +====================== + +Backward compatibility notes +---------------------------- + +When "git push [$there]" does not say what to push, we have used the +traditional "matching" semantics so far (all your branches were sent +to the remote as long as there already are branches of the same name +over there). In Git 2.0, the default is now the "simple" semantics, +which pushes: + + - only the current branch to the branch with the same name, and only + when the current branch is set to integrate with that remote + branch, if you are pushing to the same remote as you fetch from; or + + - only the current branch to the branch with the same name, if you + are pushing to a remote that is not where you usually fetch from. + +You can use the configuration variable "push.default" to change +this. If you are an old-timer who wants to keep using the +"matching" semantics, you can set the variable to "matching", for +example. Read the documentation for other possibilities. + +When "git add -u" and "git add -A" are run inside a subdirectory +without specifying which paths to add on the command line, they +operate on the entire tree for consistency with "git commit -a" and +other commands (these commands used to operate only on the current +subdirectory). Say "git add -u ." or "git add -A ." if you want to +limit the operation to the current directory. + +"git add " is the same as "git add -A " now, so that +"git add dir/" will notice paths you removed from the directory and +record the removal. In older versions of Git, "git add " used +to ignore removals. You can say "git add --ignore-removal " to +add only added or modified paths in , if you really want to. + +The "-q" option to "git diff-files", which does *NOT* mean "quiet", +has been removed (it told Git to ignore deletion, which you can do +with "git diff-files --diff-filter=d"). + +"git request-pull" lost a few "heuristics" that often led to mistakes. + +The default prefix for "git svn" has changed in Git 2.0. For a long +time, "git svn" created its remote-tracking branches directly under +refs/remotes, but it now places them under refs/remotes/origin/ unless +it is told otherwise with its "--prefix" option. + + +Updates since v1.9 series +------------------------- + +UI, Workflows & Features + + * The "multi-mail" post-receive hook (in contrib/) has been updated + to a more recent version from upstream. + + * The "remote-hg/bzr" remote-helper interfaces (used to be in + contrib/) are no more. They are now maintained separately as + third-party plug-ins in their own repositories. + + * "git gc --aggressive" learned "--depth" option and + "gc.aggressiveDepth" configuration variable to allow use of a less + insane depth than the built-in default value of 250. + + * "git log" learned the "--show-linear-break" option to show where a + single strand-of-pearls is broken in its output. + + * The "rev-parse --parseopt" mechanism used by scripted Porcelains to + parse command-line options and to give help text learned to take + the argv-help (the placeholder string for an option parameter, + e.g. "key-id" in "--gpg-sign="). + + * The pattern to find where the function begins in C/C++ used in + "diff" and "grep -p" has been updated to improve viewing C++ + sources. + + * "git rebase" learned to interpret a lone "-" as "@{-1}", the + branch that we were previously on. + + * "git commit --cleanup=" learned a new mode, scissors. + + * "git tag --list" output can be sorted using "version sort" with + "--sort=version:refname". + + * Discard the accumulated "heuristics" to guess from which branch the + result wants to be pulled from and make sure that what the end user + specified is not second-guessed by "git request-pull", to avoid + mistakes. When you pushed out your 'master' branch to your public + repository as 'for-linus', use the new "master:for-linus" syntax to + denote the branch to be pulled. + + * "git grep" learned to behave in a way similar to native grep when + "-h" (no header) and "-c" (count) options are given. + + * "git push" via transport-helper interface has been updated to + allow forced ref updates in a way similar to the natively + supported transports. + + * The "simple" mode is the default for "git push". + + * "git add -u" and "git add -A", when run without any pathspec, is a + tree-wide operation even when run inside a subdirectory of a + working tree. + + * "git add " is the same as "git add -A " now. + + * "core.statinfo" configuration variable, which is a + never-advertised synonym to "core.checkstat", has been removed. + + * The "-q" option to "git diff-files", which does *NOT* mean + "quiet", has been removed (it told Git to ignore deletion, which + you can do with "git diff-files --diff-filter=d"). + + * Server operators can loosen the "tips of refs only" restriction for + the remote archive service with the uploadarchive.allowUnreachable + configuration option. + + * The progress indicators from various time-consuming commands have + been marked for i18n/l10n. + + * "git notes -C " diagnoses as an error an attempt to use an + object that is not a blob. + + * "git config" learned to read from the standard input when "-" is + given as the value to its "--file" parameter (attempting an + operation to update the configuration in the standard input is + rejected, of course). + + * Trailing whitespaces in .gitignore files, unless they are quoted + for fnmatch(3), e.g. "path\ ", are warned and ignored. Strictly + speaking, this is a backward-incompatible change, but very unlikely + to bite any sane user and adjusting should be obvious and easy. + + * Many commands that create commits, e.g. "pull" and "rebase", + learned to take the "--gpg-sign" option on the command line. + + * "git commit" can be told to always GPG sign the resulting commit + by setting the "commit.gpgsign" configuration variable to "true" + (the command-line option "--no-gpg-sign" should override it). + + * "git pull" can be told to only accept fast-forward by setting the + new "pull.ff" configuration variable. + + * "git reset" learned the "-N" option, which does not reset the index + fully for paths the index knows about but the tree-ish the command + resets to does not (these paths are kept as intend-to-add entries). + + +Performance, Internal Implementation, etc. + + * The compilation options to port to AIX and to MSVC have been + updated. + + * We started using wildmatch() in place of fnmatch(3) a few releases + ago; complete the process and stop using fnmatch(3). + + * Uses of curl's "multi" interface and "easy" interface do not mix + well when we attempt to reuse outgoing connections. Teach the RPC + over HTTP code, used in the smart HTTP transport, not to use the + "easy" interface. + + * The bitmap-index feature from JGit has been ported, which should + significantly improve performance when serving objects from a + repository that uses it. + + * The way "git log --cc" shows a combined diff against multiple + parents has been optimized. + + * The prefixcmp() and suffixcmp() functions are gone. Use + starts_with() and ends_with(), and also consider if skip_prefix() + suits your needs better when using the former. + + +Also contains various documentation updates and code clean-ups. Many +of them came from flurry of activities as GSoC candidate microproject +exercises. + + +Fixes since v1.9 series +----------------------- + +Unless otherwise noted, all the fixes since v1.9 in the maintenance +track are contained in this release (see the maintenance releases' +notes for details). + + * "git p4" was broken in 1.9 release to deal with changes in binary + files. + (merge 749b668 cl/p4-use-diff-tree later to maint). + + * The shell prompt script (in contrib/), when using the PROMPT_COMMAND + interface, used an unsafe construct when showing the branch name in + $PS1. + (merge 1e4119c8 rh/prompt-pcmode-avoid-eval-on-refname later to maint). + + * "git rebase" used a POSIX shell construct FreeBSD's /bin/sh does not + work well with. + (merge 8cd6596 km/avoid-non-function-return-in-rebase later to maint). + + * zsh prompt (in contrib/) leaked unnecessary error messages. + + * Bash completion (in contrib/) did not complete the refs and remotes + correctly given "git pu" when "pu" is aliased to "push". + + * Some more Unicode code points, defined in Unicode 6.3 as having zero + width, have been taught to our display column counting logic. + (merge d813ab9 tb/unicode-6.3-zero-width later to maint). + + * Some tests used shell constructs that did not work well on FreeBSD + (merge ff7a1c6 km/avoid-bs-in-shell-glob later to maint). + (merge 00764ca km/avoid-cp-a later to maint). + + * "git update-ref --stdin" did not fail a request to create a ref + when the ref already existed. + (merge b9d56b5 mh/update-ref-batch-create-fix later to maint). + + * "git diff --no-index -Mq a b" fell into an infinite loop. + (merge ad1c3fb jc/fix-diff-no-index-diff-opt-parse later to maint). + + * "git fetch --prune", when the right-hand side of multiple fetch + refspecs overlap (e.g. storing "refs/heads/*" to + "refs/remotes/origin/*", while storing "refs/frotz/*" to + "refs/remotes/origin/fr/*"), aggressively thought that lack of + "refs/heads/fr/otz" on the origin site meant we should remove + "refs/remotes/origin/fr/otz" from us, without checking their + "refs/frotz/otz" first. + + Note that such a configuration is inherently unsafe (think what + should happen when "refs/heads/fr/otz" does appear on the origin + site), but that is not a reason not to be extra careful. + (merge e6f6371 cn/fetch-prune-overlapping-destination later to maint). + + * "git status --porcelain --branch" showed its output with labels + "ahead/behind/gone" translated to the user's locale. + (merge 7a76c28 mm/status-porcelain-format-i18n-fix later to maint). + + * A stray environment variable $prefix could have leaked into and + affected the behaviour of the "subtree" script (in contrib/). + + * When it is not necessary to edit a commit log message (e.g. "git + commit -m" is given a message without specifying "-e"), we used to + disable the spawning of the editor by overriding GIT_EDITOR, but + this means all the uses of the editor, other than to edit the + commit log message, are also affected. + (merge b549be0 bp/commit-p-editor later to maint). + + * "git mv" that moves a submodule forgot to adjust the array that + uses to keep track of which submodules were to be moved to update + its configuration. + (merge fb8a4e8 jk/mv-submodules-fix later to maint). + + * Length limit for the pathname used when removing a path in a deep + subdirectory has been removed to avoid buffer overflows. + (merge 2f29e0c mh/remove-subtree-long-pathname-fix later to maint). + + * The test helper lib-terminal always run an actual test_expect_* + when included, which screwed up with the use of skil-all that may + have to be done later. + (merge 7e27173 jk/lib-terminal-lazy later to maint). + + * "git index-pack" used a wrong variable to name the keep-file in an + error message when the file cannot be written or closed. + (merge de983a0 nd/index-pack-error-message later to maint). + + * "rebase -i" produced a broken insn sheet when the title of a commit + happened to contain '\n' (or ended with '\c') due to a careless use + of 'echo'. + (merge cb1aefd us/printf-not-echo later to maint). + + * There were a few instances of 'git-foo' remaining in the + documentation that should have been spelled 'git foo'. + (merge 3c3e6f5 rr/doc-merge-strategies later to maint). + + * Serving objects from a shallow repository needs to write a + new file to hold the temporary shallow boundaries, but it was not + cleaned when we exit due to die() or a signal. + (merge 7839632 jk/shallow-update-fix later to maint). + + * When "git stash pop" stops after failing to apply the stash + (e.g. due to conflicting changes), the stash is not dropped. State + that explicitly in the output to let the users know. + (merge 2d4c993 jc/stash-pop-not-popped later to maint). + + * The labels in "git status" output that describe the nature of + conflicts (e.g. "both deleted") were limited to 20 bytes, which was + too short for some l10n (e.g. fr). + (merge c7cb333 jn/wt-status later to maint). + + * "git clean -d pathspec" did not use the given pathspec correctly + and ended up cleaning too much. + (merge 1f2e108 jk/clean-d-pathspec later to maint). + + * "git difftool" misbehaved when the repository is bound to the + working tree with the ".git file" mechanism, where a textual file + ".git" tells us where it is. + (merge fcfec8b da/difftool-git-files later to maint). + + * "git push" did not pay attention to "branch.*.pushremote" if it is + defined earlier than "remote.pushdefault"; the order of these two + variables in the configuration file should not matter, but it did + by mistake. + (merge 98b406f jk/remote-pushremote-config-reading later to maint). + + * Code paths that parse timestamps in commit objects have been + tightened. + (merge f80d1f9 jk/commit-dates-parsing-fix later to maint). + + * "git diff --external-diff" incorrectly fed the submodule directory + in the working tree to the external diff driver when it knew that it + is the same as one of the versions being compared. + (merge aba4727 tr/diff-submodule-no-reuse-worktree later to maint). + + * "git reset" needs to refresh the index when working in a working + tree (it can also be used to match the index to the HEAD in an + otherwise bare repository), but it failed to set up the working + tree properly, causing GIT_WORK_TREE to be ignored. + (merge b7756d4 nd/reset-setup-worktree later to maint). + + * "git check-attr" when working on a repository with a working tree + did not work well when the working tree was specified via the + "--work-tree" (and obviously with "--git-dir") option. + (merge cdbf623 jc/check-attr-honor-working-tree later to maint). + + * "merge-recursive" was broken in 1.7.7 era and stopped working in + an empty (temporary) working tree, when there are renames + involved. This has been corrected. + (merge 6e2068a bk/refresh-missing-ok-in-merge-recursive later to maint.) + + * "git rev-parse" was loose in rejecting command-line arguments + that do not make sense, e.g. "--default" without the required + value for that option. + (merge a43219f ds/rev-parse-required-args later to maint.) + + * "include.path" variable (or any variable that expects a path that + can use ~username expansion) in the configuration file is not a + boolean, but the code failed to check it. + (merge 67beb60 jk/config-path-include-fix later to maint.) + + * Commands that take pathspecs on the command line misbehaved when + the pathspec is given as an absolute pathname (which is a + practice not particularly encouraged) that points at a symbolic + link in the working tree. + (merge 6127ff6 mw/symlinks later to maint.) + + * "git diff --quiet -- pathspec1 pathspec2" sometimes did not return + the correct status value. + (merge f34b205 nd/diff-quiet-stat-dirty later to maint.) + + * Attempting to deepen a shallow repository by fetching over smart + HTTP transport failed in the protocol exchange, when the no-done + extension was used. The fetching side waited for the list of + shallow boundary commits after the sending side stopped talking to + it. + (merge 0232852 nd/http-fetch-shallow-fix later to maint.) + + * Allow "git cmd path/", when the 'path' is where a submodule is + bound to the top-level working tree, to match 'path', despite the + extra and unnecessary trailing slash (such a slash is often + given by command-line completion). + (merge 2e70c01 nd/submodule-pathspec-ending-with-slash later to maint.) + + * Documentation and in-code comments had many instances of mistaken + use of "nor", which have been corrected. + (merge 235e8d5 jl/nor-or-nand-and later to maint). diff --git a/Documentation/RelNotes/2.1.0.txt b/Documentation/RelNotes/2.1.0.txt new file mode 100644 index 0000000000..ad53d0deb6 --- /dev/null +++ b/Documentation/RelNotes/2.1.0.txt @@ -0,0 +1,86 @@ +Git v2.1 Release Notes +====================== + +Updates since v2.0 +------------------ + +UI, Workflows & Features + + * "git commit --date=" option learned to read from more + timestamp formats, including "--date=now". + + * "git grep" learned grep.fullname configuration variable to force + "--full-name" to be default. This may cause regressions on + scripted users that do not expect this new behaviour. + + * "git merge" without argument, even when there is an upstream + defined for the current branch, refused to run until + merge.defaultToUpstream is set to true. Flip the default of that + configuration variable to true. + + * "git mergetool" learned to drive the vimdiff3 backend. + + * mergetool.prompt used to default to 'true', always asking "do you + really want to run the tool on this path?". Among the two + purposes this prompt serves, ignore the use case to confirm that + the user wants to view particular path with the named tool, and + redefine the meaning of the prompt only to confirm the choice of + the tool made by the autodetection (for those who configured the + tool explicitly, the prompt shown for the latter purpose is + simply annoying). + + Strictly speaking, this is a backward incompatible change and the + users need to explicitly set the variable to 'true' if they want + to resurrect the now-ignored use case. + + * "git svn" learned to cope with malformed timestamps with only one + digit in the hour part, e.g. 2014-01-07T5:01:02.048176Z, emitted + by some broken subversion server implementations. + + +Performance, Internal Implementation, etc. + + * "git diff" that compares 3-or-more trees (e.g. parents and the + result of a merge) have been optimized. + + * The API to update/delete references are being converted to handle + updates to multiple references in a transactional way. As an + example, "update-ref --stdin [-z]" has been updated to use this + API. + + +Also contains various documentation updates and code clean-ups. + + +Fixes since v2.0 +---------------- + +Unless otherwise noted, all the fixes since v2.0 in the maintenance +track are contained in this release (see the maintenance releases' +notes for details). + + * "--ignore-space-change" option of "git apply" ignored the spaces + at the beginning of line too aggressively, which is inconsistent + with the option of the same name "diff" and "git diff" have. + (merge 14d3bb4 jc/apply-ignore-whitespace later to maint). + + * "git blame" miscounted number of columns needed to show localized + timestamps, resulting in jaggy left-side-edge of the source code + lines in its output. + (merge dd75553 jx/blame-align-relative-time later to maint). + + * We used to disable threaded "git index-pack" on platforms without + thread-safe pread(); use a different workaround for such + platforms to allow threaded "git index-pack". + (merge 3953949 nd/index-pack-one-fd-per-thread later to maint). + + * "git rerere forget" did not work well when merge.conflictstyle + was set to a non-default value. + (merge de3d8bb fc/rerere-conflict-style later to maint). + + * "git status", even though it is a read-only operation, tries to + update the index with refreshed lstat(2) info to optimize future + accesses to the working tree opportunistically, but this could + race with a "read-write" operation that modify the index while it + is running. Detect such a race and avoid overwriting the index. + (merge 426ddee ym/fix-opportunistic-index-update-race later to maint). diff --git a/Documentation/config.txt b/Documentation/config.txt index ab26963d61..a33c087cb4 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -78,8 +78,8 @@ be escaped: use `\"` for `"` and `\\` for `\`. The following escape sequences (beside `\"` and `\\`) are recognized: `\n` for newline character (NL), `\t` for horizontal tabulation (HT, TAB) -and `\b` for backspace (BS). No other char escape sequence, nor octal -char sequences are valid. +and `\b` for backspace (BS). Other char escape sequences (including octal +escape sequences) are invalid. Variable values ending in a `\` are continued on the next line in the customary UNIX fashion. @@ -131,8 +131,13 @@ Variables Note that this list is non-comprehensive and not necessarily complete. For command-specific variables, you will find a more detailed description -in the appropriate manual page. You will find a description of non-core -porcelain configuration variables in the respective porcelain documentation. +in the appropriate manual page. + +Other git-related tools may and do use their own variables. When +inventing new variables for use in your own tool, make sure their +names do not conflict with those that are used by Git itself and +other popular tools, and describe them in your documentation. + advice.*:: These variables control various optional help messages designed to @@ -142,19 +147,13 @@ advice.*:: -- pushUpdateRejected:: Set this variable to 'false' if you want to disable - 'pushNonFFCurrent', 'pushNonFFDefault', + 'pushNonFFCurrent', 'pushNonFFMatching', 'pushAlreadyExists', 'pushFetchFirst', and 'pushNeedsForce' simultaneously. pushNonFFCurrent:: Advice shown when linkgit:git-push[1] fails due to a non-fast-forward update to the current branch. - pushNonFFDefault:: - Advice to set 'push.default' to 'upstream' or 'current' - when you ran linkgit:git-push[1] and pushed 'matching - refs' by default (i.e. you did not provide an explicit - refspec, and no 'push.default' configuration was set) - and it resulted in a non-fast-forward error. pushNonFFMatching:: Advice shown when you ran linkgit:git-push[1] and pushed 'matching refs' explicitly (i.e. you used ':', or @@ -490,7 +489,7 @@ core.deltaBaseCacheLimit:: to avoid unpacking and decompressing frequently used base objects multiple times. + -Default is 16 MiB on all platforms. This should be reasonable +Default is 96 MiB on all platforms. This should be reasonable for all users/operating systems, except on the largest projects. You probably do not need to adjust this value. + @@ -559,14 +558,23 @@ core.pager:: configuration, then `$PAGER`, and then the default chosen at compile time (usually 'less'). + -When the `LESS` environment variable is unset, Git sets it to `FRSX` +When the `LESS` environment variable is unset, Git sets it to `FRX` (if `LESS` environment variable is set, Git does not change it at all). If you want to selectively override Git's default setting -for `LESS`, you can set `core.pager` to e.g. `less -+S`. This will +for `LESS`, you can set `core.pager` to e.g. `less -S`. This will be passed to the shell by Git, which will translate the final -command to `LESS=FRSX less -+S`. The environment tells the command -to set the `S` option to chop long lines but the command line -resets it to the default to fold long lines. +command to `LESS=FRX less -S`. The environment does not set the +`S` option but the command line does, instructing less to truncate +long lines. Similarly, setting `core.pager` to `less -+F` will +deactivate the `F` option specified by the environment from the +command-line, deactivating the "quit if one screen" behavior of +`less`. One can specifically activate some flags for particular +commands: for example, setting `pager.blame` to `less -S` enables +line truncation only for `git blame`. ++ +Likewise, when the `LV` environment variable is unset, Git sets it +to `-c`. You can override this setting by exporting `LV` with +another value or setting `core.pager` to `lv +c`. core.whitespace:: A comma separated list of common whitespace problems to @@ -823,7 +831,7 @@ color.diff:: commands will only use color when output is to the terminal. Defaults to false. + -This does not affect linkgit:git-format-patch[1] nor the +This does not affect linkgit:git-format-patch[1] or the 'git-diff-{asterisk}' plumbing commands. Can be overridden on the command line with the `--color[=]` option. @@ -988,6 +996,14 @@ commit.cleanup:: have to remove the help lines that begin with `#` in the commit log template yourself, if you do this). +commit.gpgsign:: + + A boolean to specify whether all commits should be GPG signed. + Use of this option when doing operations such as rebase can + result in a large number of commits being signed. It may be + convenient to use an agent to avoid typing your GPG passphrase + several times. + commit.status:: A boolean to enable/disable inclusion of status information in the commit message template when using an editor to prepare the commit @@ -1145,6 +1161,11 @@ filter..smudge:: object to a worktree file upon checkout. See linkgit:gitattributes[5] for details. +gc.aggressiveDepth:: + The depth parameter used in the delta compression + algorithm used by 'git gc --aggressive'. This defaults + to 250. + gc.aggressiveWindow:: The window size parameter used in the delta compression algorithm used by 'git gc --aggressive'. This defaults @@ -1163,6 +1184,10 @@ gc.autopacklimit:: --auto` consolidates them into one larger pack. The default value is 50. Setting this to 0 disables it. +gc.autodetach:: + Make `git gc --auto` return immediately andrun in background + if the system supports it. Default is true. + gc.packrefs:: Running `git pack-refs` in a repository renders it unclonable by Git versions prior to 1.5.1.2 over dumb @@ -1320,6 +1345,10 @@ gui.diffcontext:: Specifies how many context lines should be used in calls to diff made by the linkgit:git-gui[1]. The default is "5". +gui.displayuntracked:: + Determines if linkgit::git-gui[1] shows untracked files + in the file list. The default is "true". + gui.encoding:: Specifies the default encoding to use for displaying of file contents in linkgit:git-gui[1] and linkgit:gitk[1]. @@ -1597,6 +1626,10 @@ imap:: The configuration variables in the 'imap' section are described in linkgit:git-imap-send[1]. +index.version:: + Specify the version with which new index files should be + initialized. This does not affect existing repositories. + init.templatedir:: Specify the directory from which templates will be copied. (See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].) @@ -1629,7 +1662,7 @@ interactive.singlekey:: linkgit:git-add[1], linkgit:git-checkout[1], linkgit:git-commit[1], linkgit:git-reset[1], and linkgit:git-stash[1]. Note that this setting is silently ignored if portable keystroke input - is not available. + is not available; requires the Perl module Term::ReadKey. log.abbrevCommit:: If true, makes linkgit:git-log[1], linkgit:git-show[1], and @@ -1858,6 +1891,31 @@ pack.packSizeLimit:: Common unit suffixes of 'k', 'm', or 'g' are supported. +pack.useBitmaps:: + When true, git will use pack bitmaps (if available) when packing + to stdout (e.g., during the server side of a fetch). Defaults to + true. You should not generally need to turn this off unless + you are debugging pack bitmaps. + +pack.writebitmaps:: + When true, git will write a bitmap index when packing all + objects to disk (e.g., when `git repack -a` is run). This + index can speed up the "counting objects" phase of subsequent + packs created for clones and fetches, at the cost of some disk + space and extra time spent on the initial repack. Defaults to + false. + +pack.writeBitmapHashCache:: + When true, git will include a "hash cache" section in the bitmap + index (if one is written). This cache can be used to feed git's + delta heuristics, potentially leading to better deltas between + bitmapped and non-bitmapped objects (e.g., when serving a fetch + between an older, bitmapped pack and objects that have been + pushed since the last gc). The downside is that it consumes 4 + bytes per object of disk space, and that JGit's bitmap + implementation does not understand it, causing it to complain if + Git and JGit are used on the same repository. Defaults to false. + pager.:: If the value is boolean, turns on or off pagination of the output of a particular Git subcommand when writing to a tty. @@ -1877,6 +1935,16 @@ pretty.:: Note that an alias with the same name as a built-in format will be silently ignored. +pull.ff:: + By default, Git does not create an extra merge commit when merging + a commit that is a descendant of the current commit. Instead, the + tip of the current branch is fast-forwarded. When set to `false`, + this variable tells Git to create an extra merge commit in such + a case (equivalent to giving the `--no-ff` option from the command + line). When set to `only`, only such fast-forward merges are + allowed (equivalent to giving the `--ff-only` option from the + command line). + pull.rebase:: When true, rebase branches on top of the fetched branch, instead of merging the default branch from the default remote when "git @@ -1929,7 +1997,7 @@ When pushing to a remote that is different from the remote you normally pull from, work as `current`. This is the safest option and is suited for beginners. + -This mode will become the default in Git 2.0. +This mode has become the default in Git 2.0. * `matching` - push all branches having the same name on both ends. This makes the repository you are pushing to remember the set of @@ -1948,8 +2016,8 @@ suitable for pushing into a shared central repository, as other people may add new branches there, or update the tip of existing branches outside your control. + -This is currently the default, but Git 2.0 will change the default -to `simple`. +This used to be the default, but not since Git 2.0 (`simple` is the +new default). -- @@ -2026,6 +2094,10 @@ receive.updateserverinfo:: If set to true, git-receive-pack will run git-update-server-info after receiving data from git-push and updating refs. +receive.shallowupdate:: + If set to true, .git/shallow can be updated when new refs + require new shallow roots. Otherwise those refs are rejected. + remote.pushdefault:: The remote to push to by default. Overrides `branch..remote` for all branches, and is overridden by @@ -2087,8 +2159,8 @@ remote..vcs:: remote..prune:: When set to true, fetching from this remote by default will also - remove any remote-tracking branches which no longer exist on the - remote (as if the `--prune` option was give on the command line). + remove any remote-tracking references that no longer exist on the + remote (as if the `--prune` option was given on the command line). Overrides `fetch.prune` settings, if any. remotes.:: @@ -2103,6 +2175,13 @@ repack.usedeltabaseoffset:: "false" and repack. Access from old Git versions over the native protocol are unaffected by this option. +repack.packKeptObjects:: + If set to true, makes `git repack` act as if + `--pack-kept-objects` was passed. See linkgit:git-repack[1] for + details. Defaults to `false` normally, but `true` if a bitmap + index is being written (either via `--write-bitmap-index` or + `pack.writeBitmaps`). + rerere.autoupdate:: When set to true, `git-rerere` updates the index with the resulting contents after it cleanly resolves conflicts using @@ -2283,6 +2362,13 @@ transfer.unpackLimit:: not set, the value of this variable is used instead. The default value is 100. +uploadarchive.allowUnreachable:: + If true, allow clients to use `git archive --remote` to request + any tree, whether reachable from the ref tips or not. See the + discussion in the `SECURITY` section of + linkgit:git-upload-archive[1] for more details. Defaults to + `false`. + uploadpack.hiderefs:: String(s) `upload-pack` uses to decide which refs to omit from its initial advertisement. Use more than one diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt index 223b9310df..f07b4513ed 100644 --- a/Documentation/diff-config.txt +++ b/Documentation/diff-config.txt @@ -98,6 +98,11 @@ diff.mnemonicprefix:: diff.noprefix:: If set, 'git diff' does not show any source or destination prefix. +diff.orderfile:: + File indicating how to order files within a diff, using + one shell glob pattern per line. + Can be overridden by the '-O' option to linkgit:git-diff[1]. + diff.renameLimit:: The number of files to consider when performing the copy/rename detection; equivalent to the 'git diff' option '-l'. diff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt index 55f499a160..843a20bac2 100644 --- a/Documentation/diff-generate-patch.txt +++ b/Documentation/diff-generate-patch.txt @@ -174,7 +174,7 @@ added, from the point of view of that parent). In the above example output, the function signature was changed from both files (hence two `-` removals from both file1 and file2, plus `++` to mean one line that was added does not appear -in either file1 nor file2). Also eight other lines are the same +in either file1 or file2). Also eight other lines are the same from file1 but do not appear in file2 (hence prefixed with `+`). When shown by `git diff-tree -c`, it compares the parents of a diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index bbed2cd79c..6cb083aae5 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -358,7 +358,7 @@ endif::git-log[] --irreversible-delete:: Omit the preimage for deletes, i.e. print only the header but not the diff between the preimage and `/dev/null`. The resulting patch - is not meant to be applied with `patch` nor `git apply`; this is + is not meant to be applied with `patch` or `git apply`; this is solely for people who want to just concentrate on reviewing the text after the change. In addition, the output obviously lack enough information to apply such a patch in reverse, even manually, @@ -432,6 +432,9 @@ endif::git-format-patch[] -O:: Output the patch in the order specified in the , which has one shell glob pattern per line. + This overrides the `diff.orderfile` configuration variable + (see linkgit:git-config[1]). To cancel `diff.orderfile`, + use `-O/dev/null`. ifndef::git-format-patch[] -R:: diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt index 2a18c1f6f2..b2548ef4e6 100644 --- a/Documentation/everyday.txt +++ b/Documentation/everyday.txt @@ -263,7 +263,7 @@ that are not quite ready. <5> create topic branch as needed and apply, again with my sign-offs. <6> rebase internal topic branch that has not been merged to the -master, nor exposed as a part of a stable branch. +master or exposed as a part of a stable branch. <7> restart `pu` every time from the next. <8> and bundle topic branches still cooking. <9> backport a critical fix. diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index ba1fe49582..92c68c3fda 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -14,8 +14,18 @@ branch history. Tags for the deepened commits are not fetched. --unshallow:: - Convert a shallow repository to a complete one, removing all - the limitations imposed by shallow repositories. + If the source repository is complete, convert a shallow + repository to a complete one, removing all the limitations + imposed by shallow repositories. ++ +If the source repository is shallow, fetch as much as possible so that +the current repository has the same history as the source repository. + +--update-shallow:: + By default when fetching from a shallow repository, + `git fetch` refuses refs that require updating + .git/shallow. This option updates .git/shallow and accept such + refs. ifndef::git-pull[] --dry-run:: @@ -41,17 +51,20 @@ ifndef::git-pull[] -p:: --prune:: - After fetching, remove any remote-tracking branches which - no longer exist on the remote. + After 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 + are fetched due to an explicit refspec (either on the command + line or in the remote configuration, for example if the remote + was cloned with the --mirror option), then they are also + subject to pruning. endif::git-pull[] -ifdef::git-pull[] ---no-tags:: -endif::git-pull[] ifndef::git-pull[] -n:: ---no-tags:: endif::git-pull[] +--no-tags:: By default, tags that point at objects that are downloaded from the remote repository are fetched and stored locally. This option disables this automatic tag following. The default @@ -61,11 +74,12 @@ endif::git-pull[] ifndef::git-pull[] -t:: --tags:: - This is a short-hand for giving `refs/tags/*:refs/tags/*` - refspec from the command line, to ask all tags to be fetched - and stored locally. Because this acts as an explicit - refspec, the default refspecs (configured with the - remote.$name.fetch variable) are overridden and not used. + Fetch all tags from the remote (i.e., fetch remote tags + `refs/tags/*` into local tags with the same name), in addition + 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'). --recurse-submodules[=yes|on-demand|no]:: This option controls if and under what conditions new commits of diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index 48754cbc67..9631526110 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -53,8 +53,14 @@ OPTIONS Files to add content from. Fileglobs (e.g. `*.c`) can be given to add all matching files. Also a leading directory name (e.g. `dir` to add `dir/file1` - and `dir/file2`) can be given to add all files in the - directory, recursively. + and `dir/file2`) can be given to update the index to + match the current state of the directory as a whole (e.g. + specifying `dir` will record not just a file `dir/file1` + modified in the working tree, a file `dir/file2` added to + the working tree, but also a file `dir/file3` removed from + the working tree. Note that older versions of Git used + to ignore removed files; use `--no-all` option if you want + to add modified or new files but ignore removed ones. -n:: --dry-run:: @@ -104,10 +110,10 @@ apply to the index. See EDITING PATCHES below. . This removes as well as modifies index entries to match the working tree, but adds no new files. + -If no is given, the current version of Git defaults to -"."; in other words, update all tracked files in the current directory -and its subdirectories. This default will change in a future version -of Git, hence the form without should not be used. +If no is given when `-u` option is used, all +tracked files in the entire working tree are updated (old versions +of Git used to limit the update to the current directory and its +subdirectories). -A:: --all:: @@ -117,10 +123,10 @@ of Git, hence the form without should not be used. entry. This adds, modifies, and removes index entries to match the working tree. + -If no is given, the current version of Git defaults to -"."; in other words, update all files in the current directory -and its subdirectories. This default will change in a future version -of Git, hence the form without should not be used. +If no is given when `-A` option is used, all +files in the entire working tree are updated (old versions +of Git used to limit the update to the current directory and its +subdirectories). --no-all:: --ignore-removal:: @@ -129,11 +135,9 @@ of Git, hence the form without should not be used. files that have been removed from the working tree. This option is a no-op when no is used. + -This option is primarily to help the current users of Git, whose -"git add ..." ignores removed files. In future versions -of Git, "git add ..." will be a synonym to "git add -A -..." and "git add --ignore-removal ..." will behave like -today's "git add ...", ignoring removed files. +This option is primarily to help users who are used to older +versions of Git, whose "git add ..." was a synonym +for "git add --no-all ...", i.e. ignored removed files. -N:: --intent-to-add:: @@ -296,9 +300,9 @@ patch:: y - stage this hunk n - do not stage this hunk - q - quit; do not stage this hunk nor any of the remaining ones + q - quit; do not stage this hunk or any of the remaining ones a - stage this hunk and all later hunks in the file - d - do not stage this hunk nor any of the later hunks in the file + d - do not stage this hunk or any of the later hunks in the file g - select a hunk to go to / - search for a hunk matching the given regex j - leave this hunk undecided, see next undecided hunk diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 54d8461d61..9adce372ec 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -14,7 +14,7 @@ SYNOPSIS [--ignore-date] [--ignore-space-change | --ignore-whitespace] [--whitespace=