diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/RelNotes/1.7.5.2.txt | 57 | ||||
-rw-r--r-- | Documentation/RelNotes/1.7.6.txt | 74 | ||||
-rw-r--r-- | Documentation/config.txt | 8 | ||||
-rw-r--r-- | Documentation/diff-config.txt | 44 | ||||
-rw-r--r-- | Documentation/diff-options.txt | 54 | ||||
-rw-r--r-- | Documentation/git-add.txt | 6 | ||||
-rw-r--r-- | Documentation/git-checkout.txt | 7 | ||||
-rw-r--r-- | Documentation/git-commit.txt | 24 | ||||
-rw-r--r-- | Documentation/git-fsck.txt | 4 | ||||
-rw-r--r-- | Documentation/git-reset.txt | 7 | ||||
-rw-r--r-- | Documentation/git-stash.txt | 9 | ||||
-rw-r--r-- | Documentation/git.txt | 3 | ||||
-rw-r--r-- | Documentation/merge-config.txt | 10 |
13 files changed, 231 insertions, 76 deletions
diff --git a/Documentation/RelNotes/1.7.5.2.txt b/Documentation/RelNotes/1.7.5.2.txt new file mode 100644 index 0000000000..951eb7cb08 --- /dev/null +++ b/Documentation/RelNotes/1.7.5.2.txt @@ -0,0 +1,57 @@ +Git v1.7.5.2 Release Notes +========================== + +The release notes to 1.7.5.1 forgot to mention: + + * "git stash -p --no-keep-index" and "git stash --no-keep-index -p" now + mean the same thing. + + * "git upload-pack" (hence "git push" over git native protocol) had a + subtle race condition that could lead to a deadlock. + +Fixes since v1.7.5.1 +-------------------- + + * "git add -p" did not work correctly when a hunk is split and then + one of them was given to the editor. + + * "git add -u" did not resolve a conflict where our history deleted and + their history modified the same file, and the working tree resolved to + keep a file. + + * "git cvsimport" did not know that CVSNT stores its password file in a + location different from the traditional CVS. + + * "git diff-files" did not show the mode information from the working + tree side of an unmerged path correctly. + + * "git diff -M --cached" used to use unmerged path as a possible rename + source candidate, which made no sense. + + * The option name parser in "git fast-import" used prefix matches for + some options where it shouldn't, and accepted non-existent options, + e.g. "--relative-marksmith" or "--forceps". + + * "git format-patch" did not quote RFC822 special characters in the + email address (e.g From: Junio C. Hamano <jch@example.com>, not + From: "Junio C. Hamano" <jch@example.com>). + + * "git format-patch" when run with "--quiet" option used to produce a + nonsense result that consists of alternating empty output. + + * In "git merge", per-branch branch.<name>.mergeoptions configuration + variables did not override the fallback default merge.<option> + configuration variables such as merge.ff, merge.log, etc. + + * "git merge-one-file" did not honor GIT_WORK_TREE settings when + handling a "both sides added, differently" conflict. + + * "git mergetool" did not handle conflicted submoudules gracefully. + + * "git-p4" (in contrib) used a wrong base image while merge a file that + was added on both branches differently. + + * "git rebase -i -p" failed to preserve the history when there is a + redundant merge created with the --no-ff option. + +And other minor fixes and documentation updates. diff --git a/Documentation/RelNotes/1.7.6.txt b/Documentation/RelNotes/1.7.6.txt index 8554918cf4..a3624a6c57 100644 --- a/Documentation/RelNotes/1.7.6.txt +++ b/Documentation/RelNotes/1.7.6.txt @@ -6,6 +6,8 @@ Updates since v1.7.5 * Various git-svn updates. + * Updates the way content tags are handled in gitweb. + * Clean-up of the C part of i18n (but not l10n---please wait) continues. @@ -16,14 +18,24 @@ Updates since v1.7.5 * "git blame" learned "--abbrev[=<n>]" option to control the minimum number of hexdigits shown for commit object names. - * "git cvsimport" learned that CVSNT stores its password file in a - location different from the traditional CVS. + * Aborting "git commit --interactive" discards updates to the index + made during the interctive session. + + * "git commit" learned a "--patch" option to directly jump to the + per-hunk selection UI of the interactive mode. * "git diff -C -C" used to disable the rename detection entirely when there are too many copy candidate paths in the tree; now it falls back to "-C" when doing so would keep the copy candidate paths under the rename detection limit. + * "git diff" and its family of commands learned --dirstat=0 to show + directories that contribute less than 0.1% of changes. + + * "git diff" and its family of commands learned --dirstat=lines mode to + assess damage to the directory based on number of lines in the patch + output, not based on the similarity numbers. + * "git format-patch" learned "--quiet" option to suppress the output of the names of generated files. @@ -38,8 +50,14 @@ Updates since v1.7.5 * "git merge" learned "-" as a short-hand for "the previous branch", just like the way "git checkout -" works. - * "git merge-one-file" learned to honor GIT_WORK_TREE settings when - handling "both sides added, differently" conflict. + * "git merge" uses "merge.ff" configuration variable to decide to always + create a merge commit (i.e. --no-ff, aka merge.ff=no), refuse to create + a merge commit (i.e. --ff-only, aka merge.ff=only). Setting merge.ff=yes + (or not setting it at all) restores the default behaviour of allowing + fast-forward to happen when possible. + + * "git rebase" that does not specify on top of which branch to rebase + the current branch now uses @{upstream} of the current branch. * "git rev-list --count" used with "--cherry-mark" counts the cherry-picked commits separately, producing more a useful output. @@ -51,9 +69,6 @@ Updates since v1.7.5 the tarball generation; snapshot from the same tree should result in a same tarball. - * "git-p4" (in contrib) learned to merge a file that was added on both - branches differently by using 2-way merge. - Also contains various documentation updates and minor miscellaneous changes. @@ -64,43 +79,24 @@ Fixes since v1.7.5 Unless otherwise noted, all the fixes in 1.7.5.X maintenance track are included in this release. - * "git config" used to choke with an insanely long line. - (merge ef/maint-strbuf-init later) + * Setting $(prefix) in config.mak did not affect where etc/gitconfig + file is read from, even though passing it from the command line of + $(MAKE) did. + (merge kk/maint-prefix-in-config-mak later) - * "git diff-files" did not show the mode information from the working - tree side of an unmerged path correctly. - (merge jc/fix-diff-files-unmerged later) + * The bash completion scripts should correctly work using zsh's bash + completion emulation layer now. + (merge either fc/completion-zsh later) - * "git diff -M --cached" used to use unmerged path as a possible rename - source candidate, which made no sense. - (merge mz/maint-rename-unmerged later) - - * "git format-patch" when run with "--quiet" option used to produce a - nonsense result that consists of alternating empty output. - (merge early part of cn/format-patch-quiet later) - - * "git format-patch" did not quote RFC822 special characters in the - email address (e.g From: Junio C. Hamano <jch@example.com>, not - From: "Junio C. Hamano" <jch@example.com>). - (merge jk/format-patch-quote-special-in-from later) - - * "git mergetool" did not handle conflicted submoudules gracefully. - (merge jm/mergetool-submodules later) - - * "git rebase -i -p" failed to preserve the history when there is a - redundant merge created with the --no-ff option. - (merge aw/maint-rebase-i-p-no-ff later) - - * "git stash -p --no-keep-index" and "git stash --no-keep-index -p" now - mean the same thing. - (merge dm/stash-k-i-p later) + * "git config" used to choke with an insanely long line. + (merge ef/maint-strbuf-init later) - * "git upload-pack" (hence "git push" over git native protocol) had a - subtle race condition that could lead to a deadlock. - (merge jk/maint-upload-pack-shallow later) + * "git send-pack" (hence "git push") over smalt-HTTP protocol could + deadlock when the client side pack-object died early. + (merge js/maint-send-pack-stateless-rpc-deadlock-fix later) --- exec >/var/tmp/1 echo O=$(git describe master) -O=v1.7.5.1-216-g3970fc5 +O=v1.7.5.1-339-g254fd97 git shortlog --no-merges ^maint ^$O master diff --git a/Documentation/config.txt b/Documentation/config.txt index c96aec10d8..1a060ecbc8 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1309,9 +1309,11 @@ instaweb.port:: interactive.singlekey:: In interactive commands, allow the user to provide one-letter input with a single key (i.e., without hitting enter). - Currently this is used only by the `\--patch` mode of - linkgit:git-add[1]. Note that this setting is silently - ignored if portable keystroke input is not available. + Currently this is used by the `\--patch` mode of + 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. log.date:: Set the default date-time mode for the 'log' command. diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt index 2b1605f5c8..1aed79e7dc 100644 --- a/Documentation/diff-config.txt +++ b/Documentation/diff-config.txt @@ -8,6 +8,50 @@ diff.autorefreshindex:: affects only 'git diff' Porcelain, and not lower level 'diff' commands such as 'git diff-files'. +diff.dirstat:: + A comma separated list of `--dirstat` parameters specifying the + default behavior of the `--dirstat` option to linkgit:git-diff[1]` + and friends. The defaults can be overridden on the command line + (using `--dirstat=<param1,param2,...>`). The fallback defaults + (when not changed by `diff.dirstat`) are `changes,noncumulative,3`. + The following parameters are available: ++ +-- +`changes`;; + Compute the dirstat numbers by counting the lines that have been + removed from the source, or added to the destination. This ignores + the amount of pure code movements within a file. In other words, + rearranging lines in a file is not counted as much as other changes. + This is the default behavior when no parameter is given. +`lines`;; + Compute the dirstat numbers by doing the regular line-based diff + analysis, and summing the removed/added line counts. (For binary + files, count 64-byte chunks instead, since binary files have no + natural concept of lines). This is a more expensive `--dirstat` + behavior than the `changes` behavior, but it does count rearranged + lines within a file as much as other changes. The resulting output + is consistent with what you get from the other `--*stat` options. +`files`;; + Compute the dirstat numbers by counting the number of files changed. + Each changed file counts equally in the dirstat analysis. This is + the computationally cheapest `--dirstat` behavior, since it does + not have to look at the file contents at all. +`cumulative`;; + Count changes in a child directory for the parent directory as well. + Note that when using `cumulative`, the sum of the percentages + reported may exceed 100%. The default (non-cumulative) behavior can + be specified with the `noncumulative` parameter. +<limit>;; + An integer parameter specifies a cut-off percent (3% by default). + Directories contributing less than this percentage of the changes + are not shown in the output. +-- ++ +Example: The following will count changed files, while ignoring +directories with less than 10% of the total amount of changed files, +and accumulating child directory counts in the parent directories: +`files,10,cumulative`. + diff.external:: If this config variable is set, diff generation is not performed using the internal diff machinery, but using the diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 9ca565d708..c7ed946357 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -66,19 +66,49 @@ endif::git-format-patch[] number of modified files, as well as number of added and deleted lines. ---dirstat[=<limit>]:: - Output the distribution of relative amount of changes (number of lines added or - removed) for each sub-directory. Directories with changes below - a cut-off percent (3% by default) are not shown. The cut-off percent - can be set with `--dirstat=<limit>`. Changes in a child directory are not - counted for the parent directory, unless `--cumulative` is used. +--dirstat[=<param1,param2,...>]:: + Output the distribution of relative amount of changes for each + sub-directory. The behavior of `--dirstat` can be customized by + passing it a comma separated list of parameters. + The defaults are controlled by the `diff.dirstat` configuration + variable (see linkgit:git-config[1]). + The following parameters are available: + -Note that the `--dirstat` option computes the changes while ignoring -the amount of pure code movements within a file. In other words, -rearranging lines in a file is not counted as much as other changes. - ---dirstat-by-file[=<limit>]:: - Same as `--dirstat`, but counts changed files instead of lines. +-- +`changes`;; + Compute the dirstat numbers by counting the lines that have been + removed from the source, or added to the destination. This ignores + the amount of pure code movements within a file. In other words, + rearranging lines in a file is not counted as much as other changes. + This is the default behavior when no parameter is given. +`lines`;; + Compute the dirstat numbers by doing the regular line-based diff + analysis, and summing the removed/added line counts. (For binary + files, count 64-byte chunks instead, since binary files have no + natural concept of lines). This is a more expensive `--dirstat` + behavior than the `changes` behavior, but it does count rearranged + lines within a file as much as other changes. The resulting output + is consistent with what you get from the other `--*stat` options. +`files`;; + Compute the dirstat numbers by counting the number of files changed. + Each changed file counts equally in the dirstat analysis. This is + the computationally cheapest `--dirstat` behavior, since it does + not have to look at the file contents at all. +`cumulative`;; + Count changes in a child directory for the parent directory as well. + Note that when using `cumulative`, the sum of the percentages + reported may exceed 100%. The default (non-cumulative) behavior can + be specified with the `noncumulative` parameter. +<limit>;; + An integer parameter specifies a cut-off percent (3% by default). + Directories contributing less than this percentage of the changes + are not shown in the output. +-- ++ +Example: The following will count changed files, while ignoring +directories with less than 10% of the total amount of changed files, +and accumulating child directory counts in the parent directories: +`--dirstat=files,10,cumulative`. --summary:: Output a condensed summary of extended header information diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index 35cb5d3f64..9c1d395722 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -274,7 +274,8 @@ patch:: This lets you choose one path out of a 'status' like selection. After choosing the path, it presents the diff between the index and the working tree file and asks you if you want to stage - the change of each hunk. You can say: + the change of each hunk. You can select one of the following + options and type return: y - stage this hunk n - do not stage this hunk @@ -293,6 +294,9 @@ patch:: + After deciding the fate for all hunks, if there is any hunk that was chosen, the index is updated with the selected hunks. ++ +You can omit having to type return here, by setting the configuration +variable `interactive.singlekey` to `true`. diff:: diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 1063f69023..c0a96e6c1e 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -12,7 +12,7 @@ SYNOPSIS 'git checkout' [-q] [-f] [-m] [--detach] [<commit>] 'git checkout' [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>] 'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>... -'git checkout' --patch [<tree-ish>] [--] [<paths>...] +'git checkout' [-p|--patch] [<tree-ish>] [--] [<paths>...] DESCRIPTION ----------- @@ -45,7 +45,7 @@ $ git checkout <branch> that is to say, the branch is not reset/created unless "git checkout" is successful. -'git checkout' [--patch] [<tree-ish>] [--] <pathspec>...:: +'git checkout' [-p|--patch] [<tree-ish>] [--] <pathspec>...:: When <paths> or `--patch` are given, 'git checkout' does *not* switch branches. It updates the named paths in the working tree @@ -183,7 +183,8 @@ the conflicted merge in the specified paths. working tree (and if a <tree-ish> was specified, the index). + This means that you can use `git checkout -p` to selectively discard -edits from your current working tree. +edits from your current working tree. See the ``Interactive Mode'' +section of linkgit:git-add[1] to learn how to operate the `\--patch` mode. <branch>:: Branch to checkout; if it refers to a branch (i.e., a name that, diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index d0534b8c05..7951cb7b00 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -8,11 +8,12 @@ git-commit - Record changes to the repository SYNOPSIS -------- [verse] -'git commit' [-a | --interactive] [-s] [-v] [-u<mode>] [--amend] [--dry-run] - [(-c | -C | --fixup | --squash) <commit>] [-F <file> | -m <msg>] - [--reset-author] [--allow-empty] [--allow-empty-message] [--no-verify] - [-e] [--author=<author>] [--date=<date>] [--cleanup=<mode>] - [--status | --no-status] [-i | -o] [--] [<file>...] +'git commit' [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend] + [--dry-run] [(-c | -C | --fixup | --squash) <commit>] + [-F <file> | -m <msg>] [--reset-author] [--allow-empty] + [--allow-empty-message] [--no-verify] [-e] [--author=<author>] + [--date=<date>] [--cleanup=<mode>] [--status | --no-status] + [-i | -o] [--] [<file>...] DESCRIPTION ----------- @@ -39,9 +40,10 @@ The content to be added can be specified in several ways: that have been removed from the working tree, and then perform the actual commit; -5. by using the --interactive switch with the 'commit' command to decide one - by one which files should be part of the commit, before finalizing the - operation. Currently, this is done by invoking 'git add --interactive'. +5. by using the --interactive or --patch switches with the 'commit' command + to decide one by one which files or hunks should be part of the commit, + before finalizing the operation. See the ``Interactive Mode`` section of + linkgit:git-add[1] to learn how to operate these modes. The `--dry-run` option can be used to obtain a summary of what is included by any of the above for the next @@ -59,6 +61,12 @@ OPTIONS been modified and deleted, but new files you have not told git about are not affected. +-p:: +--patch:: + Use the interactive patch selection interface to chose + which changes to commit. See linkgit:git-add[1] for + details. + -C <commit>:: --reuse-message=<commit>:: Take an existing commit object, and reuse the log message diff --git a/Documentation/git-fsck.txt b/Documentation/git-fsck.txt index c9ede794b0..a2a508dc28 100644 --- a/Documentation/git-fsck.txt +++ b/Documentation/git-fsck.txt @@ -26,7 +26,7 @@ index file, all SHA1 references in .git/refs/*, and all reflogs (unless --no-reflogs is given) as heads. --unreachable:: - Print out objects that exist but that aren't readable from any + Print out objects that exist but that aren't reachable from any of the reference nodes. --root:: @@ -76,7 +76,7 @@ It tests SHA1 and general object sanity, and it does full tracking of the resulting reachability and everything else. It prints out any corruption it finds (missing or bad objects), and if you use the '--unreachable' flag it will also print out objects that exist but -that aren't readable from any of the specified head nodes. +that aren't reachable from any of the specified head nodes. So for example diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt index 8481f9db74..b2832fc7eb 100644 --- a/Documentation/git-reset.txt +++ b/Documentation/git-reset.txt @@ -9,7 +9,7 @@ SYNOPSIS -------- [verse] 'git reset' [-q] [<commit>] [--] <paths>... -'git reset' --patch [<commit>] [--] [<paths>...] +'git reset' [--patch|-p] [<commit>] [--] [<paths>...] 'git reset' [--soft | --mixed | --hard | --merge | --keep] [-q] [<commit>] DESCRIPTION @@ -39,8 +39,9 @@ working tree in one go. and <commit> (defaults to HEAD). The chosen hunks are applied in reverse to the index. + -This means that `git reset -p` is the opposite of `git add -p` (see -linkgit:git-add[1]). +This means that `git reset -p` is the opposite of `git add -p`, i.e. +you can use it to selectively reset hunks. See the ``Interactive Mode'' +section of linkgit:git-add[1] to learn how to operate the `\--patch` mode. 'git reset' [--<mode>] [<commit>]:: This form resets the current branch head to <commit> and diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 79abc38e50..15f051fa44 100644 --- a/Documentation/git-stash.txt +++ b/Documentation/git-stash.txt @@ -13,7 +13,7 @@ SYNOPSIS 'git stash' drop [-q|--quiet] [<stash>] 'git stash' ( pop | apply ) [--index] [-q|--quiet] [<stash>] 'git stash' branch <branchname> [<stash>] -'git stash' [save [--patch] [-k|--[no-]keep-index] [-q|--quiet] [<message>]] +'git stash' [save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet] [<message>]] 'git stash' clear 'git stash' create @@ -42,7 +42,7 @@ is also possible). OPTIONS ------- -save [--patch] [--[no-]keep-index] [-q|--quiet] [<message>]:: +save [-p|--patch] [--[no-]keep-index] [-q|--quiet] [<message>]:: Save your local modifications to a new 'stash', and run `git reset --hard` to revert them. The <message> part is optional and gives @@ -54,12 +54,13 @@ save [--patch] [--[no-]keep-index] [-q|--quiet] [<message>]:: If the `--keep-index` option is used, all changes already added to the index are left intact. + -With `--patch`, you can interactively select hunks from in the diff +With `--patch`, you can interactively select hunks from the diff between HEAD and the working tree to be stashed. The stash entry is constructed such that its index state is the same as the index state of your repository, and its worktree contains only the changes you selected interactively. The selected changes are then rolled back -from your worktree. +from your worktree. See the ``Interactive Mode'' section of +linkgit:git-add[1] to learn how to operate the `\--patch` mode. + The `--patch` option implies `--keep-index`. You can use `--no-keep-index` to override this. diff --git a/Documentation/git.txt b/Documentation/git.txt index f1292fc6ce..19d4deff70 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -44,9 +44,10 @@ unreleased) version of git, that is available from 'master' branch of the `git.git` repository. Documentation for older releases are available here: -* link:v1.7.5.1/git.html[documentation for release 1.7.5.1] +* link:v1.7.5.2/git.html[documentation for release 1.7.5.2] * release notes for + link:RelNotes/1.7.5.2.txt[1.7.5.2], link:RelNotes/1.7.5.1.txt[1.7.5.1], link:RelNotes/1.7.5.txt[1.7.5]. diff --git a/Documentation/merge-config.txt b/Documentation/merge-config.txt index 8920258baa..861bd6f553 100644 --- a/Documentation/merge-config.txt +++ b/Documentation/merge-config.txt @@ -16,6 +16,16 @@ merge.defaultToUpstream:: to their corresponding remote tracking branches, and the tips of these tracking branches are merged. +merge.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). + merge.log:: In addition to branch names, populate the log message with at most the specified number of one-line descriptions from the |