diff --git a/Documentation/.gitignore b/Documentation/.gitignore index c87c61af00..a531be32dc 100644 --- a/Documentation/.gitignore +++ b/Documentation/.gitignore @@ -5,3 +5,4 @@ howto-index.txt doc.dep README +cmds-*.txt diff --git a/Documentation/Makefile b/Documentation/Makefile index 9f2d242e59..96755ad687 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -71,11 +71,21 @@ doc.dep : $(wildcard *.txt) build-docdep.perl -include doc.dep -git.7 git.html: git.txt core-intro.txt +cmds_txt = cmds-ancillaryinterrogators.txt \ + cmds-ancillarymanipulators.txt \ + cmds-mainporcelain.txt \ + cmds-plumbinginterrogators.txt \ + cmds-plumbingmanipulators.txt \ + cmds-synchingrepositories.txt +$(cmds_txt): cmd-list.perl $(MAN1_TXT) $(MAN7_TXT) + perl ./cmd-list.perl + +git.7 git.html: git.txt core-intro.txt clean: rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep + rm -f $(cmds_txt) %.html : %.txt asciidoc -b xhtml11 -d manpage -f asciidoc.conf $< diff --git a/Documentation/cmd-list.perl b/Documentation/cmd-list.perl new file mode 100755 index 0000000000..5680dcbf9a --- /dev/null +++ b/Documentation/cmd-list.perl @@ -0,0 +1,184 @@ +# + +sub format_one { + my ($out, $name) = @_; + my ($state, $description); + open I, '<', "$name.txt" or die "No such file $name.txt"; + while () { + if (/^NAME$/) { + $state = 1; + next; + } + if ($state == 1 && /^----$/) { + $state = 2; + next; + } + next if ($state != 2); + chomp; + $description = $_; + last; + } + close I; + if (!defined $description) { + die "No description found in $name.txt"; + } + if (my ($verify_name, $text) = ($description =~ /^($name) - (.*)/)) { + print $out "gitlink:$name\[1\]::\n"; + print $out "\t$text.\n\n"; + } + else { + die "Description does not match $name: $description"; + } +} + +my %cmds = (); +while () { + next if /^#/; + + chomp; + my ($name, $cat) = /^(\S+)\s+(.*)$/; + push @{$cmds{$cat}}, $name; +} + +for my $cat (qw(ancillaryinterrogators + ancillarymanipulators + mainporcelain + plumbinginterrogators + plumbingmanipulators + synchingrepositories)) { + my $out = "cmds-$cat.txt"; + open O, '>', "$out+" or die "Cannot open output file $out+"; + for (@{$cmds{$cat}}) { + format_one(\*O, $_); + } + close O; + rename "$out+", "$out"; +} + +__DATA__ +git-add mainporcelain +git-am mainporcelain +git-annotate ancillaryinterrogators +git-applymbox mainporcelain +git-applypatch ancillarymanipulators +git-apply plumbingmanipulators +git-archimport ancillarymanipulators +git-archive mainporcelain +git-bisect mainporcelain +git-blame ancillaryinterrogators +git-branch mainporcelain +git-cat-file plumbinginterrogators +git-checkout-index plumbingmanipulators +git-checkout mainporcelain +git-check-ref-format ancillaryinterrogators +git-cherry ancillaryinterrogators +git-cherry-pick mainporcelain +git-clean mainporcelain +git-clone mainporcelain +git-commit mainporcelain +git-commit-tree plumbingmanipulators +git-convert-objects ancillarymanipulators +git-count-objects ancillaryinterrogators +git-cvsexportcommit ancillarymanipulators +git-cvsimport ancillarymanipulators +git-cvsserver ancillarymanipulators +git-daemon ancillaryinterrogators +git-describe plumbinginterrogators +git-diff-files plumbinginterrogators +git-diff-index plumbinginterrogators +git-diff mainporcelain +git-diff-stages plumbinginterrogators +git-diff-tree plumbinginterrogators +git-fetch mainporcelain +git-fetch-pack synchingrepositories +git-fmt-merge-msg ancillaryinterrogators +git-for-each-ref plumbinginterrogators +git-format-patch mainporcelain +git-fsck-objects plumbinginterrogators +git-gc ancillarymanipulators +git-get-tar-commit-id ancillaryinterrogators +git-grep mainporcelain +git-hash-object plumbingmanipulators +git-http-fetch synchingrepositories +git-http-push synchingrepositories +git-imap-send ancillaryinterrogators +git-index-pack plumbingmanipulators +git-init plumbingmanipulators +git-instaweb ancillaryinterrogators +gitk mainporcelain +git-local-fetch synchingrepositories +git-log mainporcelain +git-lost-found ancillarymanipulators +git-ls-files plumbinginterrogators +git-ls-remote mainporcelain +git-ls-tree plumbinginterrogators +git-mailinfo ancillaryinterrogators +git-mailsplit ancillaryinterrogators +git-merge-base plumbinginterrogators +git-merge-file plumbingmanipulators +git-merge-index plumbingmanipulators +git-merge mainporcelain +git-merge-one-file ancillarymanipulators +git-merge-tree ancillaryinterrogators +git-mktag plumbingmanipulators +git-mktree plumbingmanipulators +git-mv mainporcelain +git-name-rev plumbinginterrogators +git-pack-objects plumbingmanipulators +git-pack-redundant plumbinginterrogators +git-pack-refs mainporcelain +git-parse-remote ancillaryinterrogators +git-patch-id ancillaryinterrogators +git-peek-remote synchingrepositories +git-prune ancillarymanipulators +git-prune-packed plumbingmanipulators +git-pull mainporcelain +git-push mainporcelain +git-quiltimport ancillarymanipulators +git-read-tree plumbingmanipulators +git-rebase mainporcelain +git-receive-pack synchingrepositories +git-reflog ancillarymanipulators +git-relink ancillarymanipulators +git-repack mainporcelain +git-repo-config plumbingmanipulators +git-request-pull ancillaryinterrogators +git-rerere mainporcelain +git-reset mainporcelain +git-resolve mainporcelain +git-revert mainporcelain +git-rev-list plumbinginterrogators +git-rev-parse ancillaryinterrogators +git-rm mainporcelain +git-runstatus ancillaryinterrogators +git-send-email ancillaryinterrogators +git-send-pack synchingrepositories +git-shell synchingrepositories +git-shortlog mainporcelain +git-show mainporcelain +git-show-branch mainporcelain +git-show-index plumbinginterrogators +git-show-ref plumbinginterrogators +git-sh-setup ancillarymanipulators +git-ssh-fetch synchingrepositories +git-ssh-upload synchingrepositories +git-status mainporcelain +git-stripspace ancillaryinterrogators +git-svn ancillarymanipulators +git-svnimport ancillarymanipulators +git-symbolic-ref ancillaryinterrogators +git-symbolic-ref ancillarymanipulators +git-tag ancillarymanipulators +git-tar-tree plumbinginterrogators +git-unpack-file plumbinginterrogators +git-unpack-objects plumbingmanipulators +git-update-index plumbingmanipulators +git-update-ref ancillarymanipulators +git-update-server-info synchingrepositories +git-upload-archive synchingrepositories +git-upload-pack synchingrepositories +git-var plumbinginterrogators +git-verify-pack plumbinginterrogators +git-verify-tag mainporcelain +git-whatchanged mainporcelain +git-write-tree plumbingmanipulators diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 53e81cb103..aa4ce1ddb0 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -3,7 +3,7 @@ git-am(1) NAME ---- -git-am - Apply a series of patches in a mailbox +git-am - Apply a series of patches from a mailbox SYNOPSIS diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index 33b93db508..065ba1bf24 100644 --- a/Documentation/git-apply.txt +++ b/Documentation/git-apply.txt @@ -3,7 +3,7 @@ git-apply(1) NAME ---- -git-apply - Apply patch on a git index file and a work tree +git-apply - Apply a patch on a git index file and a working tree SYNOPSIS diff --git a/Documentation/git-applypatch.txt b/Documentation/git-applypatch.txt index 2b1ff1454b..451434a757 100644 --- a/Documentation/git-applypatch.txt +++ b/Documentation/git-applypatch.txt @@ -12,6 +12,9 @@ SYNOPSIS DESCRIPTION ----------- +This is usually not what an end user wants to run directly. See +gitlink:git-am[1] instead. + Takes three files , , and prepared from an e-mail message by 'git-mailinfo', and creates a commit. It is usually not necessary to use this command directly. diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt index 031fcd5190..493474b2ee 100644 --- a/Documentation/git-archive.txt +++ b/Documentation/git-archive.txt @@ -3,7 +3,7 @@ git-archive(1) NAME ---- -git-archive - Creates a archive of the files in the named tree +git-archive - Creates an archive of files from a named tree SYNOPSIS diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt index ac4b4965a9..16ec7269b2 100644 --- a/Documentation/git-bisect.txt +++ b/Documentation/git-bisect.txt @@ -3,7 +3,7 @@ git-bisect(1) NAME ---- -git-bisect - Find the change that introduced a bug +git-bisect - Find the change that introduced a bug by binary search SYNOPSIS diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt index b14e794077..5dd8e36bbd 100644 --- a/Documentation/git-blame.txt +++ b/Documentation/git-blame.txt @@ -118,9 +118,12 @@ SPECIFYING RANGES Unlike `git-blame` and `git-annotate` in older git, the extent of annotation can be limited to both line ranges and revision ranges. When you are interested in finding the origin for -ll. 40-60 for file `foo`, you can use `-L` option like this: +ll. 40-60 for file `foo`, you can use `-L` option like these +(they mean the same thing -- both ask for 21 lines starting at +line 40): git blame -L 40,60 foo + git blame -L 40,+21 foo Also you can use regular expression to specify the line range. diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index d5f8118261..aa1fdd402a 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -3,7 +3,7 @@ git-branch(1) NAME ---- -git-branch - List, create, or delete branches. +git-branch - List, create, or delete branches SYNOPSIS -------- diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt index 5e9cbf875d..7e90ce91bc 100644 --- a/Documentation/git-cat-file.txt +++ b/Documentation/git-cat-file.txt @@ -3,7 +3,7 @@ git-cat-file(1) NAME ---- -git-cat-file - Provide content or type information for repository objects +git-cat-file - Provide content or type/size information for repository objects SYNOPSIS diff --git a/Documentation/git-checkout-index.txt b/Documentation/git-checkout-index.txt index 765c173e15..6dd6db04bb 100644 --- a/Documentation/git-checkout-index.txt +++ b/Documentation/git-checkout-index.txt @@ -3,7 +3,7 @@ git-checkout-index(1) NAME ---- -git-checkout-index - Copy files from the index to the working directory +git-checkout-index - Copy files from the index to the working tree SYNOPSIS diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt index 875edb6b9f..3149d08da8 100644 --- a/Documentation/git-cherry-pick.txt +++ b/Documentation/git-cherry-pick.txt @@ -19,6 +19,8 @@ OPTIONS ------- :: Commit to cherry-pick. + For a more complete list of ways to spell commits, see + "SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1]. -e|--edit:: With this option, `git-cherry-pick` will let you edit the commit diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index a78207461d..707376f22c 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -3,7 +3,7 @@ git-clone(1) NAME ---- -git-clone - Clones a repository +git-clone - Clones a repository into a new directory SYNOPSIS diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt index 77ba96ed8a..cf25507f8f 100644 --- a/Documentation/git-commit-tree.txt +++ b/Documentation/git-commit-tree.txt @@ -3,7 +3,7 @@ git-commit-tree(1) NAME ---- -git-commit-tree - Creates a new commit object +git-commit-tree - Create a new commit object SYNOPSIS @@ -12,6 +12,9 @@ SYNOPSIS DESCRIPTION ----------- +This is usually not what an end user wants to run directly. See +gitlink:git-commit[1] instead. + Creates a new commit object based on the provided tree object and emits the new commit object id on stdout. If no parent is given then it is considered to be an initial tree. diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index bd1c22b316..532703a674 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -3,7 +3,7 @@ git-commit(1) NAME ---- -git-commit - Record your changes +git-commit - Record changes to the repository SYNOPSIS -------- diff --git a/Documentation/git-count-objects.txt b/Documentation/git-count-objects.txt index c59df6438c..91c8c92c76 100644 --- a/Documentation/git-count-objects.txt +++ b/Documentation/git-count-objects.txt @@ -3,7 +3,7 @@ git-count-objects(1) NAME ---- -git-count-objects - Reports on unpacked objects +git-count-objects - Count unpacked number of objects and their disk consumption SYNOPSIS -------- diff --git a/Documentation/git-cvsexportcommit.txt b/Documentation/git-cvsexportcommit.txt index 092d0d6730..347cbcec35 100644 --- a/Documentation/git-cvsexportcommit.txt +++ b/Documentation/git-cvsexportcommit.txt @@ -3,7 +3,7 @@ git-cvsexportcommit(1) NAME ---- -git-cvsexportcommit - Export a commit to a CVS checkout +git-cvsexportcommit - Export a single commit to a CVS checkout SYNOPSIS diff --git a/Documentation/git-cvsimport.txt b/Documentation/git-cvsimport.txt index 44713949a5..f5450de74a 100644 --- a/Documentation/git-cvsimport.txt +++ b/Documentation/git-cvsimport.txt @@ -3,7 +3,7 @@ git-cvsimport(1) NAME ---- -git-cvsimport - Import a CVS repository into git +git-cvsimport - Salvage your data out of another SCM people love to hate SYNOPSIS diff --git a/Documentation/git-diff-stages.txt b/Documentation/git-diff-stages.txt index 3273918627..120d14e87e 100644 --- a/Documentation/git-diff-stages.txt +++ b/Documentation/git-diff-stages.txt @@ -3,7 +3,7 @@ git-diff-stages(1) NAME ---- -git-diff-stages - Compares content and mode of blobs between stages in an unmerged index file +git-diff-stages - Compares two merge stages in the index SYNOPSIS diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index 8977877b21..6a098df26b 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -47,6 +47,9 @@ Just in case if you are doing something exotic, it should be noted that all of the in the above description can be any . +For a more complete list of ways to spell , see +"SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1]. + OPTIONS ------- diff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt index 3e6cd880b0..90ef127d12 100644 --- a/Documentation/git-fetch-pack.txt +++ b/Documentation/git-fetch-pack.txt @@ -12,6 +12,9 @@ SYNOPSIS DESCRIPTION ----------- +Usually you would want to use gitlink:git-fetch[1] which is a +higher level wrapper of this command instead. + Invokes 'git-upload-pack' on a potentially remote repository, and asks it to send objects missing from this repository, to update the named heads. The list of commits available locally diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt index a9e86fd26b..7ecf2408d6 100644 --- a/Documentation/git-fetch.txt +++ b/Documentation/git-fetch.txt @@ -3,7 +3,7 @@ git-fetch(1) NAME ---- -git-fetch - Download objects and a head from another repository +git-fetch - Download objects and refs from another repository SYNOPSIS diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index 23acb47528..59f34b9f0d 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -12,6 +12,7 @@ SYNOPSIS 'git-format-patch' [-n | -k] [-o | --stdout] [--attach] [--thread] [-s | --signoff] [--diff-options] [--start-number ] [--in-reply-to=Message-Id] [--suffix=.] + [--ignore-if-in-upstream] [..] DESCRIPTION @@ -20,7 +21,9 @@ DESCRIPTION Prepare each commit between and with its patch in one file per commit, formatted to resemble UNIX mailbox format. If .. is not specified, the head of the current working -tree is implied. +tree is implied. For a more complete list of ways to spell + and , see "SPECIFYING REVISIONS" section in +gitlink:git-rev-parse[1]. The output of this command is convenient for e-mail submission or for use with gitlink:git-am[1]. @@ -78,10 +81,17 @@ OPTIONS reply to the given Message-Id, which avoids breaking threads to provide a new patch series. +--ignore-if-in-upstream:: + Do not include a patch that matches a commit in + ... This will examine all patches reachable + from but not from and compare them with the + patches being generated, and any patch that matches is + ignored. + --suffix=.:: - Instead of using `.txt` as the suffix for generated + Instead of using `.patch` as the suffix for generated filenames, use specifed suffix. A common alternative is - `--suffix=.patch`. + `--suffix=.txt`. + Note that you would need to include the leading dot `.` if you want a filename like `0001-description-of-my-change.patch`, and @@ -91,15 +101,14 @@ not add any suffix. CONFIGURATION ------------- You can specify extra mail header lines to be added to each -message in the repository configuration as follows: +message in the repository configuration. Also you can specify +the default suffix different from the built-in one: +------------ [format] headers = "Organization: git-foo\n" - -You can specify default suffix used: - -[format] - suffix = .patch + suffix = .txt +------------ EXAMPLES @@ -124,6 +133,9 @@ git-format-patch -M -B origin:: understand renaming patches, so use it only when you know the recipient uses git to apply your patch. +git-format-patch -3:: + Extract three topmost commits from the current branch + and format them as e-mailable patches. See Also -------- diff --git a/Documentation/git-hash-object.txt b/Documentation/git-hash-object.txt index 04e8d00436..5edc36f060 100644 --- a/Documentation/git-hash-object.txt +++ b/Documentation/git-hash-object.txt @@ -3,7 +3,7 @@ git-hash-object(1) NAME ---- -git-hash-object - Computes object ID and optionally creates a blob from a file +git-hash-object - Compute object ID and optionally creates a blob from a file SYNOPSIS diff --git a/Documentation/git-http-fetch.txt b/Documentation/git-http-fetch.txt index 3d508094af..7dc2df3044 100644 --- a/Documentation/git-http-fetch.txt +++ b/Documentation/git-http-fetch.txt @@ -3,7 +3,7 @@ git-http-fetch(1) NAME ---- -git-http-fetch - downloads a remote git repository via HTTP +git-http-fetch - Download from a remote git repository via HTTP SYNOPSIS diff --git a/Documentation/git-http-push.txt b/Documentation/git-http-push.txt index c2485c6e9c..4b4a46169c 100644 --- a/Documentation/git-http-push.txt +++ b/Documentation/git-http-push.txt @@ -3,7 +3,7 @@ git-http-push(1) NAME ---- -git-http-push - Push missing objects using HTTP/DAV +git-http-push - Push objects over HTTP/DAV to another repository SYNOPSIS diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt index 596b567c90..1b64d3ab03 100644 --- a/Documentation/git-init.txt +++ b/Documentation/git-init.txt @@ -3,7 +3,7 @@ git-init(1) NAME ---- -git-init - Creates an empty git repository +git-init - Create an empty git repository or reinitialize an existing one SYNOPSIS diff --git a/Documentation/git-instaweb.txt b/Documentation/git-instaweb.txt index 7dd393b97f..52a6aa6e82 100644 --- a/Documentation/git-instaweb.txt +++ b/Documentation/git-instaweb.txt @@ -3,7 +3,7 @@ git-instaweb(1) NAME ---- -git-instaweb - instantly browse your working repository in gitweb +git-instaweb - Instantly browse your working repository in gitweb SYNOPSIS -------- diff --git a/Documentation/git-local-fetch.txt b/Documentation/git-local-fetch.txt index 2fbdfe086a..22048d82bd 100644 --- a/Documentation/git-local-fetch.txt +++ b/Documentation/git-local-fetch.txt @@ -3,7 +3,7 @@ git-local-fetch(1) NAME ---- -git-local-fetch - Duplicates another git repository on a local system +git-local-fetch - Duplicate another git repository on a local system SYNOPSIS diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 60610f91f4..b8029463d9 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -34,6 +34,9 @@ include::pretty-formats.txt[] Show only commits between the named two commits. When either or is omitted, it defaults to `HEAD`, i.e. the tip of the current branch. + For a more complete list of ways to spell + and , see "SPECIFYING REVISIONS" section in + gitlink:git-rev-parse[1]. -p:: Show the change the commit introduces in a patch form. diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt index 8520b97111..79e0b7b71a 100644 --- a/Documentation/git-ls-files.txt +++ b/Documentation/git-ls-files.txt @@ -3,7 +3,7 @@ git-ls-files(1) NAME ---- -git-ls-files - Information about files in the index/working directory +git-ls-files - Show information about files in the index and the working tree SYNOPSIS diff --git a/Documentation/git-ls-tree.txt b/Documentation/git-ls-tree.txt index f283bacb65..7899394081 100644 --- a/Documentation/git-ls-tree.txt +++ b/Documentation/git-ls-tree.txt @@ -3,7 +3,7 @@ git-ls-tree(1) NAME ---- -git-ls-tree - Lists the contents of a tree object +git-ls-tree - List the contents of a tree object SYNOPSIS diff --git a/Documentation/git-mailinfo.txt b/Documentation/git-mailinfo.txt index 5088bbea84..ba18133ead 100644 --- a/Documentation/git-mailinfo.txt +++ b/Documentation/git-mailinfo.txt @@ -3,7 +3,7 @@ git-mailinfo(1) NAME ---- -git-mailinfo - Extracts patch from a single e-mail message +git-mailinfo - Extracts patch and authorship from a single e-mail message SYNOPSIS @@ -18,7 +18,7 @@ writes the commit log message in file, and the patches in file. The author name, e-mail and e-mail subject are written out to the standard output to be used by git-applypatch to create a commit. It is usually not necessary to use this -command directly. +command directly. See gitlink:git-am[1] instead. OPTIONS diff --git a/Documentation/git-mailsplit.txt b/Documentation/git-mailsplit.txt index 5a17801f6a..c11d6a530f 100644 --- a/Documentation/git-mailsplit.txt +++ b/Documentation/git-mailsplit.txt @@ -3,7 +3,7 @@ git-mailsplit(1) NAME ---- -git-mailsplit - Totally braindamaged mbox splitter program +git-mailsplit - Simple UNIX mbox splitter program SYNOPSIS -------- diff --git a/Documentation/git-merge-base.txt b/Documentation/git-merge-base.txt index 6099be2add..3190aed108 100644 --- a/Documentation/git-merge-base.txt +++ b/Documentation/git-merge-base.txt @@ -3,7 +3,7 @@ git-merge-base(1) NAME ---- -git-merge-base - Finds as good a common ancestor as possible for a merge +git-merge-base - Find as good common ancestors as possible for a merge SYNOPSIS diff --git a/Documentation/git-merge-file.txt b/Documentation/git-merge-file.txt index 29d3faa556..31882abb87 100644 --- a/Documentation/git-merge-file.txt +++ b/Documentation/git-merge-file.txt @@ -3,7 +3,7 @@ git-merge-file(1) NAME ---- -git-merge-file - three-way file merge +git-merge-file - Run a three-way file merge SYNOPSIS diff --git a/Documentation/git-merge-index.txt b/Documentation/git-merge-index.txt index 0cf505ea84..b8ee1ff2b0 100644 --- a/Documentation/git-merge-index.txt +++ b/Documentation/git-merge-index.txt @@ -3,7 +3,7 @@ git-merge-index(1) NAME ---- -git-merge-index - Runs a merge for files needing merging +git-merge-index - Run a merge for files needing merging SYNOPSIS diff --git a/Documentation/git-merge-one-file.txt b/Documentation/git-merge-one-file.txt index 86aad37c6a..f80ab3b8c4 100644 --- a/Documentation/git-merge-one-file.txt +++ b/Documentation/git-merge-one-file.txt @@ -3,7 +3,7 @@ git-merge-one-file(1) NAME ---- -git-merge-one-file - The standard helper program to use with "git-merge-index" +git-merge-one-file - The standard helper program to use with git-merge-index SYNOPSIS diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index 0f79665ea6..3c08a6f7db 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -3,7 +3,7 @@ git-merge(1) NAME ---- -git-merge - Grand Unified Merge Driver +git-merge - Join two or more development histories together SYNOPSIS diff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt index 207c43a631..6756b76bb1 100644 --- a/Documentation/git-mv.txt +++ b/Documentation/git-mv.txt @@ -3,7 +3,7 @@ git-mv(1) NAME ---- -git-mv - Move or rename a file, directory or symlink +git-mv - Move or rename a file, a directory, or a symlink SYNOPSIS diff --git a/Documentation/git-pack-redundant.txt b/Documentation/git-pack-redundant.txt index 7d54b17e37..be2c64eb57 100644 --- a/Documentation/git-pack-redundant.txt +++ b/Documentation/git-pack-redundant.txt @@ -3,7 +3,7 @@ git-pack-redundant(1) NAME ---- -git-pack-redundant - Program used to find redundant pack files +git-pack-redundant - Find redundant pack files SYNOPSIS diff --git a/Documentation/git-parse-remote.txt b/Documentation/git-parse-remote.txt index fc27afe26d..11b1f4d2e2 100644 --- a/Documentation/git-parse-remote.txt +++ b/Documentation/git-parse-remote.txt @@ -3,7 +3,7 @@ git-parse-remote(1) NAME ---- -git-parse-remote - Routines to help parsing $GIT_DIR/remotes/ +git-parse-remote - Routines to help parsing remote repository access parameters SYNOPSIS @@ -14,7 +14,8 @@ DESCRIPTION ----------- This script is included in various scripts to supply routines to parse files under $GIT_DIR/remotes/ and -$GIT_DIR/branches/. +$GIT_DIR/branches/ and configuration variables that are related +to fetching, pulling and pushing. The primary entry points are: @@ -25,7 +26,8 @@ get_remote_refs_for_fetch:: (e.g. `refs/heads/foo`). When `...` is empty the returned list of refs consists of the defaults for the given ``, if specified in - `$GIT_DIR/remotes/` or `$GIT_DIR/branches/`. + `$GIT_DIR/remotes/`, `$GIT_DIR/branches/`, or `remote.*.fetch` + configuration. get_remote_refs_for_push:: Given the list of user-supplied ` ...`, diff --git a/Documentation/git-patch-id.txt b/Documentation/git-patch-id.txt index 5389097f73..a7e9fd021a 100644 --- a/Documentation/git-patch-id.txt +++ b/Documentation/git-patch-id.txt @@ -3,7 +3,7 @@ git-patch-id(1) NAME ---- -git-patch-id - Generate a patch ID +git-patch-id - Compute unique ID for a patch SYNOPSIS -------- diff --git a/Documentation/git-peek-remote.txt b/Documentation/git-peek-remote.txt index a00060c507..ac57cda3a5 100644 --- a/Documentation/git-peek-remote.txt +++ b/Documentation/git-peek-remote.txt @@ -3,7 +3,7 @@ git-peek-remote(1) NAME ---- -git-peek-remote - Lists the references in a remote repository +git-peek-remote - List the references in a remote repository SYNOPSIS diff --git a/Documentation/git-prune-packed.txt b/Documentation/git-prune-packed.txt index a79193fb00..310033e460 100644 --- a/Documentation/git-prune-packed.txt +++ b/Documentation/git-prune-packed.txt @@ -3,8 +3,7 @@ git-prune-packed(1) NAME ---- -git-prune-packed - Program used to remove the extra object files that are now -residing in a pack file. +git-prune-packed - Remove extra objects that are already in pack files SYNOPSIS diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt index a90b764cc9..3e5f115728 100644 --- a/Documentation/git-pull.txt +++ b/Documentation/git-pull.txt @@ -3,7 +3,7 @@ git-pull(1) NAME ---- -git-pull - Pull and merge from another repository or a local branch +git-pull - Fetch from and merge with another repository or a local branch SYNOPSIS diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 03e867a403..0cb9e1f10a 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -3,7 +3,7 @@ git-rebase(1) NAME ---- -git-rebase - Rebase local commits to a new head +git-rebase - Forward-port local commits to the updated upstream head SYNOPSIS -------- diff --git a/Documentation/git-receive-pack.txt b/Documentation/git-receive-pack.txt index 0dfadc2a32..10e8c46c4c 100644 --- a/Documentation/git-receive-pack.txt +++ b/Documentation/git-receive-pack.txt @@ -3,7 +3,7 @@ git-receive-pack(1) NAME ---- -git-receive-pack - Receive what is pushed into it +git-receive-pack - Receive what is pushed into the repository SYNOPSIS diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt index 0fa47e3b01..4a57ce8601 100644 --- a/Documentation/git-repack.txt +++ b/Documentation/git-repack.txt @@ -3,8 +3,7 @@ git-repack(1) NAME ---- -git-repack - Script used to pack a repository from a collection of -objects into pack files. +git-repack - Pack unpacked objects in a repository SYNOPSIS diff --git a/Documentation/git-repo-config.txt b/Documentation/git-repo-config.txt index c55a8ba0dc..9db3d30825 100644 --- a/Documentation/git-repo-config.txt +++ b/Documentation/git-repo-config.txt @@ -3,7 +3,7 @@ git-repo-config(1) NAME ---- -git-repo-config - Get and set repository or global options. +git-repo-config - Get and set repository or global options SYNOPSIS diff --git a/Documentation/git-rerere.txt b/Documentation/git-rerere.txt index c65c59e861..139b6eb773 100644 --- a/Documentation/git-rerere.txt +++ b/Documentation/git-rerere.txt @@ -3,7 +3,7 @@ git-rerere(1) NAME ---- -git-rerere - Reuse recorded resolve +git-rerere - Reuse recorded resolution of conflicted merges SYNOPSIS -------- diff --git a/Documentation/git-resolve.txt b/Documentation/git-resolve.txt index 4e57c2b287..0925973f12 100644 --- a/Documentation/git-resolve.txt +++ b/Documentation/git-resolve.txt @@ -12,6 +12,8 @@ SYNOPSIS DESCRIPTION ----------- +DEPRECATED. Use `git-merge` instead. + Given two commits and a merge message, merge the commit into commit, with the commit log message . diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt index 4eaf5a0d1e..aeb37b65d2 100644 --- a/Documentation/git-rev-parse.txt +++ b/Documentation/git-rev-parse.txt @@ -152,6 +152,14 @@ blobs contained in a commit. used immediately following a ref name and the ref must have an existing log ($GIT_DIR/logs/). +* A ref followed by the suffix '@' with an ordinal specification + enclosed in a brace pair (e.g. '\{1\}', '\{15\}') to specify + the n-th prior value of that ref. For example 'master@\{1\}' + is the immediate prior value of 'master' while 'master@\{5\}' + is the 5th prior value of 'master'. This suffix may only be used + immediately following a ref name and the ref must have an existing + log ($GIT_DIR/logs/). + * A suffix '{caret}' to a revision parameter means the first parent of that commit object. '{caret}' means the th parent (i.e. 'rev{caret}' diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt index 71f7815d65..8081bbaffa 100644 --- a/Documentation/git-revert.txt +++ b/Documentation/git-revert.txt @@ -19,6 +19,8 @@ OPTIONS ------- :: Commit to revert. + For a more complete list of ways to spell commit names, see + "SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1]. -e|--edit:: With this option, `git-revert` will let you edit the commit diff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt index 5376f68548..eea8fe8af3 100644 --- a/Documentation/git-send-pack.txt +++ b/Documentation/git-send-pack.txt @@ -3,7 +3,7 @@ git-send-pack(1) NAME ---- -git-send-pack - Push missing objects packed +git-send-pack - Push objects over git protocol to another reposiotory SYNOPSIS @@ -12,6 +12,9 @@ SYNOPSIS DESCRIPTION ----------- +Usually you would want to use gitlink:git-push[1] which is a +higher level wrapper of this command instead. + Invokes 'git-receive-pack' on a possibly remote repository, and updates it from the current repository, sending named refs. diff --git a/Documentation/git-shell.txt b/Documentation/git-shell.txt index cc4266d83b..228b9f14f3 100644 --- a/Documentation/git-shell.txt +++ b/Documentation/git-shell.txt @@ -3,7 +3,7 @@ git-shell(1) NAME ---- -git-shell - Restricted login shell for GIT over SSH only +git-shell - Restricted login shell for GIT-only SSH access SYNOPSIS diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt index c210b9af6b..9051951c34 100644 --- a/Documentation/git-show.txt +++ b/Documentation/git-show.txt @@ -32,6 +32,8 @@ OPTIONS ------- :: The name of the object to show. + For a more complete list of ways to spell object names, see + "SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1]. include::pretty-formats.txt[] diff --git a/Documentation/git-ssh-fetch.txt b/Documentation/git-ssh-fetch.txt index b7116b30e0..192b1f15a9 100644 --- a/Documentation/git-ssh-fetch.txt +++ b/Documentation/git-ssh-fetch.txt @@ -3,7 +3,7 @@ git-ssh-fetch(1) NAME ---- -git-ssh-fetch - Pulls from a remote repository over ssh connection +git-ssh-fetch - Fetch from a remote repository over ssh connection diff --git a/Documentation/git-ssh-upload.txt b/Documentation/git-ssh-upload.txt index 702674e45d..a9b7e9f974 100644 --- a/Documentation/git-ssh-upload.txt +++ b/Documentation/git-ssh-upload.txt @@ -3,7 +3,7 @@ git-ssh-upload(1) NAME ---- -git-ssh-upload - Pushes to a remote repository over ssh connection +git-ssh-upload - Push to a remote repository over ssh connection SYNOPSIS diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt index 7f86d8cd5d..03871e5d73 100644 --- a/Documentation/git-status.txt +++ b/Documentation/git-status.txt @@ -3,7 +3,7 @@ git-status(1) NAME ---- -git-status - Show working tree status +git-status - Show the working tree status SYNOPSIS diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 321083d461..b95ff1da96 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -3,7 +3,7 @@ git-svn(1) NAME ---- -git-svn - bidirectional operation between Subversion and git +git-svn - Bidirectional operation between a single Subversion branch and git SYNOPSIS -------- diff --git a/Documentation/git-symbolic-ref.txt b/Documentation/git-symbolic-ref.txt index fec3b4f64a..f93b79a85e 100644 --- a/Documentation/git-symbolic-ref.txt +++ b/Documentation/git-symbolic-ref.txt @@ -3,7 +3,7 @@ git-symbolic-ref(1) NAME ---- -git-symbolic-ref - read and modify symbolic refs +git-symbolic-ref - Read and modify symbolic refs SYNOPSIS -------- diff --git a/Documentation/git-tar-tree.txt b/Documentation/git-tar-tree.txt index bc3360f079..595940524e 100644 --- a/Documentation/git-tar-tree.txt +++ b/Documentation/git-tar-tree.txt @@ -3,7 +3,7 @@ git-tar-tree(1) NAME ---- -git-tar-tree - Creates a tar archive of the files in the named tree +git-tar-tree - Create a tar archive of the files in the named tree object SYNOPSIS diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt index 0e0a3af1be..5bbae42d86 100644 --- a/Documentation/git-update-index.txt +++ b/Documentation/git-update-index.txt @@ -3,7 +3,7 @@ git-update-index(1) NAME ---- -git-update-index - Modifies the index or directory cache +git-update-index - Register file contents in the working tree to the index SYNOPSIS diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt index 71bcb7954f..9424feab32 100644 --- a/Documentation/git-update-ref.txt +++ b/Documentation/git-update-ref.txt @@ -3,7 +3,7 @@ git-update-ref(1) NAME ---- -git-update-ref - update the object name stored in a ref safely +git-update-ref - Update the object name stored in a ref safely SYNOPSIS -------- diff --git a/Documentation/git-upload-archive.txt b/Documentation/git-upload-archive.txt index 388bb53d29..403871d7c6 100644 --- a/Documentation/git-upload-archive.txt +++ b/Documentation/git-upload-archive.txt @@ -3,7 +3,7 @@ git-upload-archive(1) NAME ---- -git-upload-archive - Send archive +git-upload-archive - Send archive back to git-archive SYNOPSIS diff --git a/Documentation/git-upload-pack.txt b/Documentation/git-upload-pack.txt index b2c9307661..9da062d5c9 100644 --- a/Documentation/git-upload-pack.txt +++ b/Documentation/git-upload-pack.txt @@ -3,7 +3,7 @@ git-upload-pack(1) NAME ---- -git-upload-pack - Send missing objects packed +git-upload-pack - Send objects packed back to git-fetch-pack SYNOPSIS diff --git a/Documentation/git-var.txt b/Documentation/git-var.txt index a5b1a0dbab..8a50638e98 100644 --- a/Documentation/git-var.txt +++ b/Documentation/git-var.txt @@ -3,7 +3,7 @@ git-var(1) NAME ---- -git-var - Print the git users identity +git-var - Show a git logical variable SYNOPSIS diff --git a/Documentation/git-write-tree.txt b/Documentation/git-write-tree.txt index c85fa89c30..96d5e07b11 100644 --- a/Documentation/git-write-tree.txt +++ b/Documentation/git-write-tree.txt @@ -3,7 +3,7 @@ git-write-tree(1) NAME ---- -git-write-tree - Creates a tree object from the current index +git-write-tree - Create a tree object from the current index SYNOPSIS diff --git a/Documentation/git.txt b/Documentation/git.txt index a0bcef71d7..ac222060ea 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -81,245 +81,17 @@ ancillary user utilities. Main porcelain commands ~~~~~~~~~~~~~~~~~~~~~~~ -gitlink:git-add[1]:: - Add paths to the index. - -gitlink:git-am[1]:: - Apply patches from a mailbox, but cooler. - -gitlink:git-applymbox[1]:: - Apply patches from a mailbox, original version by Linus. - -gitlink:git-archive[1]:: - Creates an archive of files from a named tree. - -gitlink:git-bisect[1]:: - Find the change that introduced a bug by binary search. - -gitlink:git-branch[1]:: - Create and Show branches. - -gitlink:git-checkout[1]:: - Checkout and switch to a branch. - -gitlink:git-cherry-pick[1]:: - Cherry-pick the effect of an existing commit. - -gitlink:git-clean[1]:: - Remove untracked files from the working tree. - -gitlink:git-clone[1]:: - Clones a repository into a new directory. - -gitlink:git-commit[1]:: - Record changes to the repository. - -gitlink:git-diff[1]:: - Show changes between commits, commit and working tree, etc. - -gitlink:git-fetch[1]:: - Download from a remote repository via various protocols. - -gitlink:git-format-patch[1]:: - Prepare patches for e-mail submission. - -gitlink:git-grep[1]:: - Print lines matching a pattern. - -gitlink:gitk[1]:: - The git repository browser. - -gitlink:git-log[1]:: - Shows commit logs. - -gitlink:git-ls-remote[1]:: - Shows references in a remote or local repository. - -gitlink:git-merge[1]:: - Grand unified merge driver. - -gitlink:git-mv[1]:: - Move or rename a file, a directory, or a symlink. - -gitlink:git-pack-refs[1]:: - Pack heads and tags for efficient repository access. - -gitlink:git-pull[1]:: - Fetch from and merge with a remote repository or a local branch. - -gitlink:git-push[1]:: - Update remote refs along with associated objects. - -gitlink:git-rebase[1]:: - Rebase local commits to the updated upstream head. - -gitlink:git-repack[1]:: - Pack unpacked objects in a repository. - -gitlink:git-rerere[1]:: - Reuse recorded resolution of conflicted merges. - -gitlink:git-reset[1]:: - Reset current HEAD to the specified state. - -gitlink:git-resolve[1]:: - Merge two commits. - -gitlink:git-revert[1]:: - Revert an existing commit. - -gitlink:git-rm[1]:: - Remove files from the working tree and from the index. - -gitlink:git-shortlog[1]:: - Summarizes 'git log' output. - -gitlink:git-show[1]:: - Show one commit log and its diff. - -gitlink:git-show-branch[1]:: - Show branches and their commits. - -gitlink:git-status[1]:: - Shows the working tree status. - -gitlink:git-verify-tag[1]:: - Check the GPG signature of tag. - -gitlink:git-whatchanged[1]:: - Shows commit logs and differences they introduce. - +include::cmds-mainporcelain.txt[] Ancillary Commands ~~~~~~~~~~~~~~~~~~ Manipulators: -gitlink:git-applypatch[1]:: - Apply one patch extracted from an e-mail. - -gitlink:git-archimport[1]:: - Import an arch repository into git. - -gitlink:git-convert-objects[1]:: - Converts old-style git repository. - -gitlink:git-cvsimport[1]:: - Salvage your data out of another SCM people love to hate. - -gitlink:git-cvsexportcommit[1]:: - Export a single commit to a CVS checkout. - -gitlink:git-cvsserver[1]:: - A CVS server emulator for git. - -gitlink:git-gc[1]:: - Cleanup unnecessary files and optimize the local repository. - -gitlink:git-lost-found[1]:: - Recover lost refs that luckily have not yet been pruned. - -gitlink:git-merge-one-file[1]:: - The standard helper program to use with `git-merge-index`. - -gitlink:git-prune[1]:: - Prunes all unreachable objects from the object database. - -gitlink:git-quiltimport[1]:: - Applies a quilt patchset onto the current branch. - -gitlink:git-reflog[1]:: - Manage reflog information. - -gitlink:git-relink[1]:: - Hardlink common objects in local repositories. - -gitlink:git-svn[1]:: - Bidirectional operation between a single Subversion branch and git. - -gitlink:git-svnimport[1]:: - Import a SVN repository into git. - -gitlink:git-sh-setup[1]:: - Common git shell script setup code. - -gitlink:git-symbolic-ref[1]:: - Read and modify symbolic refs. - -gitlink:git-tag[1]:: - Create or verify a tag object signed with GPG. - -gitlink:git-update-ref[1]:: - Update the object name stored in a ref safely. - +include::cmds-ancillarymanipulators.txt[] Interrogators: -gitlink:git-annotate[1]:: - Annotate file lines with commit info. - -gitlink:git-blame[1]:: - Find out where each line in a file came from. - -gitlink:git-check-ref-format[1]:: - Make sure ref name is well formed. - -gitlink:git-cherry[1]:: - Find commits not merged upstream. - -gitlink:git-count-objects[1]:: - Count unpacked number of objects and their disk consumption. - -gitlink:git-daemon[1]:: - A really simple server for git repositories. - -gitlink:git-fmt-merge-msg[1]:: - Produce a merge commit message. - -gitlink:git-get-tar-commit-id[1]:: - Extract commit ID from an archive created using git-tar-tree. - -gitlink:git-imap-send[1]:: - Dump a mailbox from stdin into an imap folder. - -gitlink:git-instaweb[1]:: - Instantly browse your working repository in gitweb. - -gitlink:git-mailinfo[1]:: - Extracts patch and authorship information from a single - e-mail message, optionally transliterating the commit - message into utf-8. - -gitlink:git-mailsplit[1]:: - A stupid program to split UNIX mbox format mailbox into - individual pieces of e-mail. - -gitlink:git-merge-tree[1]:: - Show three-way merge without touching index. - -gitlink:git-patch-id[1]:: - Compute unique ID for a patch. - -gitlink:git-parse-remote[1]:: - Routines to help parsing `$GIT_DIR/remotes/` files. - -gitlink:git-request-pull[1]:: - git-request-pull. - -gitlink:git-rev-parse[1]:: - Pick out and massage parameters. - -gitlink:git-runstatus[1]:: - A helper for git-status and git-commit. - -gitlink:git-send-email[1]:: - Send patch e-mails out of "format-patch --mbox" output. - -gitlink:git-symbolic-ref[1]:: - Read and modify symbolic refs. - -gitlink:git-stripspace[1]:: - Filter out empty lines. - +include::cmds-ancillaryinterrogators.txt[] Low-level commands (plumbing) ----------------------------- @@ -337,122 +109,14 @@ repositories. Manipulation commands ~~~~~~~~~~~~~~~~~~~~~ -gitlink:git-apply[1]:: - Reads a "diff -up1" or git generated patch file and - applies it to the working tree. -gitlink:git-checkout-index[1]:: - Copy files from the index to the working tree. - -gitlink:git-commit-tree[1]:: - Creates a new commit object. - -gitlink:git-hash-object[1]:: - Computes the object ID from a file. - -gitlink:git-index-pack[1]:: - Build pack idx file for an existing packed archive. - -gitlink:git-init[1]:: - Creates an empty git repository, or reinitialize an - existing one. - -gitlink:git-merge-file[1]:: - Runs a threeway merge. - -gitlink:git-merge-index[1]:: - Runs a merge for files needing merging. - -gitlink:git-mktag[1]:: - Creates a tag object. - -gitlink:git-mktree[1]:: - Build a tree-object from ls-tree formatted text. - -gitlink:git-pack-objects[1]:: - Creates a packed archive of objects. - -gitlink:git-prune-packed[1]:: - Remove extra objects that are already in pack files. - -gitlink:git-read-tree[1]:: - Reads tree information into the index. - -gitlink:git-repo-config[1]:: - Get and set options in .git/config. - -gitlink:git-unpack-objects[1]:: - Unpacks objects out of a packed archive. - -gitlink:git-update-index[1]:: - Registers files in the working tree to the index. - -gitlink:git-write-tree[1]:: - Creates a tree from the index. +include::cmds-plumbingmanipulators.txt[] Interrogation commands ~~~~~~~~~~~~~~~~~~~~~~ -gitlink:git-cat-file[1]:: - Provide content or type/size information for repository objects. - -gitlink:git-describe[1]:: - Show the most recent tag that is reachable from a commit. - -gitlink:git-diff-index[1]:: - Compares content and mode of blobs between the index and repository. - -gitlink:git-diff-files[1]:: - Compares files in the working tree and the index. - -gitlink:git-diff-stages[1]:: - Compares two "merge stages" in the index. - -gitlink:git-diff-tree[1]:: - Compares the content and mode of blobs found via two tree objects. - -gitlink:git-for-each-ref[1]:: - Output information on each ref. - -gitlink:git-fsck-objects[1]:: - Verifies the connectivity and validity of the objects in the database. - -gitlink:git-ls-files[1]:: - Information about files in the index and the working tree. - -gitlink:git-ls-tree[1]:: - Displays a tree object in human readable form. - -gitlink:git-merge-base[1]:: - Finds as good common ancestors as possible for a merge. - -gitlink:git-name-rev[1]:: - Find symbolic names for given revs. - -gitlink:git-pack-redundant[1]:: - Find redundant pack files. - -gitlink:git-rev-list[1]:: - Lists commit objects in reverse chronological order. - -gitlink:git-show-index[1]:: - Displays contents of a pack idx file. - -gitlink:git-show-ref[1]:: - List references in a local repository. - -gitlink:git-tar-tree[1]:: - Creates a tar archive of the files in the named tree object. - -gitlink:git-unpack-file[1]:: - Creates a temporary file with a blob's contents. - -gitlink:git-var[1]:: - Displays a git logical variable. - -gitlink:git-verify-pack[1]:: - Validates packed git archive files. +include::cmds-plumbinginterrogators.txt[] In general, the interrogate commands do not touch the files in the working tree. @@ -461,52 +125,7 @@ the working tree. Synching repositories ~~~~~~~~~~~~~~~~~~~~~ -gitlink:git-fetch-pack[1]:: - Updates from a remote repository (engine for ssh and - local transport). - -gitlink:git-http-fetch[1]:: - Downloads a remote git repository via HTTP by walking - commit chain. - -gitlink:git-local-fetch[1]:: - Duplicates another git repository on a local system by - walking commit chain. - -gitlink:git-peek-remote[1]:: - Lists references on a remote repository using - upload-pack protocol (engine for ssh and local - transport). - -gitlink:git-receive-pack[1]:: - Invoked by 'git-send-pack' to receive what is pushed to it. - -gitlink:git-send-pack[1]:: - Pushes to a remote repository, intelligently. - -gitlink:git-http-push[1]:: - Push missing objects using HTTP/DAV. - -gitlink:git-shell[1]:: - Restricted shell for GIT-only SSH access. - -gitlink:git-ssh-fetch[1]:: - Pulls from a remote repository over ssh connection by - walking commit chain. - -gitlink:git-ssh-upload[1]:: - Helper "server-side" program used by git-ssh-fetch. - -gitlink:git-update-server-info[1]:: - Updates auxiliary information on a dumb server to help - clients discover references and packs on it. - -gitlink:git-upload-archive[1]:: - Invoked by 'git-archive' to send a generated archive. - -gitlink:git-upload-pack[1]:: - Invoked by 'git-fetch-pack' to push - what are asked for. +include::cmds-synchingrepositories.txt[] Configuration Mechanism diff --git a/Documentation/gitk.txt b/Documentation/gitk.txt index f1aeb07f64..5bdaa601f0 100644 --- a/Documentation/gitk.txt +++ b/Documentation/gitk.txt @@ -3,7 +3,7 @@ gitk(1) NAME ---- -gitk - git repository browser +gitk - The git repository browser SYNOPSIS -------- @@ -47,6 +47,8 @@ frequently used options. meaning show from the given revision and back, or it can be a range in the form "''..''" to show all revisions between '' and back to ''. Note, more advanced revision selection can be applied. + For a more complete list of ways to spell object names, see + "SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1]. :: diff --git a/Documentation/howto/rebase-from-internal-branch.txt b/Documentation/howto/rebase-from-internal-branch.txt index fcd64e9b9b..3b3a5c2e69 100644 --- a/Documentation/howto/rebase-from-internal-branch.txt +++ b/Documentation/howto/rebase-from-internal-branch.txt @@ -106,7 +106,7 @@ prepare #2 and #3 for e-mail submission. $ git format-patch master^^ master -This creates two files, 0001-XXXX.txt and 0002-XXXX.txt. Send +This creates two files, 0001-XXXX.patch and 0002-XXXX.patch. Send them out "To: " your project maintainer and "Cc: " your mailing list. You could use contributed script git-send-email if your host has necessary perl modules for this, but your usual diff --git a/builtin-log.c b/builtin-log.c index 1cd9d3f768..f3cff13edc 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -197,7 +197,7 @@ static int istitlechar(char c) static char *extra_headers = NULL; static int extra_headers_size = 0; -static const char *fmt_patch_suffix = ".txt"; +static const char *fmt_patch_suffix = ".patch"; static int git_format_config(const char *var, const char *value) { @@ -468,7 +468,10 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) die ("unrecognized argument: %s", argv[1]); if (!rev.diffopt.output_format) - rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_PATCH; + rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_SUMMARY | DIFF_FORMAT_PATCH; + + if (!rev.diffopt.text) + rev.diffopt.binary = 1; if (!output_directory) output_directory = prefix; @@ -482,8 +485,13 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) } if (rev.pending.nr == 1) { - rev.pending.objects[0].item->flags |= UNINTERESTING; - add_head(&rev); + if (rev.max_count < 0) { + rev.pending.objects[0].item->flags |= UNINTERESTING; + add_head(&rev); + } + /* Otherwise, it is "format-patch -22 HEAD", and + * get_revision() would return only the specified count. + */ } if (ignore_if_in_upstream) diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index 42dd8c87a2..3824ee33ac 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -569,7 +569,7 @@ static void write_index_file(void) sha1_to_hex(object_list_sha1), "idx"); struct object_entry **list = sorted_by_sha; struct object_entry **last = list + nr_result; - unsigned int array[256]; + uint32_t array[256]; /* * Write the first-level table (the list is sorted, @@ -587,7 +587,7 @@ static void write_index_file(void) array[i] = htonl(next - sorted_by_sha); list = next; } - sha1write(f, array, 256 * sizeof(int)); + sha1write(f, array, 256 * 4); /* * Write the actual SHA1 entries.. @@ -595,7 +595,7 @@ static void write_index_file(void) list = sorted_by_sha; for (i = 0; i < nr_result; i++) { struct object_entry *entry = *list++; - unsigned int offset = htonl(entry->offset); + uint32_t offset = htonl(entry->offset); sha1write(f, &offset, 4); sha1write(f, entry->sha1, 20); } diff --git a/builtin-prune-packed.c b/builtin-prune-packed.c index a57b76d7b7..977730064b 100644 --- a/builtin-prune-packed.c +++ b/builtin-prune-packed.c @@ -2,7 +2,7 @@ #include "cache.h" static const char prune_packed_usage[] = -"git-prune-packed [-n]"; +"git-prune-packed [-n] [-q]"; #define DRY_RUN 01 #define VERBOSE 02 diff --git a/cache.h b/cache.h index fda3f8ec16..e6e19bdef3 100644 --- a/cache.h +++ b/cache.h @@ -351,7 +351,7 @@ struct pack_window { extern struct packed_git { struct packed_git *next; struct pack_window *windows; - unsigned int *index_base; + uint32_t *index_base; off_t index_size; off_t pack_size; int pack_fd; diff --git a/git-compat-util.h b/git-compat-util.h index 8d244d0d92..bf3ceb8027 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -46,6 +46,7 @@ #include #include #include +#include #undef _ALL_SOURCE /* AIX 5.3L defines a struct list with _ALL_SOURCE. */ #include #define _ALL_SOURCE 1 diff --git a/git-reset.sh b/git-reset.sh index bf2a0581fe..fee6d98d9c 100755 --- a/git-reset.sh +++ b/git-reset.sh @@ -43,7 +43,7 @@ case "$1" in --) shift ;; esac # affecting the working tree nor HEAD. if test $# != 0 then - test "$reset_type" == "--mixed" || + test "$reset_type" = "--mixed" || die "Cannot do partial $reset_type reset." git-diff-index --cached $rev -- "$@" | diff --git a/pack.h b/pack.h index 4814800f28..821706fbcd 100644 --- a/pack.h +++ b/pack.h @@ -10,10 +10,38 @@ #define PACK_VERSION 2 #define pack_version_ok(v) ((v) == htonl(2) || (v) == htonl(3)) struct pack_header { - unsigned int hdr_signature; - unsigned int hdr_version; - unsigned int hdr_entries; + uint32_t hdr_signature; + uint32_t hdr_version; + uint32_t hdr_entries; }; +/* + * Packed object index header + * + * struct pack_idx_header { + * uint32_t idx_signature; + * uint32_t idx_version; + * }; + * + * Note: this header isn't active yet. In future versions of git + * we may change the index file format. At that time we would start + * the first four bytes of the new index format with this signature, + * as all older git binaries would find this value illegal and abort + * reading the file. + * + * This is the case because the number of objects in a packfile + * cannot exceed 1,431,660,000 as every object would need at least + * 3 bytes of data and the overall packfile cannot exceed 4 GiB due + * to the 32 bit offsets used by the index. Clearly the signature + * exceeds this maximum. + * + * Very old git binaries will also compare the first 4 bytes to the + * next 4 bytes in the index and abort with a "non-monotonic index" + * error if the second 4 byte word is smaller than the first 4 + * byte word. This would be true in the proposed future index + * format as idx_signature would be greater than idx_version. + */ +#define PACK_IDX_SIGNATURE 0xff744f63 /* "\377tOc" */ + extern int verify_pack(struct packed_git *, int); #endif diff --git a/sha1_file.c b/sha1_file.c index 1b1c0f7b4d..3025440941 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -435,7 +435,7 @@ static int check_packed_git_idx(const char *path, unsigned long *idx_size_, void **idx_map_) { void *idx_map; - unsigned int *index; + uint32_t *index; unsigned long idx_size; int nr, i; int fd = open(path, O_RDONLY); @@ -456,12 +456,23 @@ static int check_packed_git_idx(const char *path, unsigned long *idx_size_, /* check index map */ if (idx_size < 4*256 + 20 + 20) - return error("index file too small"); + return error("index file %s is too small", path); + + /* a future index format would start with this, as older git + * binaries would fail the non-monotonic index check below. + * give a nicer warning to the user if we can. + */ + if (index[0] == htonl(PACK_IDX_SIGNATURE)) + return error("index file %s is a newer version" + " and is not supported by this binary" + " (try upgrading GIT to a newer version)", + path); + nr = 0; for (i = 0; i < 256; i++) { unsigned int n = ntohl(index[i]); if (n < nr) - return error("non-monotonic index"); + return error("non-monotonic index %s", path); nr = n; } @@ -473,7 +484,7 @@ static int check_packed_git_idx(const char *path, unsigned long *idx_size_, * - 20-byte SHA1 file checksum */ if (idx_size != 4*256 + nr * 24 + 20 + 20) - return error("wrong index file size"); + return error("wrong index file size in %s", path); return 0; } @@ -1340,7 +1351,7 @@ int nth_packed_object_sha1(const struct packed_git *p, int n, unsigned long find_pack_entry_one(const unsigned char *sha1, struct packed_git *p) { - unsigned int *level1_ofs = p->index_base; + uint32_t *level1_ofs = p->index_base; int hi = ntohl(level1_ofs[*sha1]); int lo = ((*sha1 == 0x0) ? 0 : ntohl(level1_ofs[*sha1 - 1])); void *index = p->index_base + 256; @@ -1349,7 +1360,7 @@ unsigned long find_pack_entry_one(const unsigned char *sha1, int mi = (lo + hi) / 2; int cmp = hashcmp((unsigned char *)index + (24 * mi) + 4, sha1); if (!cmp) - return ntohl(*((unsigned int *) ((char *) index + (24 * mi)))); + return ntohl(*((uint32_t *)((char *)index + (24 * mi)))); if (cmp > 0) hi = mi; else diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master b/t/t4013/diff.format-patch_--attach_--stdout_initial..master index b4745e1001..e5ddd6fcbb 100644 --- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master +++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master @@ -19,6 +19,7 @@ This is the second commit. file0 | 3 +++ file2 | 3 --- 3 files changed, 5 insertions(+), 3 deletions(-) + delete mode 100644 file2 --------------g-i-t--v-e-r-s-i-o-n Content-Type: text/x-patch; name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff" @@ -77,6 +78,7 @@ Content-Transfer-Encoding: 8bit dir/sub | 2 ++ file1 | 3 +++ 2 files changed, 5 insertions(+), 0 deletions(-) + create mode 100644 file1 --------------g-i-t--v-e-r-s-i-o-n Content-Type: text/x-patch; name="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff" @@ -126,6 +128,7 @@ Content-Transfer-Encoding: 8bit file0 | 3 +++ file3 | 4 ++++ 3 files changed, 9 insertions(+), 0 deletions(-) + create mode 100644 file3 --------------g-i-t--v-e-r-s-i-o-n Content-Type: text/x-patch; name="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff" diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ index a9d1cd368b..d0dd19b623 100644 --- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ +++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ @@ -19,6 +19,7 @@ This is the second commit. file0 | 3 +++ file2 | 3 --- 3 files changed, 5 insertions(+), 3 deletions(-) + delete mode 100644 file2 --------------g-i-t--v-e-r-s-i-o-n Content-Type: text/x-patch; name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff" @@ -77,6 +78,7 @@ Content-Transfer-Encoding: 8bit dir/sub | 2 ++ file1 | 3 +++ 2 files changed, 5 insertions(+), 0 deletions(-) + create mode 100644 file1 --------------g-i-t--v-e-r-s-i-o-n Content-Type: text/x-patch; name="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff" diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..side b/t/t4013/diff.format-patch_--attach_--stdout_initial..side index 57b9d0bdc1..67a95c5cba 100644 --- a/t/t4013/diff.format-patch_--attach_--stdout_initial..side +++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..side @@ -17,6 +17,7 @@ Content-Transfer-Encoding: 8bit file0 | 3 +++ file3 | 4 ++++ 3 files changed, 9 insertions(+), 0 deletions(-) + create mode 100644 file3 --------------g-i-t--v-e-r-s-i-o-n Content-Type: text/x-patch; name="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff" diff --git a/t/t4013/diff.format-patch_--stdout_initial..master b/t/t4013/diff.format-patch_--stdout_initial..master index c33302e92f..8b88ca4927 100644 --- a/t/t4013/diff.format-patch_--stdout_initial..master +++ b/t/t4013/diff.format-patch_--stdout_initial..master @@ -10,6 +10,7 @@ This is the second commit. file0 | 3 +++ file2 | 3 --- 3 files changed, 5 insertions(+), 3 deletions(-) + delete mode 100644 file2 diff --git a/dir/sub b/dir/sub index 35d242b..8422d40 100644 @@ -53,6 +54,7 @@ Subject: [PATCH] Third dir/sub | 2 ++ file1 | 3 +++ 2 files changed, 5 insertions(+), 0 deletions(-) + create mode 100644 file1 diff --git a/dir/sub b/dir/sub index 8422d40..cead32e 100644 @@ -87,6 +89,7 @@ Subject: [PATCH] Side file0 | 3 +++ file3 | 4 ++++ 3 files changed, 9 insertions(+), 0 deletions(-) + create mode 100644 file3 diff --git a/dir/sub b/dir/sub index 35d242b..7289e35 100644 diff --git a/t/t4013/diff.format-patch_--stdout_initial..master^ b/t/t4013/diff.format-patch_--stdout_initial..master^ index 03d0f9693c..47a4b88637 100644 --- a/t/t4013/diff.format-patch_--stdout_initial..master^ +++ b/t/t4013/diff.format-patch_--stdout_initial..master^ @@ -10,6 +10,7 @@ This is the second commit. file0 | 3 +++ file2 | 3 --- 3 files changed, 5 insertions(+), 3 deletions(-) + delete mode 100644 file2 diff --git a/dir/sub b/dir/sub index 35d242b..8422d40 100644 @@ -53,6 +54,7 @@ Subject: [PATCH] Third dir/sub | 2 ++ file1 | 3 +++ 2 files changed, 5 insertions(+), 0 deletions(-) + create mode 100644 file1 diff --git a/dir/sub b/dir/sub index 8422d40..cead32e 100644 diff --git a/t/t4013/diff.format-patch_--stdout_initial..side b/t/t4013/diff.format-patch_--stdout_initial..side index d10a46523b..e765088475 100644 --- a/t/t4013/diff.format-patch_--stdout_initial..side +++ b/t/t4013/diff.format-patch_--stdout_initial..side @@ -9,6 +9,7 @@ Subject: [PATCH] Side file0 | 3 +++ file3 | 4 ++++ 3 files changed, 9 insertions(+), 0 deletions(-) + create mode 100644 file3 diff --git a/dir/sub b/dir/sub index 35d242b..7289e35 100644 diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh index 5ee5b23095..91be272ac4 100755 --- a/t/t4200-rerere.sh +++ b/t/t4200-rerere.sh @@ -120,29 +120,29 @@ case "$(date -d @11111111 +%s 2>/dev/null)" in just_over_15_days_ago=$(($now-1-15*86400)) almost_60_days_ago=$(($now+60-60*86400)) just_over_60_days_ago=$(($now-1-60*86400)) - predate1="$(date -d "@$almost_60_days_ago" +%c)" - predate2="$(date -d "@$almost_15_days_ago" +%c)" - postdate1="$(date -d "@$just_over_60_days_ago" +%c)" - postdate2="$(date -d "@$just_over_15_days_ago" +%c)" + predate1="$(date -d "@$almost_60_days_ago" +%Y%m%d%H%M.%S)" + predate2="$(date -d "@$almost_15_days_ago" +%Y%m%d%H%M.%S)" + postdate1="$(date -d "@$just_over_60_days_ago" +%Y%m%d%H%M.%S)" + postdate2="$(date -d "@$just_over_15_days_ago" +%Y%m%d%H%M.%S)" ;; *) # it is not GNU date. oh, well. - predate1="$(date)" - predate2="$(date)" - postdate1='1 Oct 2006 00:00:00' - postdate2='1 Dec 2006 00:00:00' + predate1="$(date +%Y%m%d%H%M.%S)" + predate2="$(date +%Y%m%d%H%M.%S)" + postdate1='200610010000.00' + postdate2='200612010000.00' esac -touch -m -d "$predate1" $rr/preimage -touch -m -d "$predate2" $rr2/preimage +touch -m -t "$predate1" $rr/preimage +touch -m -t "$predate2" $rr2/preimage test_expect_success 'garbage collection (part1)' 'git rerere gc' test_expect_success 'young records still live' \ "test -f $rr/preimage -a -f $rr2/preimage" -touch -m -d "$postdate1" $rr/preimage -touch -m -d "$postdate2" $rr2/preimage +touch -m -t "$postdate1" $rr/preimage +touch -m -t "$postdate2" $rr2/preimage test_expect_success 'garbage collection (part2)' 'git rerere gc'