From: Junio C Hamano Date: Mon, 7 Nov 2005 02:57:40 +0000 (-0800) Subject: GIT 0.99.9e X-Git-Tag: v0.99.9e^0 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/72e5890b68e7199d92620d3bba91fa36dd259404?hp=d5bc7eecbbb0b9f6122708bf5cd62f78ebdaafd8 GIT 0.99.9e Signed-off-by: Junio C Hamano --- diff --git a/.gitignore b/.gitignore index 938669fc09..3edf6b41af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ git git-add +git-am git-apply git-applymbox git-applypatch @@ -7,9 +8,11 @@ git-archimport git-bisect git-branch git-cat-file +git-check-ref-format git-checkout git-checkout-index git-cherry +git-cherry-pick git-clone git-clone-pack git-commit @@ -20,19 +23,20 @@ git-cvsimport git-daemon git-diff git-diff-files -git-diff-helper git-diff-index git-diff-stages git-diff-tree -git-export git-fetch git-fetch-pack +git-findtags +git-fmt-merge-msg git-format-patch git-fsck-objects git-get-tar-commit-id git-grep git-hash-object git-http-fetch +git-index-pack git-init-db git-local-fetch git-log @@ -46,10 +50,13 @@ git-merge-base git-merge-index git-merge-octopus git-merge-one-file +git-merge-ours git-merge-recursive git-merge-resolve git-merge-stupid git-mktag +git-name-rev +git-mv git-octopus git-pack-objects git-parse-remote @@ -70,11 +77,11 @@ git-reset git-resolve git-rev-list git-rev-parse -git-rev-tree git-revert git-send-email git-send-pack git-sh-setup +git-shell git-shortlog git-show-branch git-show-index @@ -84,11 +91,14 @@ git-ssh-push git-ssh-upload git-status git-stripspace +git-svnimport +git-symbolic-ref git-tag git-tar-tree git-unpack-file git-unpack-objects git-update-index +git-update-ref git-update-server-info git-upload-pack git-var @@ -101,3 +111,6 @@ git-core-*/?* *.dsc *.deb git-core.spec +*.exe +libgit.a +*.o diff --git a/Documentation/Makefile b/Documentation/Makefile index 01fad8ea5d..741f14cfad 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -17,14 +17,14 @@ DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES)) DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT)) DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT)) -prefix=$(HOME) +prefix?=$(HOME) bin=$(prefix)/bin mandir=$(prefix)/man man1=$(mandir)/man1 man7=$(mandir)/man7 # DESTDIR= -INSTALL=install +INSTALL?=install # # Please note that there is a minor bug in asciidoc. @@ -52,20 +52,28 @@ install: man # 'include' dependencies $(patsubst %.txt,%.1,$(wildcard git-diff-*.txt)): \ diff-format.txt diff-options.txt +$(patsubst %.txt,%.html,$(wildcard git-diff-*.txt)): \ + diff-format.txt diff-options.txt + $(patsubst %,%.1,git-fetch git-pull git-push): pull-fetch-param.txt +$(patsubst %,%.html,git-fetch git-pull git-push): pull-fetch-param.txt + +$(patsubst %,%.1,git-merge git-pull): merge-pull-opts.txt +$(patsubst %,%.html,git-merge git-pull): merge-pull-opts.txt + git.7: ../README clean: rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html %.html : %.txt - asciidoc -b xhtml11 -d manpage $< + asciidoc -b xhtml11 -d manpage -f asciidoc.conf $< %.1 %.7 : %.xml xmlto man $< %.xml : %.txt - asciidoc -b docbook -d manpage $< + asciidoc -b docbook -d manpage -f asciidoc.conf $< git.html: git.txt ../README diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf new file mode 100644 index 0000000000..fa0877d483 --- /dev/null +++ b/Documentation/asciidoc.conf @@ -0,0 +1,26 @@ +## gitlink: macro +# +# Usage: gitlink:command[manpage-section] +# +# Note, {0} is the manpage section, while {target} is the command. +# +# Show GIT link as: (
); if section is defined, else just show +# the command. + +[attributes] +caret=^ + +ifdef::backend-docbook[] +[gitlink-inlinemacro] +{0%{target}} +{0#} +{0#{target}{0}} +{0#} +endif::backend-docbook[] + +ifdef::backend-xhtml11[] +[gitlink-inlinemacro] +{target}{0?({0})} +endif::backend-xhtml11[] + + diff --git a/Documentation/cvs-migration.txt b/Documentation/cvs-migration.txt index 390a72392b..57436f0078 100644 --- a/Documentation/cvs-migration.txt +++ b/Documentation/cvs-migration.txt @@ -1,6 +1,5 @@ -Git for CVS users +git for CVS users ================= -v0.99.5, Aug 2005 Ok, so you're a CVS user. That's ok, it's a treatable condition, and the first step to recovery is admitting you have a problem. The fact that @@ -8,7 +7,7 @@ you are reading this file means that you may be well on that path already. The thing about CVS is that it absolutely sucks as a source control -manager, and you'll thus be happy with almost anything else. Git, +manager, and you'll thus be happy with almost anything else. git, however, may be a bit 'too' different (read: "good") for your taste, and does a lot of things differently. @@ -16,7 +15,7 @@ One particular suckage of CVS is very hard to work around: CVS is basically a tool for tracking 'file' history, while git is a tool for tracking 'project' history. This sometimes causes problems if you are used to doing very strange things in CVS, in particular if you're doing -things like making branches of just a subset of the project. Git can't +things like making branches of just a subset of the project. git can't track that, since git never tracks things on the level of an individual file, only on the whole project level. @@ -24,7 +23,7 @@ The good news is that most people don't do that, and in fact most sane people think it's a bug in CVS that makes it tag (and check in changes) one file at a time. So most projects you'll ever see will use CVS 'as if' it was sane. In which case you'll find it very easy indeed to -move over to Git. +move over to git. First off: this is not a git tutorial. See link:tutorial.html[Documentation/tutorial.txt] for how git @@ -33,7 +32,7 @@ and notes on converting from CVS to git. Second: CVS has the notion of a "repository" as opposed to the thing that you're actually working in (your working directory, or your -"checked out tree"). Git does not have that notion at all, and all git +"checked out tree"). git does not have that notion at all, and all git working directories 'are' the repositories. However, you can easily emulate the CVS model by having one special "global repository", which people can synchronize with. See details later, but in the meantime @@ -50,7 +49,7 @@ gone through the git tutorial, and generally familiarized yourself with how to commit stuff etc in git) is to create a git'ified version of your CVS archive. -Happily, that's very easy indeed. Git will do it for you, although git +Happily, that's very easy indeed. git will do it for you, although git will need the help of a program called "cvsps": http://www.cobite.com/cvsps/ @@ -136,7 +135,7 @@ technically possible, and there are at least two specialized scripts out there that can be used to get equivalent information (see the git mailing list archives for details). -Git has a couple of alternatives, though, that you may find sufficient +git has a couple of alternatives, though, that you may find sufficient or even superior depending on your use. One is called "git-whatchanged" (for obvious reasons) and the other one is called "pickaxe" ("a tool for the software archeologist"). @@ -209,7 +208,7 @@ show anything for commits that do not touch this "if" statement. Also, in the original context, the same statement might have appeared at first in a different file and later the file was renamed to "a-file.c". CVS annotate would not help you to go -back across such a rename, but GIT would still help you in such +back across such a rename, but git would still help you in such a situation. For that, you can give the -C flag to git-diff-tree, like this: @@ -229,10 +228,10 @@ does rename or copy would not show in the output, and if the "o-file.c", it would find the commit that changed the statement when it was in "o-file.c". -[ BTW, the current versions of "git-diff-tree -C" is not eager +NOTE: The current version of "git-diff-tree -C" is not eager enough to find copies, and it will miss the fact that a-file.c was created by copying o-file.c unless o-file.c was somehow - changed in the same commit.] + changed in the same commit. You can use the --pickaxe-all flag in addition to the -S flag. This causes the differences from all the files contained in @@ -243,6 +242,6 @@ that contain this changed "if" statement: nitfol(); }' --pickaxe-all -[ Side note. This option is called "--pickaxe-all" because -S +NOTE: This option is called "--pickaxe-all" because -S option is internally called "pickaxe", a tool for software - archaeologists.] + archaeologists. diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt index 424e75a1c2..d1d0d2d3dc 100644 --- a/Documentation/diff-format.txt +++ b/Documentation/diff-format.txt @@ -1,8 +1,8 @@ The output format from "git-diff-index", "git-diff-tree" and "git-diff-files" are very similar. -These commands all compare two sets of things; what are -compared are different: +These commands all compare two sets of things; what is +compared differs: git-diff-index :: compares the and the files on the filesystem. @@ -46,7 +46,7 @@ That is, from the left to the right: . path for "dst"; only exists for C or R. . an LF or a NUL when '-z' option is used, to terminate the record. - is shown as all 0's if new is a file on the filesystem + is shown as all 0's if a file is new on the filesystem and it is out of sync with the cache. Example: @@ -55,6 +55,11 @@ Example: :100644 100644 5be4a4...... 000000...... M file.c ------------------------------------------------ +When `-z` option is not used, TAB, LF, and backslash characters +in pathnames are represented as `\t`, `\n`, and `\\`, +respectively. + + Generating patches with -p -------------------------- @@ -62,8 +67,7 @@ When "git-diff-index", "git-diff-tree", or "git-diff-files" are run with a '-p' option, they do not produce the output described above; instead they produce a patch file. -The patch generation can be customized at two levels. This -customization also applies to "git-diff-helper". +The patch generation can be customized at two levels. 1. When the environment variable 'GIT_EXTERNAL_DIFF' is not set, these commands internally invoke "diff" like this: @@ -92,7 +96,7 @@ For a path that is added, removed, or modified, where: -file:: are files GIT_EXTERNAL_DIFF can use to read the - contents of , + contents of , -hex:: are the 40-hexdigit SHA1 hashes, -mode:: are the octal representation of the file modes. @@ -107,7 +111,7 @@ For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1 parameter, . -Git specific extension to diff format +git specific extension to diff format ------------------------------------- What -p option produces is slightly different from the @@ -122,12 +126,11 @@ The `a/` and `b/` filenames are the same unless rename/copy is involved. Especially, even for a creation or a deletion, `/dev/null` is _not_ used in place of `a/` or `b/` filenames. + -When rename/copy is involved, `file1` and `file2` shows the +When rename/copy is involved, `file1` and `file2` show the name of the source file of the rename/copy and the name of the file that rename/copy produces, respectively. -2. It is followed by extended header lines that are one or - more of: +2. It is followed by one or more extended header lines: old mode new mode @@ -139,3 +142,7 @@ the file that rename/copy produces, respectively. rename to similarity index dissimilarity index + index .. + +3. TAB, LF, and backslash characters in pathnames are + represented as `\t`, `\n`, and `\\`, respectively. diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 48cf93cc38..32005b03f3 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -4,19 +4,14 @@ -u:: Synonym for "-p". --r:: - Look recursively in subdirectories; this flag does not - mean anything to commands other than "git-diff-tree"; - other diff commands always look at all the subdirectories. - -z:: \0 line termination on output --name-only:: Show only names of changed files. ---name-only-z:: - Same as --name-only, but terminate lines with NUL. +--name-status:: + Show only names and status of changed files. -B:: Break complete rewrite changes into pairs of delete and create. @@ -28,19 +23,26 @@ Detect copies as well as renames. --find-copies-harder:: - By default, -C option finds copies only if the original - file of the copy was modified in the same changeset for - performance reasons. This flag makes the command + For performance reasons, by default, -C option finds copies only + if the original file of the copy was modified in the same + changeset. This flag makes the command inspect unmodified files as candidates for the source of copy. This is a very expensive operation for large projects, so use it with caution. +-l:: + -M and -C options require O(n^2) processing time where n + is the number of potential rename/copy targets. This + option prevents rename/copy detection from running if + the number of rename/copy targets exceeds the specified + number. + -S:: - Look for differences that contains the change in . + Look for differences that contain the change in . --pickaxe-all:: When -S finds a change, show all the changes in that - changeset, not just the files that contains the change + changeset, not just the files that contain the change in . -O:: diff --git a/Documentation/diffcore.txt b/Documentation/diffcore.txt index 1908b92f38..cb4e562004 100644 --- a/Documentation/diffcore.txt +++ b/Documentation/diffcore.txt @@ -6,13 +6,12 @@ June 2005 Introduction ------------ -The diff commands git-diff-index, git-diff-files, and -git-diff-tree can be told to manipulate differences they find -in unconventional ways before showing diff(1) output. The -manipulation is collectively called "diffcore transformation". -This short note describes what they are and how to use them to -produce diff outputs that are easier to understand than the -conventional kind. +The diff commands git-diff-index, git-diff-files, git-diff-tree, and +git-diff-stages can be told to manipulate differences they find in +unconventional ways before showing diff(1) output. The manipulation +is collectively called "diffcore transformation". This short note +describes what they are and how to use them to produce diff outputs +that are easier to understand than the conventional kind. The chain of operation @@ -29,7 +28,10 @@ files: - git-diff-files compares contents of the index file and the working directory; - - git-diff-tree compares contents of two "tree" objects. + - git-diff-tree compares contents of two "tree" objects; + + - git-diff-stages compares contents of blobs at two stages in an + unmerged index file. In all of these cases, the commands themselves compare corresponding paths in the two sets of files. The result of @@ -65,14 +67,23 @@ format sections of the manual for git-diff-\* commands) or diff-patch format. -diffcore-pathspec ------------------ +diffcore-pathspec: For Ignoring Files Outside Our Consideration +--------------------------------------------------------------- The first transformation in the chain is diffcore-pathspec, and is controlled by giving the pathname parameters to the git-diff-* commands on the command line. The pathspec is used to limit the world diff operates in. It removes the filepairs -outside the specified set of pathnames. +outside the specified set of pathnames. E.g. If the input set +of filepairs included: + +------------------------------------------------ +:100644 100644 bcd1234... 0123456... M junkfile +------------------------------------------------ + +but the command invocation was "git-diff-files myfile", then the +junkfile entry would be removed from the list because only "myfile" +is under consideration. Implementation note. For performance reasons, git-diff-tree uses the pathname parameters on the command line to cull set of @@ -80,8 +91,8 @@ filepairs it feeds the diffcore mechanism itself, and does not use diffcore-pathspec, but the end result is the same. -diffcore-break --------------- +diffcore-break: For Splitting Up "Complete Rewrites" +---------------------------------------------------- The second transformation in the chain is diffcore-break, and is controlled by the -B option to the git-diff-* commands. This is @@ -115,8 +126,8 @@ the original is used), and can be customized by giving a number after "-B" option (e.g. "-B75" to tell it to use 75%). -diffcore-rename ---------------- +diffcore-rename: For Detection Renames and Copies +------------------------------------------------- This transformation is used to detect renames and copies, and is controlled by the -M option (to detect renames) and the -C option @@ -136,16 +147,16 @@ merges these filepairs and creates: :100644 100644 0123456... 0123456... R100 fileX file0 ------------------------------------------------ -When the "-C" option is used, the original contents of modified -files and contents of unchanged files are considered as -candidates of the source files in rename/copy operation, in -addition to the deleted files. If the input were like these -filepairs, that talk about a modified file fileY and a newly +When the "-C" option is used, the original contents of modified files, +and deleted files (and also unmodified files, if the +"\--find-copies-harder" option is used) are considered as candidates +of the source files in rename/copy operation. If the input were like +these filepairs, that talk about a modified file fileY and a newly created file file0: ------------------------------------------------ :100644 100644 0123456... 1234567... M fileY -:000000 100644 0000000... 0123456... A file0 +:000000 100644 0000000... bcd3456... A file0 ------------------------------------------------ the original contents of fileY and the resulting contents of @@ -154,14 +165,14 @@ changed to: ------------------------------------------------ :100644 100644 0123456... 1234567... M fileY -:100644 100644 0123456... 0123456... C100 fileY file0 +:100644 100644 0123456... bcd3456... C100 fileY file0 ------------------------------------------------ In both rename and copy detection, the same "extent of changes" algorithm used in diffcore-break is used to determine if two files are "similar enough", and can be customized to use -similarity score different from the default 50% by giving a -number after "-M" or "-C" option (e.g. "-M8" to tell it to use +a similarity score different from the default of 50% by giving a +number after the "-M" or "-C" option (e.g. "-M8" to tell it to use 8/10 = 80%). Note. When the "-C" option is used with `\--find-copies-harder` @@ -173,11 +184,11 @@ git-diff-\* commands can detect copies only if the file that was copied happened to have been modified in the same changeset. -diffcore-merge-broken ---------------------- +diffcore-merge-broken: For Putting "Complete Rewrites" Back Together +-------------------------------------------------------------------- This transformation is used to merge filepairs broken by -diffcore-break, and were not transformed into rename/copy by +diffcore-break, and not transformed into rename/copy by diffcore-rename, back into a single modification. This always runs when diffcore-break is used. @@ -206,17 +217,17 @@ like these: * -B/60 (the same as above, since diffcore-break defaults to 50%). Note that earlier implementation left a broken pair as a separate -creation and deletion patches. This was unnecessary hack and +creation and deletion patches. This was an unnecessary hack and the latest implementation always merges all the broken pairs back into modifications, but the resulting patch output is -formatted differently to still let the reviewing easier for such +formatted differently for easier review in case of such a complete rewrite by showing the entire contents of old version prefixed with '-', followed by the entire contents of new version prefixed with '+'. -diffcore-pickaxe ----------------- +diffcore-pickaxe: For Detecting Addition/Deletion of Specified String +--------------------------------------------------------------------- This transformation is used to find filepairs that represent changes that touch a specified string, and is controlled by the @@ -230,7 +241,7 @@ string appeared in this changeset". It also checks for the opposite case that loses the specified string. When `\--pickaxe-all` is not in effect, diffcore-pickaxe leaves -only such filepairs that touches the specified string in its +only such filepairs that touch the specified string in its output. When `\--pickaxe-all` is used, diffcore-pickaxe leaves all filepairs intact if there is such a filepair, or makes the output empty otherwise. The latter behaviour is designed to @@ -238,27 +249,27 @@ make reviewing of the changes in the context of the whole changeset easier. -diffcore-order --------------- +diffcore-order: For Sorting the Output Based on Filenames +--------------------------------------------------------- This is used to reorder the filepairs according to the user's (or project's) taste, and is controlled by the -O option to the git-diff-* commands. -This takes a text file each of whose line is a shell glob +This takes a text file each of whose lines is a shell glob pattern. Filepairs that match a glob pattern on an earlier line in the file are output before ones that match a later line, and filepairs that do not match any glob pattern are output last. -As an example, typical orderfile for the core GIT probably +As an example, a typical orderfile for the core git probably would look like this: ------------------------------------------------ - README - Makefile - Documentation - *.h - *.c - t +README +Makefile +Documentation +*.h +*.c +t ------------------------------------------------ diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index beb450075b..4cae41267a 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -3,21 +3,63 @@ git-add(1) NAME ---- -git-add - Add files to the cache. +git-add - Add files to the index file. SYNOPSIS -------- -'git-add' ... +'git-add' [-n] [-v] ... DESCRIPTION ----------- -A simple wrapper to git-update-index to add files to the cache for people used -to do "cvs add". +A simple wrapper for git-update-index to add files to the index, +for people used to do "cvs add". + OPTIONS ------- ...:: - Files to add to the cache. + Files to add to the index. + +-n:: + Don't actually add the file(s), just show if they exist. + +-v:: + Be verbose. + + +DISCUSSION +---------- + +The list of given to the command is fed to `git-ls-files` +command to list files that are not registerd in the index and +are not ignored/excluded by `$GIT_DIR/info/exclude` file or +`.gitignore` file in each directory. This means two things: + +. You can put the name of a directory on the command line, and + the command will add all files in it and its subdirectories; + +. Giving the name of a file that is already in index does not + run `git-update-index` on that path. + + +EXAMPLES +-------- +git-add Documentation/\\*.txt:: + + Adds all `\*.txt` files that are not in the index under + `Documentation` directory and its subdirectories. ++ +Note that the asterisk `\*` is quoted from the shell in this +example; this lets the command to include the files from +subdirectories of `Documentation/` directory. + +git-add git-*.sh:: + + Adds all git-*.sh scripts that are not in the index. + Because this example lets shell expand the asterisk + (i.e. you are listing the files explicitly), it does not + add `subdir/git-foo.sh` to the index. + Author ------ @@ -29,5 +71,5 @@ Documentation by Junio C Hamano and the git-list . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt new file mode 100644 index 0000000000..e4df4a46ec --- /dev/null +++ b/Documentation/git-am.txt @@ -0,0 +1,88 @@ +git-am(1) +========= + +NAME +---- +git-am - Apply a series of patches in a mailbox + + +SYNOPSIS +-------- +'git-am' [--signoff] [--dotest=] [--utf8] [--3way] ... +'git-am' [--skip] + +DESCRIPTION +----------- +Splits mail messages in a mailbox into commit log message, +authorship information and patches, and applies them to the +current branch. + +OPTIONS +------- +--signoff:: + Add `Signed-off-by:` line to the commit message, using + the committer identity of yourself. + +--dotest=:: + Instead of `.dotest` directory, use as a working + area to store extracted patches. + +--utf8, --keep:: + Pass `--utf8` and `--keep` flags to `git-mailinfo` (see + gitlink:git-mailinfo[1]). + +--3way:: + When the patch does not apply cleanly, fall back on + 3-way merge, if the patch records the identity of blobs + it is supposed to apply to, and we have those blobs + locally. + +--skip:: + Skip the current patch. This is only meaningful when + restarting an aborted patch. + +--interactive:: + Run interactively, just like git-applymbox. + + +DISCUSSION +---------- + +When initially invoking it, you give it names of the mailboxes +to crunch. Upon seeing the first patch that does not apply, it +aborts in the middle, just like 'git-applymbox' does. You can +recover from this in one of two ways: + +. skip the current one by re-running the command with '--skip' + option. + +. hand resolve the conflict in the working directory, run 'git + diff HEAD' to extract the merge result into a patch form and + replacing the patch in .dotest/patch file. After doing this, + run `git-reset --hard HEAD` to bring the working tree to the + state before half-applying the patch, then re-run the command + without any options. + +The command refuses to process new mailboxes while `.dotest` +directory exists, so if you decide to start over from scratch, +run `rm -f .dotest` before running the command with mailbox +names. + + +SEE ALSO +-------- +gitlink:git-applymbox[1], gitlink:git-applypatch[1]. + + +Author +------ +Written by Junio C Hamano + +Documentation +-------------- +Documentation by Petr Baudis, Junio C Hamano and the git-list . + +GIT +--- +Part of the gitlink:git[7] suite + diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index 391d6f5c2f..eb8f906837 100644 --- a/Documentation/git-apply.txt +++ b/Documentation/git-apply.txt @@ -1,19 +1,18 @@ git-apply(1) ============ -v0.1, June 2005 NAME ---- -git-apply - Apply patch on a GIT index file and a work tree +git-apply - Apply patch on a git index file and a work tree SYNOPSIS -------- -'git-apply' [--no-merge] [--stat] [--summary] [--check] [--index] [--show-files] [--apply] [...] +'git-apply' [--stat] [--numstat] [--summary] [--check] [--index] [--apply] [--index-info] [-z] [...] DESCRIPTION ----------- -Reads supplied diff output and applies it on a GIT index file +Reads supplied diff output and applies it on a git index file and a work tree. OPTIONS @@ -22,15 +21,16 @@ OPTIONS The files to read patch from. '-' can be used to read from the standard input. ---no-merge:: - The default mode of operation is the merge behaviour - which is not implemented yet. This flag explicitly - tells the program not to use the merge behaviour. - --stat:: Instead of applying the patch, output diffstat for the input. Turns off "apply". +--numstat:: + Similar to \--stat, but shows number of added and + deleted lines in decimal notation and pathname without + abbreviation, to make it more machine friendly. Turns + off "apply". + --summary:: Instead of applying the patch, output a condensed summary of information obtained from git diff extended @@ -51,8 +51,19 @@ OPTIONS up-to-date, it is flagged as an error. This flag also causes the index file to be updated. ---show-files:: - Show summary of files that are affected by the patch. +--index-info:: + 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 version of the blob is available locally, + outputs information about them to the standard output. + +-z:: + When showing the index information, do not munge paths, + but use NUL terminated machine readable format. Without + this flag, the pathnames output will have TAB, LF, and + backslash characters replaced with `\t`, `\n`, and `\\`, + respectively. --apply:: If you use any of the options marked ``Turns off @@ -72,5 +83,5 @@ Documentation by Junio C Hamano GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-applymbox.txt b/Documentation/git-applymbox.txt index f6d857cda4..f74c6a49b3 100644 --- a/Documentation/git-applymbox.txt +++ b/Documentation/git-applymbox.txt @@ -8,7 +8,7 @@ git-applymbox - Apply a series of patches in a mailbox SYNOPSIS -------- -'git-applymbox' [-u] [-k] [-q] ( -c .dotest/ | ) [ ] +'git-applymbox' [-u] [-k] [-q] [-m] ( -c .dotest/ | ) [ ] DESCRIPTION ----------- @@ -22,7 +22,7 @@ OPTIONS -q:: Apply patches interactively. The user will be given opportunity to edit the log message and the patch before - attempting to apply patch in each e-mail message. + attempting to apply it. -k:: Usually the program 'cleans up' the Subject: header line @@ -33,6 +33,14 @@ OPTIONS munging, and is most useful when used to read back 'git format-patch --mbox' output. +-m:: + Patches are applied with `git-apply` command, and unless + it cleanly applies without fuzz, the processing fails. + With this flag, if a tree that the patch applies cleanly + is found in a repository, the patch is applied to the + tree and then a 3-way merge between the resulting tree + and the current tree. + -u:: By default, the commit log message, author name and author email are taken from the e-mail without any @@ -67,7 +75,7 @@ OPTIONS SEE ALSO -------- -link:git-applypatch.html[git-applypatch]. +gitlink:git-am[1], gitlink:git-applypatch[1]. Author @@ -80,5 +88,5 @@ Documentation by Junio C Hamano and the git-list . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-applypatch.txt b/Documentation/git-applypatch.txt index b8946321d3..5b9037de9f 100644 --- a/Documentation/git-applypatch.txt +++ b/Documentation/git-applypatch.txt @@ -30,7 +30,7 @@ OPTIONS :: The patch to apply. -: +:: Author and subject information extracted from e-mail, used on "author" line and as the first line of the commit log message. @@ -46,5 +46,5 @@ Documentation by Junio C Hamano and the git-list . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-archimport.txt b/Documentation/git-archimport.txt index fa0779b39e..fcda0125af 100644 --- a/Documentation/git-archimport.txt +++ b/Documentation/git-archimport.txt @@ -3,7 +3,7 @@ git-archimport(1) NAME ---- -git-archimport - Import an Arch repository into GIT +git-archimport - Import an Arch repository into git SYNOPSIS @@ -20,31 +20,34 @@ it will just import it as a regular commit. If it can find it, it will mark it as a merge whenever possible (see discussion below). The script expects you to provide the key roots where it can start the import -from an 'initial import' or 'tag' type of Arch commit. It will follow and import -new branches within the provided roots. +from an 'initial import' or 'tag' type of Arch commit. It will follow and +import new branches within the provided roots. It expects to be dealing with one project only. If it sees -branches that have different roots, it will refuse to run. In that case, edit your - parameters to define clearly the scope of the import. +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 Arch repository. +`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`. 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 incremental imports. +`git-archimport` with the same parameters as the initial import to perform +incremental imports. MERGES ------ -Patch merge data from Arch is used to mark merges in GIT as well. GIT +Patch merge data from Arch is used to mark merges in git as well. git does not care much about tracking patches, and only considers a merge when a branch incorporates all the commits since the point they forked. The end result -is that GIT will have a good idea of how far branches have diverged. So the +is that git will have a good idea of how far branches have diverged. So the import process does lose some patch-trading metadata. Fortunately, when you try and merge branches imported from Arch, -GIT will find a good merge base, and it has a good chance of identifying +git will find a good merge base, and it has a good chance of identifying patches that have been traded out-of-sequence between the branches. OPTIONS @@ -78,5 +81,5 @@ Documentation by Junio C Hamano, Martin Langhoff and the git-list Documentation --------------- +------------- Documentation by Junio C Hamano and the git-list . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 914c0e6a5a..a7121a4c63 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -23,7 +23,7 @@ OPTIONS The name of the branch to create. start-point:: - Where to make the branch; defaults to HEAD. + Where to create the branch; defaults to HEAD. Author ------ @@ -35,5 +35,5 @@ Documentation by Junio C Hamano and the git-list . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt index 2131a29993..ab4dcae21c 100644 --- a/Documentation/git-cat-file.txt +++ b/Documentation/git-cat-file.txt @@ -1,6 +1,5 @@ git-cat-file(1) =============== -v0.1, May 2005 NAME ---- @@ -32,7 +31,7 @@ OPTIONS :: Typically this matches the real type of but asking - for a type that can trivially dereferenced from the given + for a type that can trivially be dereferenced from the given is also permitted. An example is to ask for a "tree" with being a commit object that contains it, or to ask for a "blob" with being a tag object that @@ -57,5 +56,5 @@ Documentation by David Greaves, Junio C Hamano and the git-list + +DESCRIPTION +----------- +Checks if a given 'refname' is acceptable, and exits non-zero if +it is not. + +A reference is used in git to specify branches and tags. A +branch head is stored under `$GIT_DIR/refs/heads` directory, and +a tag is stored under `$GIT_DIR/refs/tags` directory. git +imposes the following rules on how refs are named: + +. It could be named hierarchically (i.e. separated with slash + `/`), but each of its component cannot begin with a dot `.`; + +. It cannot have two consecutive dots `..` anywhere; + +. It cannot have ASCII control character (i.e. bytes whose + values are lower than \040, or \177 `DEL`), space, tilde `~`, + caret `{caret}`, or colon `:` anywhere; + +. It cannot end with a slash `/`. + +These rules makes it easy for shell script based tools to parse +refnames, and also avoids ambiguities in certain refname +expressions (see gitlink:git-rev-parse[1]). Namely: + +. double-dot `..` are often used as in `ref1..ref2`, and in some + context this notation means `{caret}ref1 ref2` (i.e. not in + ref1 and in ref2). + +. tilde `~` and caret `{caret}` are used to introduce postfix + 'nth parent' and 'peel onion' operation. + +. colon `:` is used as in `srcref:dstref` to mean "use srcref\'s + value and store it in dstref" in fetch and push operations. + + +GIT +--- +Part of the gitlink:git[7] suite diff --git a/Documentation/git-checkout-index.txt b/Documentation/git-checkout-index.txt index bb15214c98..589dc9ad12 100644 --- a/Documentation/git-checkout-index.txt +++ b/Documentation/git-checkout-index.txt @@ -1,6 +1,5 @@ git-checkout-index(1) ===================== -v0.1, May 2005 NAME ---- @@ -30,8 +29,8 @@ OPTIONS forces overwrite of existing files -a:: - checks out all files in the cache (will then continue to - process listed files). + checks out all files in the cache. Cannot be used + together with explicit filenames. -n:: Don't checkout new files, only refresh files already checked @@ -44,15 +43,9 @@ OPTIONS --:: Do not interpret any more arguments as options. -Note that the order of the flags matters: +The order of the flags used to matter, but not anymore. - git-checkout-index -a -f file.c - -will first check out all files listed in the cache (but not overwrite -any old ones), and then force-checkout `file.c` a second time (ie that -one *will* overwrite any old contents with the same filename). - -Also, just doing "git-checkout-index" does nothing. You probably meant +Just doing "git-checkout-index" does nothing. You probably meant "git-checkout-index -a". And if you want to force it, you want "git-checkout-index -f -a". @@ -78,12 +71,12 @@ scripting!). The prefix ability basically makes it trivial to use git-checkout-index as an "export as tree" function. Just read the desired tree into the index, and do a - + git-checkout-index --prefix=git-export-dir/ -a - + and git-checkout-index will "export" the cache into the specified directory. - + NOTE The final "/" is important. The exported name is literally just prefixed with the specified string, so you can also do something like @@ -102,5 +95,5 @@ Documentation by David Greaves, Junio C Hamano and the git-list ] [] +'git-checkout' [-f] [-b ] [] [...] DESCRIPTION ----------- -Updates the index and working tree to reflect the specified branch, -. Updates HEAD to be or, if specified, . + +When are not given, this command switches branches, by +updating the index and working tree to reflect the specified +branch, , and updating HEAD to be or, if +specified, . + +When are given, this command does *not* switch +branches. It updates the named paths in the working tree from +the index file (i.e. it runs `git-checkout-index -f -u`). In +this case, `-f` and `-b` options are meaningless and giving +either of them results in an error. argument can be +used to specify a specific tree-ish to update the index for the +given paths before updating the working tree. + OPTIONS ------- @@ -29,6 +41,30 @@ OPTIONS Branch to checkout; may be any object ID that resolves to a commit. Defaults to HEAD. + +EXAMPLE +------- + +The following sequence checks out the `master` branch, reverts +the `Makefile` to two revisions back, deletes hello.c by +mistake, and gets it back from the index. + +------------ +$ git checkout master +$ git checkout master~2 Makefile +$ rm -f hello.c +$ git checkout hello.c +------------ + +If you have an unfortunate branch that is named `hello.c`, the +last step above would be confused as an instruction to switch to +that branch. You should instead write: + +------------ +$ git checkout -- hello.c +------------ + + Author ------ Written by Linus Torvalds @@ -39,5 +75,5 @@ Documentation by Junio C Hamano and the git-list . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt index 38a4875248..26e0467797 100644 --- a/Documentation/git-cherry-pick.txt +++ b/Documentation/git-cherry-pick.txt @@ -1,6 +1,5 @@ git-cherry-pick(1) ================== -v0.99.5 Aug 2005 NAME ---- @@ -22,7 +21,7 @@ OPTIONS Commit to cherry-pick. -r:: - Usuall the command appends which commit was + Usually the command appends which commit was cherry-picked after the original commit message when making a commit. This option, '--replay', causes it to use the original commit message intact. This is useful @@ -38,9 +37,9 @@ OPTIONS option is used, your working tree does not have to match the HEAD commit. The cherry-pick is done against the beginning state of your working tree. - - This is useful when cherry-picking more than one commits' - effect to your working tree in a row. ++ +This is useful when cherry-picking more than one commits' +effect to your working tree in a row. Author @@ -53,5 +52,5 @@ Documentation by Junio C Hamano and the git-list . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-cherry.txt b/Documentation/git-cherry.txt index 9ff7bc25c1..af87966e51 100644 --- a/Documentation/git-cherry.txt +++ b/Documentation/git-cherry.txt @@ -38,5 +38,5 @@ Documentation by Junio C Hamano and the git-list . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-clone-pack.txt b/Documentation/git-clone-pack.txt index 0dc89a9072..cfc7b62f31 100644 --- a/Documentation/git-clone-pack.txt +++ b/Documentation/git-clone-pack.txt @@ -1,6 +1,5 @@ git-clone-pack(1) ================= -v0.1, July 2005 NAME ---- @@ -9,27 +8,23 @@ git-clone-pack - Clones a repository by receiving packed objects. SYNOPSIS -------- -'git-clone-pack' [-q] [--exec=] [:] [...] +'git-clone-pack' [--exec=] [:] [...] DESCRIPTION ----------- Clones a repository into the current repository by invoking 'git-upload-pack', possibly on the remote host via ssh, in -the named repository, and invoking 'git-unpack-objects' locally -to receive the pack. +the named repository, and stores the sent pack in the local +repository. OPTIONS ------- --q:: - Pass '-q' flag to 'git-unpack-objects'; this makes the - cloning process less verbose. - --exec=:: Use this to specify the path to 'git-upload-pack' on the - remote side, if is not found on your $PATH. - Installations of sshd ignores the user's environment + remote side, if it is not found on your $PATH. + Installations of sshd ignore the user's environment setup scripts for login shells (e.g. .bash_profile) and - your privately installed GIT may not be found on the system + your privately installed git may not be found on the system default $PATH. Another workaround suggested is to set up your $PATH in ".bashrc", but this flag is for people who do not want to pay the overhead for non-interactive @@ -61,5 +56,5 @@ Documentation by Junio C Hamano. GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index cff87ea1dc..fefd2985f3 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -1,6 +1,5 @@ git-clone(1) ============ -v0.1, July 2005 NAME ---- @@ -9,14 +8,30 @@ git-clone - Clones a repository. SYNOPSIS -------- -'git clone' [-l] [-u ] [-q] +'git-clone' [-l [-s]] [-q] [-n] [-u ] DESCRIPTION ----------- -Clones a repository into a newly created directory. +Clones a repository into a newly created directory. All remote +branch heads are copied under `$GIT_DIR/refs/heads/`, except +that the remote `master` is also copied to `origin` branch. + +In addition, `$GIT_DIR/remotes/origin` file is set up to have +this line: + + Pull: master:origin + +This is to help the typical workflow of working off of the +remote `master` branch. Every time `git pull` without argument +is run, the progress on the remote `master` branch is tracked by +copying it into the local `origin` branch, and merged into the +branch you are currently working on. Remote branches other than +`master` are also added there to be tracked. + OPTIONS ------- +--local:: -l:: When the repository to clone from is on a local machine, this flag bypasses normal "git aware" transport @@ -25,10 +40,23 @@ OPTIONS The files under .git/objects/ directory are hardlinked to save space when possible. +--shared:: +-s:: + When the repository to clone is on the local machine, + instead of using hard links, automatically setup + .git/objects/info/alternatives to share the objects + with the source repository. The resulting repository + starts out without any object of its own. + +--quiet:: -q:: Operate quietly. This flag is passed to "rsync" and "git-clone-pack" commands when given. +-n:: + No checkout of HEAD is performed after the clone is complete. + +--upload-pack :: -u :: When given, and the repository to clone from is handled by 'git-clone-pack', '--exec=' is passed to @@ -37,14 +65,13 @@ OPTIONS :: The (possibly remote) repository to clone from. It can - be an "rsync://host/dir" URL, an "http://host/dir" URL, - or [:]/dir notation that is used by 'git-clone-pack'. - Currently http transport is not supported. + be any URL git-fetch supports. :: The name of a new directory to be cloned into. It is an error to specify an existing directory. + Author ------ Written by Linus Torvalds @@ -56,5 +83,5 @@ Documentation by Junio C Hamano. GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt index 5536668813..b64cd6a84b 100644 --- a/Documentation/git-commit-tree.txt +++ b/Documentation/git-commit-tree.txt @@ -1,6 +1,5 @@ git-commit-tree(1) ================== -v0.1, May 2005 NAME ---- @@ -36,7 +35,7 @@ OPTIONS An existing tree object -p :: - Each '-p' indicates a the id of a parent commit object. + Each '-p' indicates the id of a parent commit object. Commit Information @@ -49,8 +48,8 @@ A commit encapsulates: - committer name and email and the commit time. If not provided, "git-commit-tree" uses your name, hostname and domain to -provide author and committer info. This can be overridden using the -following environment variables. +provide author and committer info. This can be overridden by +either `.git/config` file, or using the following environment variables. GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL @@ -58,11 +57,18 @@ following environment variables. GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL -(nb <,> and '\n's are stripped) +(nb "<", ">" and "\n"s are stripped) + +In `.git/config` file, the following items are used: + + [user] + name = "Your Name" + email = "your@email.address.xz" A commit comment is read from stdin (max 999 chars). If a changelog -entry is not provided via '<' redirection, "git-commit-tree" will just wait -for one to be entered and terminated with ^D +entry is not provided via "<" redirection, "git-commit-tree" will just wait +for one to be entered and terminated with ^D. + Diagnostics ----------- @@ -75,7 +81,7 @@ Your sysadmin must hate you!:: See Also -------- -link:git-write-tree.html[git-write-tree] +gitlink:git-write-tree[1] Author @@ -88,5 +94,5 @@ Documentation by David Greaves, Junio C Hamano and the git-list | -F | -m ] [-e] ... +'git-commit' [-a] [-s] [-v] [(-c | -C) | -F | -m ] [-e] ... DESCRIPTION ----------- @@ -69,4 +68,4 @@ Junio C Hamano GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-convert-objects.txt b/Documentation/git-convert-objects.txt index b1bc1c5752..b1220c06e1 100644 --- a/Documentation/git-convert-objects.txt +++ b/Documentation/git-convert-objects.txt @@ -1,10 +1,9 @@ git-convert-objects(1) ====================== -v0.1, May 2005 NAME ---- -git-convert-objects - Converts old-style GIT repository +git-convert-objects - Converts old-style git repository SYNOPSIS @@ -13,7 +12,7 @@ SYNOPSIS DESCRIPTION ----------- -Converts old-style GIT repository to the latest format +Converts old-style git repository to the latest format Author @@ -26,5 +25,5 @@ Documentation by David Greaves, Junio C Hamano and the git-list . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-cvsimport.txt b/Documentation/git-cvsimport.txt index edf952122f..4b62256a79 100644 --- a/Documentation/git-cvsimport.txt +++ b/Documentation/git-cvsimport.txt @@ -1,6 +1,5 @@ git-cvsimport(1) ================ -v0.1, July 2005 NAME ---- @@ -11,7 +10,7 @@ SYNOPSIS -------- 'git-cvsimport' [ -o ] [ -h ] [ -v ] [ -d ] [ -p ] - [ -C ] [ -i ] [ -k ] + [ -C ] [ -i ] [ -P ] [ -k ] [ -s ] [ -m ] [ -M regex ] [ ] @@ -31,7 +30,7 @@ OPTIONS are supported. -C :: - The GIT repository to import to. If the directory doesn't + The git repository to import to. If the directory doesn't exist, it will be created. Default is the current directory. -i:: @@ -51,15 +50,19 @@ OPTIONS The 'HEAD' branch from CVS is imported to the 'origin' branch within the git repository, as 'HEAD' already has a special meaning for git. Use this option if you want to import into a different branch. - - Use '-o master' for continuing an import that was initially done by - the old cvs2git tool. ++ +Use '-o master' for continuing an import that was initially done by +the old cvs2git tool. -p :: Additional options for cvsps. The options '-u' and '-A' are implicit and should not be used here. ++ +If you need to pass multiple options, separate them with a comma. - If you need to pass multiple options, separate them with a comma. +-P:: + Instead of calling cvsps, read the provided cvsps output file. Useful + for debugging or when cvsps is being handled outside cvsimport. -m:: Attempt to detect merges based on the commit message. This option @@ -105,5 +108,5 @@ Documentation by Matthias Urlichs . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index 5fc45f2158..67c5f22a7d 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -3,11 +3,12 @@ git-daemon(1) NAME ---- -git-daemon - A really simple server for GIT repositories. +git-daemon - A really simple server for git repositories. SYNOPSIS -------- -'git-daemon' [--inetd | --port=n] +'git-daemon' [--verbose] [--syslog] [--inetd | --port=n] [--export-all] + [--timeout=n] [--init-timeout=n] [directory...] DESCRIPTION ----------- @@ -20,18 +21,42 @@ what directory to upload, and it verifies that the directory is ok. 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. +for export this way (unless the '--export-all' parameter is specified). If you +pass some directory paths as 'git-daemon' arguments, you can further restrict +the offers to a whitelist comprising of those. This is ideally suited for read-only updates, ie pulling from git repositories. OPTIONS ------- +--export-all:: + Allow pulling from all directories that look like GIT repositories + (have the 'objects' subdirectory and a 'HEAD' file), even if they + do not have the 'git-daemon-export-ok' file. + --inetd:: Have the server run as an inetd service. --port:: Listen on an alternative port. +--init-timeout:: + Timeout between the moment the connection is established and the + client request is received (typically a rather low value, since + that should be basically immediate). + +--timeout:: + Timeout for specific client sub-requests. This includes the time + it takes for the server to process the sub-request and time spent + waiting for next client's request. + +--syslog:: + Log to syslog instead of stderr. Note that this option does not imply + --verbose, thus by default only error conditions will be logged. + +--verbose:: + Log details about the incoming connections and requested files. + Author ------ Written by Linus Torvalds and YOSHIFUJI Hideaki @@ -42,5 +67,5 @@ Documentation by Junio C Hamano and the git-list . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-diff-files.txt b/Documentation/git-diff-files.txt index 72c7a718f5..e3873888f2 100644 --- a/Documentation/git-diff-files.txt +++ b/Documentation/git-diff-files.txt @@ -1,6 +1,5 @@ git-diff-files(1) ================= -v0.1, May 2005 NAME ---- @@ -40,5 +39,5 @@ Documentation by David Greaves, Junio C Hamano and the git-list ] [-O] - -DESCRIPTION ------------ -Reads output from "git-diff-index", "git-diff-tree" and "git-diff-files" and -generates patch format output. - -OPTIONS -------- --z:: - \0 line termination on input - --S:: - Look for differences that contains the change in . - ---pickaxe-all:: - When -S finds a change, show all the changes in that - changeset, not just the files that contains the change - in . - --O:: - Output the patch in the order specified in the - , which has one shell glob pattern per line. - -See Also --------- -The section on generating patches in link:git-diff-index.html[git-diff-index] - - -Author ------- -Written by Junio C Hamano - - -Documentation --------------- -Documentation by David Greaves, Junio C Hamano and the git-list . - -GIT ---- -Part of the link:git.html[git] suite - diff --git a/Documentation/git-diff-index.txt b/Documentation/git-diff-index.txt index 12bfcb3243..2fc3eed710 100644 --- a/Documentation/git-diff-index.txt +++ b/Documentation/git-diff-index.txt @@ -1,6 +1,5 @@ git-diff-index(1) ================= -v0.1, May 2005 NAME ---- @@ -86,8 +85,8 @@ 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. 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 + 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" @@ -107,13 +106,13 @@ 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-upate-cache" it to make the cache be in sync. -NOTE 2! You can have a mixture of files show up as "has been updated" +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 tell which file is in which state, since the "has been updated" ones show a valid sha1, and the "not in sync with the index" ones will @@ -130,5 +129,5 @@ Documentation by David Greaves, Junio C Hamano and the git-list ] [] [...] +'git-diff-tree' [--stdin] [-m] [-s] [-v] [--pretty] [-t] [-r] [--root] [] [] [...] DESCRIPTION ----------- @@ -34,6 +33,9 @@ include::diff-options.txt[] Note that this parameter does not provide any wildcard or regexp features. +-r:: + recurse into sub-trees + -t:: show tree entry itself as well as subtrees. Implies -r. @@ -101,16 +103,18 @@ An example of normal usage is: which tells you that the last commit changed just one file (it's from this one: - commit 3c6f7ca19ad4043e9e72fa94106f352897e651a8 - tree 5319e4d609cdd282069cc4dce33c1db559539b03 - parent b4e628ea30d5ab3606119d2ea5caeab141d38df7 - author Linus Torvalds Sat Apr 9 12:02:30 2005 - committer Linus Torvalds Sat Apr 9 12:02:30 2005 +----------------------------------------------------------------------------- +commit 3c6f7ca19ad4043e9e72fa94106f352897e651a8 +tree 5319e4d609cdd282069cc4dce33c1db559539b03 +parent b4e628ea30d5ab3606119d2ea5caeab141d38df7 +author Linus Torvalds Sat Apr 9 12:02:30 2005 +committer Linus Torvalds Sat Apr 9 12:02:30 2005 - Make "git-fsck-objects" print out all the root commits it finds. +Make "git-fsck-objects" print out all the root commits it finds. - Once I do the reference tracking, I'll also make it print out all the - HEAD commits it finds, which is even more interesting. +Once I do the reference tracking, I'll also make it print out all the +HEAD commits it finds, which is even more interesting. +----------------------------------------------------------------------------- in case you care). @@ -129,5 +133,5 @@ Documentation by David Greaves, Junio C Hamano and the git-list . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-export.txt b/Documentation/git-export.txt deleted file mode 100644 index d2d0dc498e..0000000000 --- a/Documentation/git-export.txt +++ /dev/null @@ -1,31 +0,0 @@ -git-export(1) -============= -v0.1, May 2005 - -NAME ----- -git-export - Exports each commit and a diff against each of its parents - - -SYNOPSIS --------- -'git-export' top [base] - -DESCRIPTION ------------ -Exports each commit and diff against each of its parents, between -top and base. If base is not specified it exports everything. - - -Author ------- -Written by Linus Torvalds - -Documentation --------------- -Documentation by David Greaves, Junio C Hamano and the git-list . - -GIT ---- -Part of the link:git.html[git] suite - diff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt index 59afa14a30..ea6faab059 100644 --- a/Documentation/git-fetch-pack.txt +++ b/Documentation/git-fetch-pack.txt @@ -1,6 +1,5 @@ git-fetch-pack(1) ================= -v0.1, July 2005 NAME ---- @@ -35,7 +34,7 @@ OPTIONS remote side, if is not found on your $PATH. Installations of sshd ignores the user's environment setup scripts for login shells (e.g. .bash_profile) and - your privately installed GIT may not be found on the system + your privately installed git may not be found on the system default $PATH. Another workaround suggested is to set up your $PATH in ".bashrc", but this flag is for people who do not want to pay the overhead for non-interactive @@ -66,4 +65,4 @@ Documentation by Junio C Hamano. GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt index 8c1cc07048..73f8a99ffe 100644 --- a/Documentation/git-fetch.txt +++ b/Documentation/git-fetch.txt @@ -1,6 +1,5 @@ git-fetch(1) ============ -v0.99.5, Aug 2005 NAME ---- @@ -26,6 +25,11 @@ OPTIONS ------- include::pull-fetch-param.txt[] +-a, \--append:: + Append ref names and object names of fetched refs to the + existing contents of $GIT_DIR/FETCH_HEAD. Without this + option old data in $GIT_DIR/FETCH_HEAD will be overwritten. + -u, \--update-head-ok:: By default 'git-fetch' refuses to update the head which corresponds to the current branch. This flag disables the @@ -33,15 +37,20 @@ include::pull-fetch-param.txt[] update the index and working directory, so use it with care. +SEE ALSO +-------- +gitlink:git-pull[1] + + Author ------ Written by Linus Torvalds and Junio C Hamano Documentation --------------- +------------- Documentation by David Greaves, Junio C Hamano and the git-list . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-fmt-merge-msg.txt b/Documentation/git-fmt-merge-msg.txt new file mode 100644 index 0000000000..a70eb3994a --- /dev/null +++ b/Documentation/git-fmt-merge-msg.txt @@ -0,0 +1,39 @@ +git-fmt-merge-msg(1) +==================== + +NAME +---- +git-fmt-merge-msg - Produce a merge commit message + + +SYNOPSIS +-------- +'git-fmt-merge-msg' <$GIT_DIR/FETCH_HEAD + +DESCRIPTION +----------- +Takes the list of merged objects on stdin and produces a suitable +commit message to be used for the merge commit, usually to be +passed as the '' argument of `git-merge`. + +This script is intended mostly for internal use by scripts +automatically invoking `git-merge`. + + +SEE ALSO +-------- +gitlink:git-merge[1] + + +Author +------ +Written by Junio C Hamano + +Documentation +-------------- +Documentation by Petr Baudis, Junio C Hamano and the git-list . + +GIT +--- +Part of the gitlink:git[7] suite + diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index b314c3a0f2..7a3abec02e 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -8,7 +8,7 @@ git-format-patch - Prepare patches for e-mail submission. SYNOPSIS -------- -'git-format-patch' [-n][-o ][-k][--mbox][--diff-options] [] +'git-format-patch' [-n][-o |--stdout][-k][--mbox][--diff-options] [] DESCRIPTION ----------- @@ -54,6 +54,30 @@ OPTIONS concatenated together and fed to `git-applymbox`. Implies --author and --date. +--stdout:: + This flag generates the mbox formatted output to the + standard output, instead of saving them into a file per + patch and implies --mbox. + + +EXAMPLES +-------- + +git-format-patch -k --stdout R1..R2 | git-am -3 -k:: + Extract commits between revisions R1 and R2, and apply + them on top of the current branch using `git-am` to + cherry-pick them. + +git-format-patch origin:: + Extract commits the current branch accumulated since it + pulled from origin the last time in a patch form for + e-mail submission. + + +See Also +-------- +gitlink:git-am[1], gitlink:git-send-email + Author ------ @@ -65,5 +89,5 @@ Documentation by Junio C Hamano and the git-list . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-fsck-objects.txt b/Documentation/git-fsck-objects.txt index 2b8640439b..5dc9dbdd78 100644 --- a/Documentation/git-fsck-objects.txt +++ b/Documentation/git-fsck-objects.txt @@ -1,6 +1,5 @@ git-fsck-objects(1) =================== -v0.1, May 2005 NAME ---- @@ -19,9 +18,9 @@ OPTIONS ------- :: An object to treat as the head of an unreachability trace. - - If no objects are given, git-fsck-objects defaults to using the - index file and all SHA1 references in .git/refs/* as heads. ++ +If no objects are given, git-fsck-objects defaults to using the +index file and all SHA1 references in .git/refs/* as heads. --unreachable:: Print out objects that exist but that aren't readable from any @@ -42,22 +41,22 @@ OPTIONS ($GIT_DIR/objects), making sure that it is consistent and complete without referring to objects found in alternate object pools listed in GIT_ALTERNATE_OBJECT_DIRECTORIES, - nor packed GIT archives found in $GIT_DIR/objects/pack; + nor packed git archives found in $GIT_DIR/objects/pack; cannot be used with --full. --full:: Check not just objects in GIT_OBJECT_DIRECTORY ($GIT_DIR/objects), but also the ones found in alternate object pools listed in GIT_ALTERNATE_OBJECT_DIRECTORIES, - and in packed GIT archives found in $GIT_DIR/objects/pack + and in packed git archives found in $GIT_DIR/objects/pack and corresponding pack subdirectories in alternate object pools; cannot be used with --standalone. --strict:: Enable more strict checking, namely to catch a file mode recorded with g+w bit set, which was created by older - versions of GIT. Existing repositories, including the - Linux kernel, GIT itself, and sparse repository have old + versions of git. Existing repositories, including the + Linux kernel, git itself, and sparse repository have old objects that triggers this check, but it is recommended to check new projects with this flag. @@ -81,7 +80,7 @@ Any corrupt objects you will have to find in backups or other archives the hopes that somebody else has the object you have corrupted). Of course, "valid tree" doesn't mean that it wasn't generated by some -evil person, and the end result might be crap. Git is a revision +evil person, and the end result might be crap. git is a revision tracking system, not a quality assurance system ;) Extracted Diagnostics @@ -128,7 +127,7 @@ GIT_OBJECT_DIRECTORY:: GIT_INDEX_FILE:: used to specify the index file of the cache -GIT_ALTERNATE_OBJECT_DIRECTORIES: +GIT_ALTERNATE_OBJECT_DIRECTORIES:: used to specify additional object database roots (usually unset) Author @@ -141,5 +140,5 @@ Documentation by David Greaves, Junio C Hamano and the git-list . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt index c275ae26fd..0175793483 100644 --- a/Documentation/git-grep.txt +++ b/Documentation/git-grep.txt @@ -1,6 +1,5 @@ git-grep(1) =========== -v0.99.6, Sep 2005 NAME ---- @@ -43,5 +42,5 @@ Documentation by Junio C Hamano and the git-list . GIT --- -Part of the link:git.html[git] suite +Part of the gitlink:git[7] suite diff --git a/Documentation/git-hash-object.txt b/Documentation/git-hash-object.txt index 4dd06f7c89..9239f11135 100644 --- a/Documentation/git-hash-object.txt +++ b/Documentation/git-hash-object.txt @@ -1,6 +1,5 @@ git-hash-object(1) ================== -v0.1, May 2005 NAME ---- @@ -40,5 +39,5 @@ Documentation by David Greaves, Junio C Hamano and the git-list [...] + +DESCRIPTION +----------- +Sends missing objects to remote repository, and updates the +remote branch. + + +OPTIONS +------- +--complete:: + Do not assume that the remote repository is complete in its + current state, and verify all objects in the entire local + ref's history exist in the remote repository. + +--force:: + Usually, the command refuses to update a remote ref that + is not an ancestor of the local ref used to overwrite it. + This flag disables the check. What this means is that + the remote repository can lose commits; use it with + care. + +--verbose:: + Report the list of objects being walked locally and the + list of objects successfully sent to the remote repository. + +...: + The remote refs to update. + + +Specifying the Refs +------------------- + +A '' specification can be either a single pattern, or a pair +of such patterns separated by a colon ":" (this means that a ref name +cannot have a colon in it). A single pattern '' is just a +shorthand for ':'. + +Each pattern pair consists of the source side (before the colon) +and the destination side (after the colon). The ref to be +pushed is determined by finding a match that matches the source +side, and where it is pushed is determined by using the +destination side. + + - It is an error if does not match exactly one of the + local refs. + + - If does not match any remote ref, either + + * it has to start with "refs/"; is used as the + destination literally in this case. + + * == and the ref that matched the must not + exist in the set of remote refs; the ref matched + locally is used as the name of the destination. + +Without '--force', the ref is stored at the remote only if + does not exist, or is a proper subset (i.e. an +ancestor) of . This check, known as "fast forward check", +is performed in order to avoid accidentally overwriting the +remote ref and lose other peoples' commits from there. + +With '--force', the fast forward check is disabled for all refs. + +Optionally, a parameter can be prefixed with a plus '+' sign +to disable the fast-forward check only on that ref. + + +Author +------ +Written by Nick Hengeveld + +Documentation +-------------- +Documentation by Nick Hengeveld + +GIT +--- +Part of the gitlink:git[7] suite diff --git a/Documentation/git-index-pack.txt b/Documentation/git-index-pack.txt new file mode 100644 index 0000000000..71ce557276 --- /dev/null +++ b/Documentation/git-index-pack.txt @@ -0,0 +1,44 @@ +git-index-pack(1) +================= + +NAME +---- +git-index-pack - Build pack index file for an existing packed archive + + +SYNOPSIS +-------- +'git-index-pack' [-o ] + + +DESCRIPTION +----------- +Reads a packed archive (.pack) from the specified file, and +builds a pack index file (.idx) for it. The packed archive +together with the pack index can then be placed in the +objects/pack/ directory of a git repository. + + +OPTIONS +------- +-o :: + Write the generated pack index into the specified + file. Without this option the name of pack index + file is constructed from the name of packed archive + file by replacing .pack with .idx (and the program + fails if the name of packed archive does not end + with .pack). + + +Author +------ +Written by Sergey Vlasov + +Documentation +------------- +Documentation by Sergey Vlasov + +GIT +--- +Part of the gitlink:git[7] suite + diff --git a/Documentation/git-init-db.txt b/Documentation/git-init-db.txt index fb8b52253e..ef1826ae67 100644 --- a/Documentation/git-init-db.txt +++ b/Documentation/git-init-db.txt @@ -1,6 +1,5 @@ git-init-db(1) ============== -v0.1, May 2005 NAME ---- @@ -37,5 +36,5 @@ Documentation by David Greaves, Junio C Hamano and the git-list ... +'git-log'