diff --git a/.gitattributes b/.gitattributes index 0636deea93..5e98806c6c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,3 @@ * whitespace=!indent,trail,space *.[ch] whitespace=indent,trail,space +*.sh whitespace=indent,trail,space diff --git a/.gitignore b/.gitignore index ac02a580da..8df8f88bea 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /GIT-CFLAGS /GIT-GUI-VARS /GIT-VERSION-FILE +/bin-wrappers/ /git /git-add /git-add--interactive @@ -107,6 +108,10 @@ /git-relink /git-remote /git-remote-curl +/git-remote-http +/git-remote-https +/git-remote-ftp +/git-remote-ftps /git-repack /git-replace /git-repo-config @@ -157,9 +162,11 @@ /test-delta /test-dump-cache-tree /test-genrandom +/test-index-version /test-match-trees /test-parse-options /test-path-utils +/test-run-command /test-sha1 /test-sigchain /common-cmds.h diff --git a/COPYING b/COPYING index 6ff87c4664..536e55524d 100644 --- a/COPYING +++ b/COPYING @@ -22,8 +22,8 @@ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -36,7 +36,7 @@ software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -76,7 +76,7 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @@ -131,7 +131,7 @@ above, provided that you also meet all of these conditions: License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -189,7 +189,7 @@ access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -246,7 +246,7 @@ impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -299,7 +299,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS - + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest @@ -324,10 +324,9 @@ the "copyright" line and a pointer to where the full notice is found. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. @@ -357,5 +356,5 @@ necessary. Here is a sample; alter the names: This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. diff --git a/Documentation/Makefile b/Documentation/Makefile index 4797b2dc35..8a8a3954dc 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -204,7 +204,7 @@ install-pdf: pdf install-html: html '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir) -../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE +../GIT-VERSION-FILE: FORCE $(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) GIT-VERSION-FILE -include ../GIT-VERSION-FILE @@ -337,4 +337,4 @@ quick-install-man: quick-install-html: '$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir) -.PHONY: .FORCE-GIT-VERSION-FILE +.PHONY: FORCE diff --git a/Documentation/RelNotes-1.7.0.txt b/Documentation/RelNotes-1.7.0.txt new file mode 100644 index 0000000000..098e38bc94 --- /dev/null +++ b/Documentation/RelNotes-1.7.0.txt @@ -0,0 +1,191 @@ +Git v1.7.0 Release Notes +======================== + +Notes on behaviour change +------------------------- + + * "git push" into a branch that is currently checked out (i.e. pointed by + HEAD in a repository that is not bare) is refused by default. + + Similarly, "git push $there :$killed" to delete the branch $killed + in a remote repository $there, when $killed branch is the current + branch pointed at by its HEAD, will be refused by default. + + Setting the configuration variables receive.denyCurrentBranch and + receive.denyDeleteCurrent to 'ignore' in the receiving repository + can be used to override these safety features. + + * "git send-email" does not make deep threads by default when sending a + patch series with more than two messages. All messages will be sent + as a reply to the first message, i.e. cover letter. + + It has been possible to configure send-email to send "shallow thread" + by setting sendemail.chainreplyto configuration variable to false. The + only thing this release does is to change the default when you haven't + configured that variable. + + * "git status" is not "git commit --dry-run" anymore. This change does + not affect you if you run the command without pathspec. + + * "git diff" traditionally treated various "ignore whitespace" options + only as a way to filter the patch output. "git diff --exit-code -b" + exited with non-zero status even if all changes were about changing the + ammount of whitespace and nothing else. and "git diff -b" showed the + "diff --git" header line for such a change without patch text. + + In this release, the "ignore whitespaces" options affect the semantics + of the diff operation. A change that does not affect anything but + whitespaces is reported with zero exit status when run with + --exit-code, and there is no "diff --git" header for such a change. + + +Updates since v1.6.6 +-------------------- + +(subsystems) + + * "git fast-import" updates; adds "option" and "feature" to detect the + mismatch between fast-import and the frontends that produce the input + stream. + +(portability) + + * Some more MSVC portability patches for msysgit port. + + * Minimum Pthreads emulation for msysgit port. + +(performance) + + * More performance improvement patches for msysgit port. + +(usability, bells and whistles) + + * More commands learned "--quiet" and "--[no-]progress" options. + + * Various commands given by the end user (e.g. diff.type.textconv, + and GIT_EDITOR) can be specified with command line arguments. E.g. it + is now possible to say "[diff "utf8doc"] textconv = nkf -w". + + * "sparse checkout" feature allows only part of the work tree to be + checked out. + + * HTTP transfer can use authentication scheme other than basic + (i.e./e.g. digest). + + * Switching from a version of superproject that used to have a submodule + to another version of superproject that no longer has it did not remove + the submodule directory when it should (namely, when you are not + interested in the submodule at all and didn't clone/checkout). + + * A new attribute conflict-marker-size can be used to change the size of + the conflict markers from the default 7; this is useful when tracked + contents (e.g. git-merge documentation) have strings that resemble the + conflict markers. + + * A new syntax "@{upstream}" can be used on the command line to + substitute the name of the "upstream" of the branch. Missing branch + defaults to the current branch, so "git fetch && git merge @{upstream}" + will be equivalent to "git pull". + + * "git branch --set-upstream" can be used to update the (surprise!) upstream + i.e. where the branch is supposed to pull and merge from (or rebase onto). + + * "git checkout A...B" is a way to detach HEAD at the merge base between + A and B. + + * "git checkout -m path" to reset the work tree file back into the + conflicted state works even when you already ran "git add path" and + resolved the conflicts. + + * "git commit --date=''" can be used to override the author date + just like "git commit --author=' '" can be used to + override the author identity. + + * "git commit --no-status" can be used to omit the listing of the index + and the work tree status in the editor used to prepare the log message. + + * "git commit" warns a bit more aggressively until you configure user.email, + whose default value almost always is not (and fundamentally cannot be) + what you want. + + * "git difftool" has been extended to make it easier to integrate it + with gitk. + + * "git fetch --all" can now be used in place of "git remote update". + + * "git grep" does not rely on external grep anymore. + + * "git grep" learned "--no-index" option, to search inside contents that + are not managed by git. + + * "git log" and friends learned "--glob=heads/*" syntax that is a more + flexible way to complement "--branches/--tags/--remotes". + + * "git merge" learned to pass options specific to strategy-backends. E.g. + + - "git merge -Xsubtree=path/to/directory" can be used to tell the subtree + strategy how much to shift the trees explicitly. + + - "git merge -Xtheirs" can be used to auto-merge as much as possible, + while discarding your own changes and taking merged version in + conflicted regions. + + * "git push" learned "git push origin --delete branch", a syntactic sugar + for "git push origin :branch". + + * "git push" learned "git push --set-upstream origin forker:forkee" that + lets you configure your "forker" branch to later pull from "forkee" + branch at "origin". + + * "git rebase --onto A...B" means the history is replayed on top of the + merge base between A and B. + + * "git rebase -i" learned new action "fixup", that squashes the change + but does not affect existing log message. + + * "git rebase -i" also learned --autosquash option, that is useful + together with the new "fixup" action. + + * "git remote" learned set-url subcommand, to update (surprise!) url + for an existing remote nickname. + + * "git rerere" learned "forget path" subcommand. Together with "git + checkout -m path" it will be useful when you recorded a wrong + resolution. + + * Use of "git reset --merge" has become easier when resetting away a + conflicted mess left in the work tree. + + * "git rerere" had rerere.autoupdate configuration but there was no way + to countermand it from the command line; --no-rerere-autoupdate option + given to "merge", "revert", etc. fixes this. + + * "git status" learned "-s(hort)" output format. + +(developers) + + * The infrastructure to build foreign SCM interface has been updated. + + * Many more commands are now built-in. + +Fixes since v1.6.6 +------------------ + +All of the fixes in v1.6.6.X maintenance series are included in this +release, unless otherwise noted. + + * "git branch -d branch" used to refuse deleting the branch even when + the branch is fully merged to its upstream branch if it is not merged + to the current branch. It now deletes it in such a case. + + * When "git diff" is asked to compare the work tree with something, + it used to consider that a checked-out submodule with uncommitted + changes is not modified; this could cause people to forget committing + these changes in the submodule before committing in the superproject. + It now considers such a change as a modification. + +-- +exec >/var/tmp/1 +O=v1.6.6.1-434-g3521c1b +echo O=$(git describe master) +git shortlog --no-merges $O..master ^maint diff --git a/Documentation/config.txt b/Documentation/config.txt index f7728ec40c..17901e244a 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -64,7 +64,7 @@ The values following the equals sign in variable assign are all either a string, an integer, or a boolean. Boolean values may be given as yes/no, 0/1, true/false or on/off. Case is not significant in boolean values, when converting value to the canonical form using '--bool' type specifier; -'git-config' will ensure that the output is "true" or "false". +'git config' will ensure that the output is "true" or "false". String values may be entirely or partially enclosed in double quotes. You need to enclose variable values in double quotes if you want to @@ -130,6 +130,14 @@ advice.*:: Advice shown when linkgit:git-merge[1] refuses to merge to avoid overwritting local changes. Default: true. + resolveConflict:: + Advices shown by various commands when conflicts + prevent the operation from being performed. + Default: true. + implicitIdentity:: + Advice on how to set your identity configuration when + your information is guessed from the system username and + domain name. Default: true. -- core.fileMode:: @@ -442,8 +450,8 @@ core.pager:: core.whitespace:: A comma separated list of common whitespace problems to - notice. 'git-diff' will use `color.diff.whitespace` to - highlight them, and 'git-apply --whitespace=error' will + notice. 'git diff' will use `color.diff.whitespace` to + highlight them, and 'git apply --whitespace=error' will consider them as errors. You can prefix `-` to disable any of them (e.g. `-trailing-space`): + @@ -502,8 +510,12 @@ notes should be printed. This setting defaults to "refs/notes/commits", and can be overridden by the `GIT_NOTES_REF` environment variable. +core.sparseCheckout:: + Enable "sparse checkout" feature. See section "Sparse checkout" in + linkgit:git-read-tree[1] for more information. + add.ignore-errors:: - Tells 'git-add' to continue adding files when some files cannot be + Tells 'git add' to continue adding files when some files cannot be added due to indexing errors. Equivalent to the '--ignore-errors' option of linkgit:git-add[1]. @@ -525,19 +537,19 @@ executed from the top-level directory of a repository, which may not necessarily be the current directory. apply.ignorewhitespace:: - When set to 'change', tells 'git-apply' to ignore changes in + When set to 'change', tells 'git apply' to ignore changes in whitespace, in the same way as the '--ignore-space-change' option. - When set to one of: no, none, never, false tells 'git-apply' to + When set to one of: no, none, never, false tells 'git apply' to respect all whitespace differences. See linkgit:git-apply[1]. apply.whitespace:: - Tells 'git-apply' how to handle whitespaces, in the same way + Tells 'git apply' how to handle whitespaces, in the same way as the '--whitespace' option. See linkgit:git-apply[1]. branch.autosetupmerge:: - Tells 'git-branch' and 'git-checkout' to set up new branches + Tells 'git branch' and 'git checkout' to set up new branches so that linkgit:git-pull[1] will appropriately merge from the starting point branch. Note that even if this option is not set, this behavior can be chosen per-branch using the `--track` @@ -548,7 +560,7 @@ branch.autosetupmerge:: branch. This option defaults to true. branch.autosetuprebase:: - When a new branch is created with 'git-branch' or 'git-checkout' + When a new branch is created with 'git branch' or 'git checkout' that tracks another branch, this variable tells git to set up pull to rebase instead of merge (see "branch..rebase"). When `never`, rebase is never automatically set to true. @@ -563,24 +575,24 @@ branch.autosetuprebase:: This option defaults to never. branch..remote:: - When in branch , it tells 'git-fetch' and 'git-push' which + When in branch , it tells 'git fetch' and 'git push' which remote to fetch from/push to. It defaults to `origin` if no remote is configured. `origin` is also used if you are not on any branch. branch..merge:: Defines, together with branch..remote, the upstream branch - for the given branch. It tells 'git-fetch'/'git-pull' which - branch to merge and can also affect 'git-push' (see push.default). - When in branch , it tells 'git-fetch' the default + for the given branch. It tells 'git fetch'/'git pull' which + branch to merge and can also affect 'git push' (see push.default). + When in branch , it tells 'git fetch' the default refspec to be marked for merging in FETCH_HEAD. The value is handled like the remote part of a refspec, and must match a ref which is fetched from the remote given by "branch..remote". - The merge information is used by 'git-pull' (which at first calls - 'git-fetch') to lookup the default branch for merging. Without - this option, 'git-pull' defaults to merge the first refspec fetched. + The merge information is used by 'git pull' (which at first calls + 'git fetch') to lookup the default branch for merging. Without + this option, 'git pull' defaults to merge the first refspec fetched. Specify multiple values to get an octopus merge. - If you wish to setup 'git-pull' so that it merges into from + If you wish to setup 'git pull' so that it merges into from another branch in the local repository, you can point branch..merge to the desired branch, and use the special setting `.` (a period) for branch..remote. @@ -652,14 +664,6 @@ color.grep:: `never`), never. When set to `true` or `auto`, use color only when the output is written to the terminal. Defaults to `false`. -color.grep.external:: - The string value of this variable is passed to an external 'grep' - command as a command line option if match highlighting is turned - on. If set to an empty string, no option is passed at all, - turning off coloring for external 'grep' calls; this is the default. - For GNU grep, set it to `--color=always` to highlight matches even - when a pager is used. - color.grep.match:: Use customized color for matches. The value of this variable may be specified as in color.branch.. It is passed using @@ -673,7 +677,7 @@ color.interactive:: colors only when the output is to the terminal. Defaults to false. color.interactive.:: - Use customized color for 'git-add --interactive' + Use customized color for 'git add --interactive' output. `` may be `prompt`, `header`, `help` or `error`, for four distinct types of normal output from interactive commands. The values of these variables may be specified as @@ -712,20 +716,25 @@ color.ui:: terminal. When more specific variables of color.* are set, they always take precedence over this setting. Defaults to false. +commit.status:: + A boolean to enable/disable inclusion of status information in the + commit message template when using an editor to prepare the commit + message. Defaults to true. + commit.template:: Specify a file to use as the template for new commit messages. "{tilde}/" is expanded to the value of `$HOME` and "{tilde}user/" to the specified user's home directory. diff.autorefreshindex:: - When using 'git-diff' to compare with work tree + When using 'git diff' to compare with work tree files, do not consider stat-only change as changed. Instead, silently run `git update-index --refresh` to update the cached stat information for paths whose contents in the work tree match the contents in the index. This option defaults to true. Note that this - affects only 'git-diff' Porcelain, and not lower level - 'diff' commands such as 'git-diff-files'. + affects only 'git diff' Porcelain, and not lower level + 'diff' commands such as 'git diff-files'. diff.external:: If this config variable is set, diff generation is not @@ -737,24 +746,24 @@ diff.external:: your files, you might want to use linkgit:gitattributes[5] instead. diff.mnemonicprefix:: - If set, 'git-diff' uses a prefix pair that is different from the + If set, 'git diff' uses a prefix pair that is different from the standard "a/" and "b/" depending on what is being compared. When this configuration is in effect, reverse diff output also swaps the order of the prefixes: -'git-diff';; +`git diff`;; compares the (i)ndex and the (w)ork tree; -'git-diff HEAD';; +`git diff HEAD`;; compares a (c)ommit and the (w)ork tree; -'git diff --cached';; +`git diff --cached`;; compares a (c)ommit and the (i)ndex; -'git-diff HEAD:file1 file2';; +`git diff HEAD:file1 file2`;; compares an (o)bject and a (w)ork tree entity; -'git diff --no-index a b';; +`git diff --no-index a b`;; compares two non-git things (1) and (2). diff.renameLimit:: The number of files to consider when performing the copy/rename - detection; equivalent to the 'git-diff' option '-l'. + detection; equivalent to the 'git diff' option '-l'. diff.renames:: Tells git to detect renames. If set to any boolean value, it @@ -840,7 +849,7 @@ format.pretty:: linkgit:git-whatchanged[1]. format.thread:: - The default threading style for 'git-format-patch'. Can be + The default threading style for 'git format-patch'. Can be a boolean value, or `shallow` or `deep`. `shallow` threading makes every mail a reply to the head of the series, where the head is chosen from the cover letter, the @@ -858,7 +867,7 @@ format.signoff:: gc.aggressiveWindow:: The window size parameter used in the delta compression - algorithm used by 'git-gc --aggressive'. This defaults + algorithm used by 'git gc --aggressive'. This defaults to 10. gc.auto:: @@ -878,33 +887,33 @@ gc.packrefs:: Running `git pack-refs` in a repository renders it unclonable by Git versions prior to 1.5.1.2 over dumb transports such as HTTP. This variable determines whether - 'git gc' runs `git pack-refs`. This can be set to "nobare" + 'git gc' runs `git pack-refs`. This can be set to `nobare` to enable it within all non-bare repos or it can be set to a boolean value. The default is `true`. gc.pruneexpire:: - When 'git-gc' is run, it will call 'prune --expire 2.weeks.ago'. + When 'git gc' is run, it will call 'prune --expire 2.weeks.ago'. Override the grace period with this config variable. The value "now" may be used to disable this grace period and always prune unreachable objects immediately. gc.reflogexpire:: - 'git-reflog expire' removes reflog entries older than + 'git reflog expire' removes reflog entries older than this time; defaults to 90 days. gc.reflogexpireunreachable:: - 'git-reflog expire' removes reflog entries older than + 'git reflog expire' removes reflog entries older than this time and are not reachable from the current tip; defaults to 30 days. gc.rerereresolved:: Records of conflicted merge you resolved earlier are - kept for this many days when 'git-rerere gc' is run. + kept for this many days when 'git rerere gc' is run. The default is 60 days. See linkgit:git-rerere[1]. gc.rerereunresolved:: Records of conflicted merge you have not resolved are - kept for this many days when 'git-rerere gc' is run. + kept for this many days when 'git rerere gc' is run. The default is 15 days. See linkgit:git-rerere[1]. gitcvs.commitmsgannotation:: @@ -1012,7 +1021,7 @@ gui.spellingdictionary:: off. gui.fastcopyblame:: - If true, 'git gui blame' uses '-C' instead of '-C -C' for original + If true, 'git gui blame' uses `-C` instead of `-C -C` for original location detection. It makes blame significantly faster on huge repositories at the expense of less thorough copy detection. @@ -1136,6 +1145,12 @@ http.maxRequests:: How many HTTP requests to launch in parallel. Can be overridden by the 'GIT_HTTP_MAX_REQUESTS' environment variable. Default is 5. +http.minSessions:: + The number of curl sessions (counted across slots) to be kept across + requests. They will not be ended with curl_easy_cleanup() until + http_cleanup() is invoked. If USE_CURL_MULTI is not defined, this + value will be capped at 1. Defaults to 1. + http.postBuffer:: Maximum size in bytes of the buffer used by smart HTTP transports when POSTing data to the remote system. @@ -1165,7 +1180,7 @@ i18n.commitEncoding:: i18n.logOutputEncoding:: Character encoding the commit messages are converted to when - running 'git-log' and friends. + running 'git log' and friends. imap:: The configuration variables in the 'imap' section are described @@ -1199,7 +1214,7 @@ interactive.singlekey:: log.date:: Set default date-time mode for the log command. Setting log.date - value is similar to using 'git-log'\'s --date option. The value is one of the + value is similar to using 'git log'\'s --date option. The value is one of the following alternatives: {relative,local,default,iso,rfc,short}. See linkgit:git-log[1]. @@ -1465,6 +1480,10 @@ remote..tagopt:: Setting this value to \--no-tags disables automatic tag following when fetching from remote +remote..vcs:: + Setting this to a value will cause git to interact with + the remote with the git-remote- helper. + remotes.:: The list of remotes which are fetched by "git remote update ". See linkgit:git-remote[1]. diff --git a/Documentation/date-formats.txt b/Documentation/date-formats.txt new file mode 100644 index 0000000000..c000f08a9d --- /dev/null +++ b/Documentation/date-formats.txt @@ -0,0 +1,26 @@ +DATE FORMATS +------------ + +The GIT_AUTHOR_DATE, GIT_COMMITTER_DATE environment variables +ifdef::git-commit[] +and the `--date` option +endif::git-commit[] +support the following date formats: + +Git internal format:: + It is ` `, where `` is the number of seconds since the UNIX epoch. + `` is a positive or negative offset from UTC. + For example CET (which is 2 hours ahead UTC) is `+0200`. + +RFC 2822:: + The standard email format as described by RFC 2822, for example + `Thu, 07 Apr 2005 22:13:13 +0200`. + +ISO 8601:: + Time and date specified by the ISO 8601 standard, for example + `2005-04-07T22:13:13`. The parser accepts a space instead of the + `T` character as well. ++ +NOTE: In addition, the date part is accepted in the following formats: +`YYYY.MM.DD`, `MM/DD/YYYY` and `DD.MM.YYYY`. diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index ab6419fe6e..fe716b2e42 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -19,7 +19,7 @@ endif::git-pull[] -f:: --force:: - When 'git-fetch' is used with `:` + When 'git fetch' is used with `:` refspec, it refuses to update the local branch `` unless the remote branch `` it fetches is a descendant of ``. This option @@ -61,16 +61,16 @@ endif::git-pull[] -u:: --update-head-ok:: - By default 'git-fetch' refuses to update the head which + By default 'git fetch' refuses to update the head which corresponds to the current branch. This flag disables the - check. This is purely for the internal use for 'git-pull' - to communicate with 'git-fetch', and unless you are + check. This is purely for the internal use for 'git pull' + to communicate with 'git fetch', and unless you are implementing your own Porcelain you are not supposed to use it. --upload-pack :: When given, and the repository to fetch from is handled - by 'git-fetch-pack', '--exec=' is passed to + by 'git fetch-pack', '--exec=' is passed to the command to specify non-default path for the command run on the other end. diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index 1f1b19996b..f74fcf3737 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -39,7 +39,7 @@ The `git add` command will not add ignored files by default. If any ignored files were explicitly specified on the command line, `git add` will fail with a list of ignored files. Ignored files reached by directory recursion or filename globbing performed by Git (quote your -globs before the shell) will be silently ignored. The `add` command can +globs before the shell) will be silently ignored. The 'git add' command can be used to add ignored files with the `-f` (force) option. Please see linkgit:git-commit[1] for alternative ways to add content to a diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 67ad5da9cc..c3e4f12c44 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -37,7 +37,7 @@ OPTIONS -k:: --keep:: - Pass `-k` flag to 'git-mailinfo' (see linkgit:git-mailinfo[1]). + Pass `-k` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]). -c:: --scissors:: @@ -53,7 +53,7 @@ OPTIONS -u:: --utf8:: - Pass `-u` flag to 'git-mailinfo' (see linkgit:git-mailinfo[1]). + Pass `-u` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]). The proposed commit log message taken from the e-mail is re-coded into UTF-8 encoding (configuration variable `i18n.commitencoding` can be used to specify project's @@ -63,7 +63,7 @@ This was optional in prior versions of git, but now it is the default. You can use `--no-utf8` to override this. --no-utf8:: - Pass `-n` flag to 'git-mailinfo' (see + Pass `-n` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]). -3:: @@ -81,7 +81,7 @@ default. You can use `--no-utf8` to override this. -p:: --directory=:: --reject:: - These flags are passed to the 'git-apply' (see linkgit:git-apply[1]) + These flags are passed to the 'git apply' (see linkgit:git-apply[1]) program that applies the patch. @@ -121,7 +121,7 @@ default. You can use `--no-utf8` to override this. to the screen before exiting. This overrides the standard message informing you to use `--resolved` or `--skip` to handle the failure. This is solely - for internal use between 'git-rebase' and 'git-am'. + for internal use between 'git rebase' and 'git am'. --abort:: Restore the original branch and abort the patching operation. diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index c2528a7654..8463439ac5 100644 --- a/Documentation/git-apply.txt +++ b/Documentation/git-apply.txt @@ -69,7 +69,7 @@ OPTIONS without using the working tree. This implies `--index`. --build-fake-ancestor=:: - Newer 'git-diff' output has embedded 'index information' + Newer 'git diff' output has embedded 'index information' for each blob to help identify the original version that the patch applies to. When this flag is given, and if the original versions of the blobs are available locally, @@ -83,7 +83,7 @@ the information is read from the current index instead. Apply the patch in reverse. --reject:: - For atomicity, 'git-apply' by default fails the whole patch and + For atomicity, 'git apply' by default fails the whole patch and does not touch the working tree when some of the hunks do not apply. This option makes it apply the parts of the patch that are applicable, and leave the @@ -109,7 +109,7 @@ any of those replacements occurred. ever ignored. --unidiff-zero:: - By default, 'git-apply' expects that the patch being + By default, 'git apply' expects that the patch being applied is a unified diff with at least one line of context. This provides good safety measures, but breaks down when applying a diff generated with `--unified=0`. To bypass these @@ -120,7 +120,7 @@ discouraged. --apply:: If you use any of the options marked "Turns off - 'apply'" above, 'git-apply' reads and outputs the + 'apply'" above, 'git apply' reads and outputs the requested information without actually applying the patch. Give this flag after those flags to also apply the patch. @@ -229,7 +229,7 @@ apply.whitespace:: Submodules ---------- -If the patch contains any changes to submodules then 'git-apply' +If the patch contains any changes to submodules then 'git apply' treats these changes as follows. If `--index` is specified (explicitly or implicitly), then the submodule diff --git a/Documentation/git-archimport.txt b/Documentation/git-archimport.txt index c7a6e3ec05..4d4325f222 100644 --- a/Documentation/git-archimport.txt +++ b/Documentation/git-archimport.txt @@ -29,17 +29,17 @@ branches that have different roots, it will refuse to run. In that case, edit your parameters to define clearly the scope of the import. -'git-archimport' uses `tla` extensively in the background to access the +'git archimport' uses `tla` extensively in the background to access the Arch repository. Make sure you have a recent version of `tla` available in the path. `tla` must -know about the repositories you pass to 'git-archimport'. +know about the repositories you pass to 'git archimport'. -For the initial import, 'git-archimport' expects to find itself in an empty +For the initial import, 'git archimport' expects to find itself in an empty directory. To follow the development of a project that uses Arch, rerun -'git-archimport' with the same parameters as the initial import to perform +'git archimport' with the same parameters as the initial import to perform incremental imports. -While 'git-archimport' will try to create sensible branch names for the +While 'git archimport' will try to create sensible branch names for the archives that it imports, it is also possible to specify git branch names manually. To do so, write a git branch name after each parameter, separated by a colon. This way, you can shorten the Arch @@ -84,7 +84,7 @@ OPTIONS -o:: Use this for compatibility with old-style branch names used by - earlier versions of 'git-archimport'. Old-style branch names + earlier versions of 'git archimport'. Old-style branch names were category--branch, whereas new-style branch names are archive,category--branch--version. In both cases, names given on the command-line will override the automatically-generated diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt index e57979198b..799c8b64bd 100644 --- a/Documentation/git-archive.txt +++ b/Documentation/git-archive.txt @@ -21,13 +21,13 @@ structure for the named tree, and writes it out to the standard output. If is specified it is prepended to the filenames in the archive. -'git-archive' behaves differently when given a tree ID versus when +'git archive' behaves differently when given a tree ID versus when given a commit ID or tag ID. In the first case the current time is used as the modification time of each file in the archive. In the latter case the commit time as recorded in the referenced commit object is used instead. Additionally the commit ID is stored in a global extended pax header if the tar format is used; it can be extracted -using 'git-get-tar-commit-id'. In ZIP files it is stored as a file +using 'git get-tar-commit-id'. In ZIP files it is stored as a file comment. OPTIONS diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt index b786471dd8..a27f43950f 100644 --- a/Documentation/git-blame.txt +++ b/Documentation/git-blame.txt @@ -21,7 +21,7 @@ last modified the line. Optionally, start annotating from the given revision. The command can also limit the range of lines annotated. The report does not tell you anything about lines which have been deleted or -replaced; you need to use a tool such as 'git-diff' or the "pickaxe" +replaced; you need to use a tool such as 'git diff' or the "pickaxe" interface briefly mentioned in the following paragraph. Apart from supporting file annotation, git also supports searching the @@ -49,7 +49,7 @@ include::blame-options.txt[] file (see `-M`). The first number listed is the score. This is the number of alphanumeric characters detected as having been moved between or within files. This must be above - a certain threshold for 'git-blame' to consider those lines + a certain threshold for 'git blame' to consider those lines of code to have been moved. -f:: @@ -100,7 +100,7 @@ header elements later. SPECIFYING RANGES ----------------- -Unlike 'git-blame' and 'git-annotate' in older versions of git, the extent +Unlike 'git blame' and 'git annotate' in older versions of git, the extent of the annotation can be limited to both line ranges and revision ranges. When you are interested in finding the origin for lines 40-60 for file `foo`, you can use the `-L` option like so @@ -118,7 +118,7 @@ which limits the annotation to the body of the `hello` subroutine. When you are not interested in changes older than version v2.6.18, or changes older than 3 weeks, you can use revision -range specifiers similar to 'git-rev-list': +range specifiers similar to 'git rev-list': git blame v2.6.18.. -- foo git blame --since=3.weeks -- foo diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 0e836809c2..6b6c3da2d9 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -11,7 +11,7 @@ SYNOPSIS 'git branch' [--color | --no-color] [-r | -a] [-v [--abbrev= | --no-abbrev]] [(--merged | --no-merged | --contains) []] -'git branch' [--track | --no-track] [-l] [-f] [] +'git branch' [--set-upstream | --track | --no-track] [-l] [-f] [] 'git branch' (-m | -M) [] 'git branch' (-d | -D) [-r] ... @@ -38,7 +38,7 @@ working tree to it; use "git checkout " to switch to the new branch. When a local branch is started off a remote branch, git sets up the -branch so that 'git-pull' will appropriately merge from +branch so that 'git pull' will appropriately merge from the remote branch. This behavior may be changed via the global `branch.autosetupmerge` configuration flag. That setting can be overridden by using the `--track` and `--no-track` options. @@ -55,7 +55,7 @@ has a reflog then the reflog will also be deleted. Use -r together with -d to delete remote-tracking branches. Note, that it only makes sense to delete remote-tracking branches if they no longer exist -in the remote repository or if 'git-fetch' was configured not to fetch +in the remote repository or if 'git fetch' was configured not to fetch them again. See also the 'prune' subcommand of linkgit:git-remote[1] for a way to clean up all obsolete remote-tracking branches. @@ -76,7 +76,7 @@ OPTIONS -f:: --force:: Reset to if exists - already. Without `-f` 'git-branch' refuses to change an existing branch. + already. Without `-f` 'git branch' refuses to change an existing branch. -m:: Move/rename a branch and the corresponding reflog. @@ -129,6 +129,12 @@ start-point is either a local or remote branch. Do not set up "upstream" configuration, even if the branch.autosetupmerge configuration variable is true. +--set-upstream:: + If specified branch does not exist yet or if '--force' has been + given, acts exactly like '--track'. Otherwise sets up configuration + like '--track' would when creating the branch, except that where + branch points to is not changed. + --contains :: Only list branches which contain the specified commit. diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt index c3a066e60c..a5ed8fb05b 100644 --- a/Documentation/git-bundle.txt +++ b/Documentation/git-bundle.txt @@ -21,9 +21,9 @@ Some workflows require that one or more branches of development on one machine be replicated on another machine, but the two machines cannot be directly connected, and therefore the interactive git protocols (git, ssh, rsync, http) cannot be used. This command provides support for -'git-fetch' and 'git-pull' to operate by packaging objects and references +'git fetch' and 'git pull' to operate by packaging objects and references in an archive at the originating machine, then importing those into -another repository using 'git-fetch' and 'git-pull' +another repository using 'git fetch' and 'git pull' after moving the archive by some means (e.g., by sneakernet). As no direct connection between the repositories exists, the user must specify a basis for the bundle that is held by the destination repository: the @@ -35,14 +35,14 @@ OPTIONS create :: Used to create a bundle named 'file'. This requires the - 'git-rev-list' arguments to define the bundle contents. + 'git rev-list' arguments to define the bundle contents. verify :: Used to check that a bundle file is valid and will apply cleanly to the current repository. This includes checks on the bundle format itself as well as checking that the prerequisite commits exist and are fully linked in the current repository. - 'git-bundle' prints a list of missing commits, if any, and exits + 'git bundle' prints a list of missing commits, if any, and exits with a non-zero status. list-heads :: @@ -51,15 +51,15 @@ list-heads :: printed out. unbundle :: - Passes the objects in the bundle to 'git-index-pack' + Passes the objects in the bundle to 'git index-pack' for storage in the repository, then prints the names of all defined references. If a list of references is given, only references matching those in the list are printed. This command is - really plumbing, intended to be called only by 'git-fetch'. + really plumbing, intended to be called only by 'git fetch'. [git-rev-list-args...]:: - A list of arguments, acceptable to 'git-rev-parse' and - 'git-rev-list', that specifies the specific objects and references + A list of arguments, acceptable to 'git rev-parse' and + 'git rev-list', that specifies the specific objects and references to transport. For example, `master\~10..master` causes the current master reference to be packaged along with all objects added since its 10th ancestor commit. There is no explicit @@ -69,16 +69,16 @@ unbundle :: [refname...]:: A list of references used to limit the references reported as - available. This is principally of use to 'git-fetch', which + available. This is principally of use to 'git fetch', which expects to receive only those references asked for and not - necessarily everything in the pack (in this case, 'git-bundle' acts - like 'git-fetch-pack'). + necessarily everything in the pack (in this case, 'git bundle' acts + like 'git fetch-pack'). SPECIFYING REFERENCES --------------------- -'git-bundle' will only package references that are shown by -'git-show-ref': this includes heads, tags, and remote heads. References +'git bundle' will only package references that are shown by +'git show-ref': this includes heads, tags, and remote heads. References such as `master\~1` cannot be packaged, but are perfectly suitable for defining the basis. More than one reference may be packaged, and more than one basis can be specified. The objects packaged are those not diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt index 0aeef24780..d9a3326f58 100644 --- a/Documentation/git-check-ref-format.txt +++ b/Documentation/git-check-ref-format.txt @@ -60,7 +60,7 @@ reference name expressions (see linkgit:git-rev-parse[1]): . A colon `:` is used as in `srcref:dstref` to mean "use srcref\'s value and store it in dstref" in fetch and push operations. It may also be used to select a specific object such as with - 'git-cat-file': "git cat-file blob v1.3.3:refs.c". + 'git cat-file': "git cat-file blob v1.3.3:refs.c". . at-open-brace `@{` is used as a notation to access a reflog entry. diff --git a/Documentation/git-checkout-index.txt b/Documentation/git-checkout-index.txt index 62d84836b8..d6aa6e14eb 100644 --- a/Documentation/git-checkout-index.txt +++ b/Documentation/git-checkout-index.txt @@ -88,7 +88,7 @@ $ find . -name '*.h' -print0 | xargs -0 git checkout-index -f -- which will force all existing `*.h` files to be replaced with their cached copies. If an empty command line implied "all", then this would force-refresh everything in the index, which was not the point. But -since 'git-checkout-index' accepts --stdin it would be faster to use: +since 'git checkout-index' accepts --stdin it would be faster to use: ---------------- $ find . -name '*.h' -print0 | git checkout-index -f -z --stdin @@ -102,7 +102,7 @@ Using `--` is probably a good policy in scripts. Using --temp or --stage=all --------------------------- When `--temp` is used (or implied by `--stage=all`) -'git-checkout-index' will create a temporary file for each index +'git checkout-index' will create a temporary file for each index entry being checked out. The index will not be updated with stat information. These options can be useful if the caller needs all stages of all unmerged entries so that the unmerged files can be @@ -147,9 +147,9 @@ To update and refresh only the files already checked out:: $ git checkout-index -n -f -a && git update-index --ignore-missing --refresh ---------------- -Using 'git-checkout-index' to "export an entire tree":: +Using 'git checkout-index' to "export an entire tree":: The prefix ability basically makes it trivial to use - 'git-checkout-index' as an "export as tree" function. + 'git checkout-index' as an "export as tree" function. Just read the desired tree into the index, and do: + ---------------- diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt index b764130d26..78f4714da0 100644 --- a/Documentation/git-cherry-pick.txt +++ b/Documentation/git-cherry-pick.txt @@ -24,7 +24,7 @@ OPTIONS -e:: --edit:: - With this option, 'git-cherry-pick' will let you edit the commit + With this option, 'git cherry-pick' will let you edit the commit message prior to committing. -x:: diff --git a/Documentation/git-cherry.txt b/Documentation/git-cherry.txt index 7deefdae8f..fed115acd0 100644 --- a/Documentation/git-cherry.txt +++ b/Documentation/git-cherry.txt @@ -14,7 +14,7 @@ DESCRIPTION The changeset (or "diff") of each commit between the fork-point and is compared against each commit between the fork-point and . The commits are compared with their 'patch id', obtained from -the 'git-patch-id' program. +the 'git patch-id' program. Every commit that doesn't exist in the branch has its id (sha1) reported, prefixed by a symbol. The ones that have @@ -37,8 +37,8 @@ to and including are not reported: \__*__*____-__+__> -Because 'git-cherry' compares the changeset rather than the commit id -(sha1), you can use 'git-cherry' to find out if a commit you made locally +Because 'git cherry' compares the changeset rather than the commit id +(sha1), you can use 'git cherry' to find out if a commit you made locally has been applied under a different commit id. For example, this will happen if you're feeding patches via email rather than pushing or pulling commits directly. diff --git a/Documentation/git-citool.txt b/Documentation/git-citool.txt index 670cb02b6c..fb2753c97e 100644 --- a/Documentation/git-citool.txt +++ b/Documentation/git-citool.txt @@ -14,9 +14,9 @@ DESCRIPTION A Tcl/Tk based graphical interface to review modified files, stage them into the index, enter a commit message and record the new commit onto the current branch. This interface is an alternative -to the less interactive 'git-commit' program. +to the less interactive 'git commit' program. -'git-citool' is actually a standard alias for `git gui citool`. +'git citool' is actually a standard alias for `git gui citool`. See linkgit:git-gui[1] for more details. Author diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt index 9d291bdd26..335c885bb7 100644 --- a/Documentation/git-clean.txt +++ b/Documentation/git-clean.txt @@ -34,7 +34,7 @@ OPTIONS -f:: --force:: If the git configuration specifies clean.requireForce as true, - 'git-clean' will refuse to run unless given -f or -n. + 'git clean' will refuse to run unless given -f or -n. -n:: --dry-run:: @@ -48,7 +48,7 @@ OPTIONS -x:: Don't use the ignore rules. This allows removing all untracked files, including build products. This can be used (possibly in - conjunction with 'git-reset') to create a pristine + conjunction with 'git reset') to create a pristine working directory to test a clean build. -X:: diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 7ccd742a87..f43c8b2c08 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -96,13 +96,19 @@ objects from the source repository into a pack in the cloned repository. --quiet:: -q:: - Operate quietly. This flag is also passed to the `rsync' + Operate quietly. Progress is not reported to the standard + error stream. This flag is also passed to the `rsync' command when given. --verbose:: -v:: - Display the progress bar, even in case the standard output is not - a terminal. + Run verbosely. + +--progress:: + Progress status is reported on the standard error stream + by default when it is attached to a terminal, unless -q + is specified. This flag forces progress status even if the + standard error stream is not directed to a terminal. --no-checkout:: -n:: diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt index b8834baced..61888547a1 100644 --- a/Documentation/git-commit-tree.txt +++ b/Documentation/git-commit-tree.txt @@ -70,9 +70,10 @@ is taken from the configuration items user.name and user.email, or, if not present, system user name and fully qualified hostname. A commit comment is read from stdin. If a changelog -entry is not provided via "<" redirection, 'git-commit-tree' will just wait +entry is not provided via "<" redirection, 'git commit-tree' will just wait for one to be entered and terminated with ^D. +include::date-formats.txt[] Diagnostics ----------- diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index d227cec9ba..e99bb14754 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -11,7 +11,8 @@ SYNOPSIS 'git commit' [-a | --interactive] [-s] [-v] [-u] [--amend] [--dry-run] [(-c | -C) ] [-F | -m ] [--reset-author] [--allow-empty] [--no-verify] [-e] [--author=] - [--cleanup=] [--] [[-i | -o ]...] + [--date=] [--cleanup=] [--status | --no-status] [--] + [[-i | -o ]...] DESCRIPTION ----------- @@ -20,11 +21,11 @@ with a log message from the user describing the changes. The content to be added can be specified in several ways: -1. by using 'git-add' to incrementally "add" changes to the +1. by using 'git add' to incrementally "add" changes to the index before using the 'commit' command (Note: even modified files must be "added"); -2. by using 'git-rm' to remove files from the working tree +2. by using 'git rm' to remove files from the working tree and the index, again before using the 'commit' command; 3. by listing files as arguments to the 'commit' command, in which @@ -40,14 +41,14 @@ The content to be added can be specified in several ways: 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'. + operation. Currently, this is done by invoking 'git add --interactive'. The `--dry-run` option can be used to obtain a summary of what is included by any of the above for the next commit by giving the same set of parameters (options and paths). If you make a commit and then find a mistake immediately after -that, you can recover from it with 'git-reset'. +that, you can recover from it with 'git reset'. OPTIONS @@ -74,6 +75,20 @@ OPTIONS authorship of the resulting commit now belongs of the committer. This also renews the author timestamp. +--short:: + When doing a dry-run, give the output in the short-format. See + linkgit:git-status[1] for details. Implies `--dry-run`. + +--porcelain:: + When doing a dry-run, give the output in a porcelain-ready + format. See linkgit:git-status[1] for details. Implies + `--dry-run`. + +-z:: + When showing `short` or `porcelain` status output, terminate + entries in the status output with NUL, instead of LF. If no + format is given, implies the `--porcelain` output format. + -F :: --file=:: Take the commit message from the given file. Use '-' to @@ -85,6 +100,9 @@ OPTIONS an existing commit that matches the given string and its author name is used. +--date=:: + Override the author date used in the commit. + -m :: --message=:: Use the given as the commit message. @@ -167,7 +185,7 @@ FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].) Make a commit only from the paths specified on the command line, disregarding any contents that have been staged so far. This is the default mode of operation of - 'git-commit' if any paths are given on the command line, + 'git commit' if any paths are given on the command line, in which case this option can be omitted. If this option is specified together with '--amend', then no paths need to be specified, which can be used to amend @@ -207,6 +225,17 @@ specified. to be committed, paths with local changes that will be left uncommitted and paths that are untracked. +--status:: + Include the output of linkgit:git-status[1] in the commit + message template when using an editor to prepare the commit + message. Defaults to on, but can be used to override + configuration variable commit.status. + +--no-status:: + Do not include the output of linkgit:git-status[1] in the + commit message template when using an editor to prepare the + default commit message. + \--:: Do not interpret any more arguments as options. @@ -217,15 +246,17 @@ specified. these files are also staged for the next commit on top of what have been staged before. +:git-commit: 1 +include::date-formats.txt[] EXAMPLES -------- When recording your own work, the contents of modified files in your working tree are temporarily stored to a staging area -called the "index" with 'git-add'. A file can be +called the "index" with 'git add'. A file can be reverted back, only in the index but not in the working tree, to that of the last commit with `git reset HEAD -- `, -which effectively reverts 'git-add' and prevents the changes to +which effectively reverts 'git add' and prevents the changes to this file from participating in the next commit. After building the state to be committed incrementally with these commands, `git commit` (without any pathname parameter) is used to record what @@ -281,13 +312,13 @@ $ git commit this second commit would record the changes to `hello.c` and `hello.h` as expected. -After a merge (initiated by 'git-merge' or 'git-pull') stops +After a merge (initiated by 'git merge' or 'git pull') stops because of conflicts, cleanly merged paths are already staged to be committed for you, and paths that conflicted are left in unmerged state. You would have to first -check which paths are conflicting with 'git-status' +check which paths are conflicting with 'git status' and after fixing them manually in your working tree, you would -stage the result as usual with 'git-add': +stage the result as usual with 'git add': ------------ $ git status | grep unmerged diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index f68b198205..543dd64a46 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@ -37,11 +37,12 @@ existing values that match the regexp are updated or unset. If you want to handle the lines that do *not* match the regex, just prepend a single exclamation mark in front (see also <>). -The type specifier can be either '--int' or '--bool', which will make -'git-config' ensure that the variable(s) are of the given type and +The type specifier can be either '--int' or '--bool', to make +'git config' ensure that the variable(s) are of the given type and convert the value to the canonical form (simple decimal number for int, -a "true" or "false" string for bool). If no type specifier is passed, -no checks or transformations are performed on the value. +a "true" or "false" string for bool), or '--path', which does some +path expansion (see '--path' below). If no type specifier is passed, no +checks or transformations are performed on the value. The file-option can be one of '--system', '--global' or '--file' which specify where the values will be read from or written to. @@ -124,18 +125,25 @@ See also <>. List all variables set in config file. --bool:: - 'git-config' will ensure that the output is "true" or "false" + 'git config' will ensure that the output is "true" or "false" --int:: - 'git-config' will ensure that the output is a simple + 'git config' will ensure that the output is a simple decimal number. An optional value suffix of 'k', 'm', or 'g' in the config file will cause the value to be multiplied by 1024, 1048576, or 1073741824 prior to output. --bool-or-int:: - 'git-config' will ensure that the output matches the format of + 'git config' will ensure that the output matches the format of either --bool or --int, as described above. +--path:: + 'git-config' will expand leading '{tilde}' to the value of + '$HOME', and '{tilde}user' to the home directory for the + specified user. This option has no effect when setting the + value (but you can use 'git config bla {tilde}/' from the + command line to let your shell do the expansion). + -z:: --null:: For all options that output values and/or keys, always @@ -173,7 +181,7 @@ FILES ----- If not set explicitly with '--file', there are three files where -'git-config' will search for configuration options: +'git config' will search for configuration options: $GIT_DIR/config:: Repository specific configuration file. (The filename is @@ -190,12 +198,12 @@ $(prefix)/etc/gitconfig:: If no further options are given, all reading options will read all of these files that are available. If the global or the system-wide configuration file are not available they will be ignored. If the repository configuration -file is not available or readable, 'git-config' will exit with a non-zero +file is not available or readable, 'git config' will exit with a non-zero error code. However, in neither case will an error message be issued. All writing options will per default write to the repository specific configuration file. Note that this also affects options like '--replace-all' -and '--unset'. *'git-config' will only ever change one file at a time*. +and '--unset'. *'git config' will only ever change one file at a time*. You can override these rules either by command line options or by environment variables. The '--global' and the '--system' options will limit the file used diff --git a/Documentation/git-cvsexportcommit.txt b/Documentation/git-cvsexportcommit.txt index abaaf273bb..b2696efae9 100644 --- a/Documentation/git-cvsexportcommit.txt +++ b/Documentation/git-cvsexportcommit.txt @@ -27,7 +27,7 @@ by default. Supports file additions, removals, and commits that affect binary files. -If the commit is a merge commit, you must tell 'git-cvsexportcommit' what +If the commit is a merge commit, you must tell 'git cvsexportcommit' what parent the changeset should be done against. OPTIONS diff --git a/Documentation/git-cvsimport.txt b/Documentation/git-cvsimport.txt index 614e769f4e..ddfcb3d143 100644 --- a/Documentation/git-cvsimport.txt +++ b/Documentation/git-cvsimport.txt @@ -28,9 +28,9 @@ At least version 2.1 is required. Please see the section <> for further reference. You should *never* do any work of your own on the branches that are -created by 'git-cvsimport'. By default initial import will create and populate a +created by 'git cvsimport'. By default initial import will create and populate a "master" branch from the CVS repository's main branch which you're free -to work with; after that, you need to 'git-merge' incremental imports, or +to work with; after that, you need to 'git merge' incremental imports, or any CVS branches, yourself. It is advisable to specify a named remote via -r to separate and protect the incoming branches. @@ -49,13 +49,13 @@ OPTIONS -d :: The root of the CVS archive. May be local (a simple path) or remote; currently, only the :local:, :ext: and :pserver: access methods - are supported. If not given, 'git-cvsimport' will try to read it + are supported. If not given, 'git cvsimport' will try to read it from `CVS/Root`. If no such file exists, it checks for the `CVSROOT` environment variable. :: The CVS module you want to import. Relative to . - If not given, 'git-cvsimport' tries to read it from + If not given, 'git cvsimport' tries to read it from `CVS/Repository`. -C :: @@ -65,14 +65,14 @@ OPTIONS -r :: The git remote to import this CVS repository into. Moves all CVS branches into remotes// - akin to the way 'git-clone' uses 'origin' by default. + akin to the way 'git clone' uses 'origin' by default. -o :: When no remote is specified (via -r) the 'HEAD' branch from CVS is imported to the 'origin' branch within the git repository, as 'HEAD' already has a special meaning for git. When a remote is specified the 'HEAD' branch is named - remotes//master mirroring 'git-clone' behaviour. + remotes//master mirroring 'git clone' behaviour. Use this option if you want to import into a different branch. + @@ -145,17 +145,17 @@ This option can be used several times to provide several detection regexes. --------- + -'git-cvsimport' will make it appear as those authors had +'git cvsimport' will make it appear as those authors had their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly all along. + For convenience, this data is saved to `$GIT_DIR/cvs-authors` each time the '-A' option is provided and read from that same -file each time 'git-cvsimport' is run. +file each time 'git cvsimport' is run. + It is not recommended to use this feature if you intend to export changes back to CVS again later with -'git-cvsexportcommit'. +'git cvsexportcommit'. -h:: Print a short usage message and exit. diff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt index 99a7c14700..dbb053ee17 100644 --- a/Documentation/git-cvsserver.txt +++ b/Documentation/git-cvsserver.txt @@ -22,7 +22,7 @@ cvspserver stream tcp nowait nobody /usr/bin/git-cvsserver git-cvsserver pserver Usage: [verse] -'git cvsserver' [options] [pserver|server] [ ...] +'git-cvsserver' [options] [pserver|server] [ ...] OPTIONS ------- @@ -206,7 +206,7 @@ them write access to the directory, too. The database can not be reliably regenerated in a consistent form after the branch it is tracking has changed. Example: For merged branches, 'git-cvsserver' only tracks -one branch of development, and after a 'git-merge' an +one branch of development, and after a 'git merge' an incrementally updated database may track a different branch than a database regenerated from scratch, causing inconsistent CVS revision numbers. `git-cvsserver` has no way of knowing which @@ -277,6 +277,21 @@ In `dbdriver` and `dbuser` you can use the following variables: If no name can be determined, the numeric uid is used. +ENVIRONMENT +----------- + +These variables obviate the need for command-line options in some +circumstances, allowing easier restricted usage through git-shell. + +GIT_CVSSERVER_BASE_PATH takes the place of the argument to --base-path. + +GIT_CVSSERVER_ROOT specifies a single-directory whitelist. The +repository must still be configured to allow access through +git-cvsserver, as described above. + +When these environment variables are set, the corresponding +command-line arguments may not be used. + Eclipse CVS Client Notes ------------------------ @@ -294,7 +309,7 @@ To get a checkout with the Eclipse CVS client: Protocol notes: If you are using anonymous access via pserver, just select that. Those using SSH access should choose the 'ext' protocol, and configure 'ext' access on the Preferences->Team->CVS->ExtConnection pane. Set CVS_SERVER to -"'git cvsserver'". Note that password support is not good when using 'ext', +"`git cvsserver`". Note that password support is not good when using 'ext', you will definitely want to have SSH keys setup. Alternatively, you can just use the non-standard extssh protocol that Eclipse diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index a85121c689..01c9f8eb9e 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -28,36 +28,36 @@ that service if it is enabled. It verifies that the directory has the magic file "git-daemon-export-ok", and it will refuse to export any git directory that hasn't explicitly been marked for export this way (unless the '--export-all' parameter is specified). If you -pass some directory paths as 'git-daemon' arguments, you can further restrict +pass some directory paths as 'git daemon' arguments, you can further restrict the offers to a whitelist comprising of those. By default, only `upload-pack` service is enabled, which serves -'git-fetch-pack' and 'git-ls-remote' clients, which are invoked -from 'git-fetch', 'git-pull', and 'git-clone'. +'git fetch-pack' and 'git ls-remote' clients, which are invoked +from 'git fetch', 'git pull', and 'git clone'. This is ideally suited for read-only updates, i.e., pulling from git repositories. -An `upload-archive` also exists to serve 'git-archive'. +An `upload-archive` also exists to serve 'git archive'. OPTIONS ------- --strict-paths:: Match paths exactly (i.e. don't allow "/foo/repo" when the real path is "/foo/repo.git" or "/foo/repo/.git") and don't do user-relative paths. - 'git-daemon' will refuse to start when this option is enabled and no + 'git daemon' will refuse to start when this option is enabled and no whitelist is specified. --base-path=path:: Remap all the path requests as relative to the given path. - This is sort of "GIT root" - if you run 'git-daemon' with + This is sort of "GIT root" - if you run 'git daemon' with '--base-path=/srv/git' on example.com, then if you later try to pull - 'git://example.com/hello.git', 'git-daemon' will interpret the path + 'git://example.com/hello.git', 'git daemon' will interpret the path as '/srv/git/hello.git'. --base-path-relaxed:: If --base-path is enabled and repo lookup fails, with this option - 'git-daemon' will attempt to lookup without prefixing the base path. + 'git daemon' will attempt to lookup without prefixing the base path. This is useful for switching to --base-path usage, while still allowing the old paths. @@ -143,7 +143,7 @@ OPTIONS + Giving these options is an error when used with `--inetd`; use the facility of inet daemon to achieve the same before spawning -'git-daemon' if needed. +'git daemon' if needed. --enable=service:: --disable=service:: @@ -169,24 +169,24 @@ SERVICES These services can be globally enabled/disabled using the command line options of this command. If a finer-grained -control is desired (e.g. to allow 'git-archive' to be run +control is desired (e.g. to allow 'git archive' to be run against only in a few selected repositories the daemon serves), the per-repository configuration file can be used to enable or disable them. upload-pack:: - This serves 'git-fetch-pack' and 'git-ls-remote' + This serves 'git fetch-pack' and 'git ls-remote' clients. It is enabled by default, but a repository can disable it by setting `daemon.uploadpack` configuration item to `false`. upload-archive:: - This serves 'git-archive --remote'. It is disabled by + This serves 'git archive --remote'. It is disabled by default, but a repository can enable it by setting `daemon.uploadarch` configuration item to `true`. receive-pack:: - This serves 'git-send-pack' clients, allowing anonymous + This serves 'git send-pack' clients, allowing anonymous push. It is disabled by default, as there is _no_ authentication in the protocol (in other words, anybody can push anything into the repository, including removal @@ -204,8 +204,8 @@ $ grep 9418 /etc/services git 9418/tcp # Git Version Control System ------------ -'git-daemon' as inetd server:: - To set up 'git-daemon' as an inetd service that handles any +'git daemon' as inetd server:: + To set up 'git daemon' as an inetd service that handles any repository under the whitelisted set of directories, /pub/foo and /pub/bar, place an entry like the following into /etc/inetd all on one line: @@ -217,8 +217,8 @@ git 9418/tcp # Git Version Control System ------------------------------------------------ -'git-daemon' as inetd server for virtual hosts:: - To set up 'git-daemon' as an inetd service that handles +'git daemon' as inetd server for virtual hosts:: + To set up 'git daemon' as an inetd service that handles repositories for different virtual hosts, `www.example.com` and `www.example.org`, place an entry like the following into `/etc/inetd` all on one line: @@ -240,8 +240,8 @@ clients, a symlink from `/software` into the appropriate default repository could be made as well. -'git-daemon' as regular daemon for virtual hosts:: - To set up 'git-daemon' as a regular, non-inetd service that +'git daemon' as regular daemon for virtual hosts:: + To set up 'git daemon' as a regular, non-inetd service that handles repositories for multiple virtual hosts based on their IP addresses, start the daemon like this: + @@ -258,7 +258,7 @@ Repositories can still be accessed by hostname though, assuming they correspond to these IP addresses. selectively enable/disable services per repository:: - To enable 'git-archive --remote' and disable 'git-fetch' against + To enable 'git archive --remote' and disable 'git fetch' against a repository, have the following in the configuration file in the repository (that is the file 'config' next to 'HEAD', 'refs' and 'objects'). @@ -272,7 +272,7 @@ selectively enable/disable services per repository:: ENVIRONMENT ----------- -'git-daemon' will set REMOTE_ADDR to the IP address of the client +'git daemon' will set REMOTE_ADDR to the IP address of the client that connected to it, if the IP address is available. REMOTE_ADDR will be available in the environment of hooks called when services are performed. diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt index 78b9808aa3..6fc5323ee6 100644 --- a/Documentation/git-describe.txt +++ b/Documentation/git-describe.txt @@ -106,7 +106,7 @@ of commits which would be displayed by "git log v1.0.4..parent". The hash suffix is "-g" + 7-char abbreviation for the tip commit of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`). -Doing a 'git-describe' on a tag-name will just show the tag name: +Doing a 'git describe' on a tag-name will just show the tag name: [torvalds@g5 git]$ git describe v1.0.4 v1.0.4 @@ -136,13 +136,13 @@ be sufficient to disambiguate these commits. SEARCH STRATEGY --------------- -For each committish supplied, 'git-describe' will first look for +For each committish supplied, 'git describe' will first look for a tag which tags exactly that commit. Annotated tags will always be preferred over lightweight tags, and tags with newer dates will always be preferred over tags with older dates. If an exact match is found, its name will be output and searching will stop. -If an exact match was not found, 'git-describe' will walk back +If an exact match was not found, 'git describe' will walk back through the commit history to locate an ancestor commit which has been tagged. The ancestor's tag will be output along with an abbreviation of the input committish's SHA1. diff --git a/Documentation/git-diff-files.txt b/Documentation/git-diff-files.txt index 4ef03578eb..9cd8ccef37 100644 --- a/Documentation/git-diff-files.txt +++ b/Documentation/git-diff-files.txt @@ -15,7 +15,7 @@ DESCRIPTION Compares the files in the working tree and the index. When paths are specified, compares only those named paths. Otherwise all entries in the index are compared. The output format is the -same as for 'git-diff-index' and 'git-diff-tree'. +same as for 'git diff-index' and 'git diff-tree'. OPTIONS ------- diff --git a/Documentation/git-diff-index.txt b/Documentation/git-diff-index.txt index 8b9ed29299..162cb741b3 100644 --- a/Documentation/git-diff-index.txt +++ b/Documentation/git-diff-index.txt @@ -31,7 +31,7 @@ include::diff-options.txt[] -m:: By default, files recorded in the index but not checked out are reported as deleted. This flag makes - 'git-diff-index' say that all non-checked-out files are up + 'git diff-index' say that all non-checked-out files are up to date. include::diff-format.txt[] @@ -48,7 +48,7 @@ Cached Mode If '--cached' is specified, it allows you to ask: show me the differences between HEAD and the current index - contents (the ones I'd write using 'git-write-tree') + contents (the ones I'd write using 'git write-tree') For example, let's say that you have worked on your working directory, updated some files in the index and are ready to commit. You want to see exactly @@ -60,7 +60,7 @@ object and compare it that way, and to do that, you just do Example: let's say I had renamed `commit.c` to `git-commit.c`, and I had done an `update-index` to make that effective in the index file. `git diff-files` wouldn't show anything at all, since the index file -matches my working directory. But doing a 'git-diff-index' does: +matches my working directory. But doing a 'git diff-index' does: torvalds@ppc970:~/git> git diff-index --cached HEAD -100644 blob 4161aecc6700a2eb579e842af0b7f22b98443f74 commit.c @@ -69,10 +69,10 @@ matches my working directory. But doing a 'git-diff-index' does: You can see easily that the above is a rename. In fact, `git diff-index --cached` *should* always be entirely equivalent to -actually doing a 'git-write-tree' and comparing that. Except this one is much +actually doing a 'git write-tree' and comparing that. Except this one is much nicer for the case where you just want to check where you are. -So doing a 'git-diff-index --cached' is basically very useful when you are +So doing a `git diff-index --cached` is basically very useful when you are asking yourself "what have I already marked for being committed, and what's the difference to a previous tree". @@ -80,20 +80,20 @@ Non-cached Mode --------------- The "non-cached" mode takes a different approach, and is potentially the more useful of the two in that what it does can't be emulated with -a 'git-write-tree' + 'git-diff-tree'. Thus that's the default mode. +a 'git write-tree' + 'git diff-tree'. Thus that's the default mode. The non-cached version asks the question: show me the differences between HEAD and the currently checked out tree - index contents _and_ files that aren't up-to-date which is obviously a very useful question too, since that tells you what -you *could* commit. Again, the output matches the 'git-diff-tree -r' +you *could* commit. Again, the output matches the 'git diff-tree -r' output to a tee, but with a twist. The twist is that if some file doesn't match the index, we don't have a backing store thing for it, and we use the magic "all-zero" sha1 to show that. So let's say that you have edited `kernel/sched.c`, but -have not actually done a 'git-update-index' on it yet - there is no +have not actually done a 'git update-index' on it yet - there is no "object" associated with the new state, and you get: torvalds@ppc970:~/v2.6/linux> git diff-index HEAD @@ -104,11 +104,11 @@ not up-to-date and may contain new stuff. The all-zero sha1 means that to get the real diff, you need to look at the object in the working directory directly rather than do an object-to-object diff. -NOTE: As with other commands of this type, 'git-diff-index' does not +NOTE: As with other commands of this type, 'git diff-index' does not actually look at the contents of the file at all. So maybe `kernel/sched.c` hasn't actually changed, and it's just that you touched it. In either case, it's a note that you need to -'git-update-index' it to make the index be in sync. +'git update-index' it to make the index be in sync. NOTE: You can have a mixture of files show up as "has been updated" and "is still dirty in the working directory" together. You can always diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt index f2cef1260b..a7e37b875f 100644 --- a/Documentation/git-diff-tree.txt +++ b/Documentation/git-diff-tree.txt @@ -20,7 +20,7 @@ Compares the content and mode of the blobs found via two tree objects. If there is only one given, the commit is compared with its parents (see --stdin below). -Note that 'git-diff-tree' can use the tree encapsulated in a commit object. +Note that 'git diff-tree' can use the tree encapsulated in a commit object. OPTIONS ------- @@ -67,25 +67,25 @@ The following flags further affect the behavior when comparing commits (but not trees). -m:: - By default, 'git-diff-tree --stdin' does not show + By default, 'git diff-tree --stdin' does not show differences for merge commits. With this flag, it shows differences to that commit from all of its parents. See also '-c'. -s:: - By default, 'git-diff-tree --stdin' shows differences, + By default, 'git diff-tree --stdin' shows differences, either in machine-readable form (without '-p') or in patch form (with '-p'). This output can be suppressed. It is only useful with '-v' flag. -v:: - This flag causes 'git-diff-tree --stdin' to also show + This flag causes 'git diff-tree --stdin' to also show the commit message before the differences. include::pretty-options.txt[] --no-commit-id:: - 'git-diff-tree' outputs a line with the commit ID when + 'git diff-tree' outputs a line with the commit ID when applicable. This flag suppressed the commit ID output. -c:: diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index 0ac711230e..723a64872f 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -157,6 +157,10 @@ $ git diff -R <2> rewrites (very expensive). <2> Output diff in reverse. +SEE ALSO +-------- +linkgit:git-difftool[1]:: + Show changes using common diff tools Author ------ diff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt index 8e9aed67d7..8250bad2ce 100644 --- a/Documentation/git-difftool.txt +++ b/Documentation/git-difftool.txt @@ -7,13 +7,13 @@ git-difftool - Show changes using common diff tools SYNOPSIS -------- -'git difftool' [--tool=] [-y|--no-prompt|--prompt] [<'git diff' options>] +'git difftool' [] {0,2} [--] [...] DESCRIPTION ----------- -'git-difftool' is a git command that allows you to compare and edit files +'git difftool' is a git command that allows you to compare and edit files between revisions using common diff tools. 'git difftool' is a frontend -to 'git-diff' and accepts the same options and arguments. +to 'git diff' and accepts the same options and arguments. OPTIONS ------- @@ -33,23 +33,23 @@ OPTIONS kdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, diffuse, opendiff, p4merge and araxis. + -If a diff tool is not specified, 'git-difftool' +If a diff tool is not specified, 'git difftool' will use the configuration variable `diff.tool`. If the -configuration variable `diff.tool` is not set, 'git-difftool' +configuration variable `diff.tool` is not set, 'git difftool' will pick a suitable default. + You can explicitly provide a full path to the tool by setting the configuration variable `difftool..path`. For example, you can configure the absolute path to kdiff3 by setting -`difftool.kdiff3.path`. Otherwise, 'git-difftool' assumes the +`difftool.kdiff3.path`. Otherwise, 'git difftool' assumes the tool is available in PATH. + Instead of running one of the known diff tools, -'git-difftool' can be customized to run an alternative program +'git difftool' can be customized to run an alternative program by specifying the command line to invoke in a configuration variable `difftool..cmd`. + -When 'git-difftool' is invoked with this tool (either through the +When 'git difftool' is invoked with this tool (either through the `-t` or `--tool` option or the `diff.tool` configuration variable) the configured command line will be invoked with the following variables available: `$LOCAL` is set to the name of the temporary @@ -58,16 +58,31 @@ is set to the name of the temporary file containing the contents of the diff post-image. `$BASE` is provided for compatibility with custom merge tool commands and has the same value as `$LOCAL`. +-x :: +--extcmd=:: + Specify a custom command for viewing diffs. + 'git-difftool' ignores the configured defaults and runs + `$command $LOCAL $REMOTE` when this option is specified. + +-g:: +--gui:: + When 'git-difftool' is invoked with the `-g` or `--gui` option + the default diff tool will be read from the configured + `diff.guitool` variable instead of `diff.tool`. + See linkgit:git-diff[1] for the full list of supported options. CONFIG VARIABLES ---------------- -'git-difftool' falls back to 'git-mergetool' config variables when the +'git difftool' falls back to 'git mergetool' config variables when the difftool equivalents have not been defined. diff.tool:: The default diff tool to use. +diff.guitool:: + The default diff tool to use when `--gui` is specified. + difftool..path:: Override the path for the given tool. This is useful in case your tool is not in the PATH. diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt index 75b06f33e7..c24e14b870 100644 --- a/Documentation/git-fast-export.txt +++ b/Documentation/git-fast-export.txt @@ -13,18 +13,18 @@ SYNOPSIS DESCRIPTION ----------- This program dumps the given revisions in a form suitable to be piped -into 'git-fast-import'. +into 'git fast-import'. You can use it as a human-readable bundle replacement (see linkgit:git-bundle[1]), or as a kind of an interactive -'git-filter-branch'. +'git filter-branch'. OPTIONS ------- --progress=:: Insert 'progress' statements every objects, to be shown by - 'git-fast-import' during import. + 'git fast-import' during import. --signed-tags=(verbatim|warn|strip|abort):: Specify how to handle signed tags. Since any transformation @@ -91,8 +91,8 @@ marks the same across runs. already contains the necessary objects. [git-rev-list-args...]:: - A list of arguments, acceptable to 'git-rev-parse' and - 'git-rev-list', that specifies the specific objects and references + A list of arguments, acceptable to 'git rev-parse' and + 'git rev-list', that specifies the specific objects and references to export. For example, `master\~10..master` causes the current master reference to be exported along with all objects added since its 10th ancestor commit. @@ -125,7 +125,7 @@ referenced by that revision range contains the string Limitations ----------- -Since 'git-fast-import' cannot tag trees, you will not be +Since 'git fast-import' cannot tag trees, you will not be able to export the linux-2.6.git repository completely, as it contains a tag referencing a tree instead of a commit. diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt index e6d364f53c..ff4022c15f 100644 --- a/Documentation/git-fast-import.txt +++ b/Documentation/git-fast-import.txt @@ -15,7 +15,7 @@ DESCRIPTION This program is usually not what the end user wants to run directly. Most end users want to use one of the existing frontend programs, which parses a specific type of foreign source and feeds the contents -stored there to 'git-fast-import'. +stored there to 'git fast-import'. fast-import reads a mixed command/data stream from standard input and writes one or more packfiles directly into the current repository. @@ -24,7 +24,7 @@ updated branch and tag refs, fully updating the current repository with the newly imported data. The fast-import backend itself can import into an empty repository (one that -has already been initialized by 'git-init') or incrementally +has already been initialized by 'git init') or incrementally update an existing populated repository. Whether or not incremental imports are supported from a particular foreign source depends on the frontend program in use. @@ -75,6 +75,20 @@ OPTIONS set of marks. If a mark is defined to different values, the last file wins. +--relative-marks:: + After specifying --relative-marks= the paths specified + with --import-marks= and --export-marks= are relative + to an internal directory in the current repository. + In git-fast-import this means that the paths are relative + to the .git/info/fast-import directory. However, other + importers may use a different location. + +--no-relative-marks:: + Negates a previous --relative-marks. Allows for combining + relative and non-relative marks by interweaving + --(no-)-relative-marks= with the --(import|export)-marks= + options. + --export-pack-edges=:: After creating a packfile, print a line of data to listing the filename of the packfile and the last @@ -82,7 +96,7 @@ OPTIONS This information may be useful after importing projects whose total object set exceeds the 4 GiB packfile limit, as these commits can be used as edge points during calls - to 'git-pack-objects'. + to 'git pack-objects'. --quiet:: Disable all non-fatal output, making fast-import silent when it @@ -124,9 +138,9 @@ an ideal situation, given that most conversion tools are throw-away Parallel Operation ------------------ -Like 'git-push' or 'git-fetch', imports handled by fast-import are safe to +Like 'git push' or 'git fetch', imports handled by fast-import are safe to run alongside parallel `git repack -a -d` or `git gc` invocations, -or any other Git operation (including 'git-prune', as loose objects +or any other Git operation (including 'git prune', as loose objects are never used by fast-import). fast-import does not lock the branch or tag refs it is actively importing. @@ -220,7 +234,7 @@ variation in formatting will cause fast-import to reject the value. + An example value is ``Tue Feb 6 11:22:18 2007 -0500''. The Git parser is accurate, but a little on the lenient side. It is the -same parser used by 'git-am' when applying patches +same parser used by 'git am' when applying patches received from email. + Some malformed strings may be accepted as valid dates. In some of @@ -256,7 +270,7 @@ timezone. This particular format is supplied as its short to implement and may be useful to a process that wants to create a new commit right now, without needing to use a working directory or -'git-update-index'. +'git update-index'. + If separate `author` and `committer` commands are used in a `commit` the timestamps may not match, as the system clock will be polled @@ -303,6 +317,15 @@ and control the current import process. More detailed discussion standard output. This command is optional and is not needed to perform an import. +`feature`:: + Require that fast-import supports the specified feature, or + abort if it does not. + +`option`:: + Specify any of the options listed under OPTIONS that do not + change stream semantic to suit the frontend's needs. This + command is optional and is not needed to perform an import. + `commit` ~~~~~~~~ Create or update a branch with a new commit, recording one logical @@ -690,7 +713,7 @@ recommended, as the frontend does not (easily) have access to the complete set of bytes which normally goes into such a signature. If signing is required, create lightweight tags from within fast-import with `reset`, then create the annotated versions of those tags offline -with the standard 'git-tag' process. +with the standard 'git tag' process. `reset` ~~~~~~~ @@ -846,6 +869,62 @@ Placing a `progress` command immediately after a `checkpoint` will inform the reader when the `checkpoint` has been completed and it can safely access the refs that fast-import updated. +`feature` +~~~~~~~~~ +Require that fast-import supports the specified feature, or abort if +it does not. + +.... + 'feature' SP LF +.... + +The part of the command may be any string matching +^[a-zA-Z][a-zA-Z-]*$ and should be understood by fast-import. + +Feature work identical as their option counterparts with the +exception of the import-marks feature, see below. + +The following features are currently supported: + +* date-format +* import-marks +* export-marks +* relative-marks +* no-relative-marks +* force + +The import-marks behaves differently from when it is specified as +commandline option in that only one "feature import-marks" is allowed +per stream. Also, any --import-marks= specified on the commandline +will override those from the stream (if any). + +`option` +~~~~~~~~ +Processes the specified option so that git fast-import behaves in a +way that suits the frontend's needs. +Note that options specified by the frontend are overridden by any +options the user may specify to git fast-import itself. + +.... + 'option' SP