From e9831e83e063844b90cf9e525d0003715dd8b395 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 17 Sep 2007 00:39:52 -0700 Subject: git-gc --auto: add documentation. This documents the auto-packing of loose objects performed by git-gc --auto. Signed-off-by: Junio C Hamano --- Documentation/config.txt | 7 +++++++ Documentation/git-gc.txt | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/config.txt b/Documentation/config.txt index 866e0534b8..6b6553d9da 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -439,6 +439,13 @@ gc.aggressiveWindow:: algorithm used by 'git gc --aggressive'. This defaults to 10. +gc.auto:: + When there are approximately more than this many loose + objects in the repository, `git gc --auto` will pack them. + Some Porcelain commands use this command to perform a + light-weight garbage collection from time to time. Setting + this to 0 disables it. + gc.packrefs:: `git gc` does not run `git pack-refs` in a bare repository by default so that older dumb-transport clients can still fetch diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index c7742ca963..40c1ce4a21 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -8,7 +8,7 @@ git-gc - Cleanup unnecessary files and optimize the local repository SYNOPSIS -------- -'git-gc' [--prune] [--aggressive] +'git-gc' [--prune] [--aggressive] [--auto] DESCRIPTION ----------- @@ -43,6 +43,15 @@ OPTIONS persistent, so this option only needs to be used occasionally; every few hundred changesets or so. +--auto:: + With this option, `git gc` checks if there are too many + loose objects in the repository and runs + gitlink:git-repack[1] with `-d -l` option to pack them. + The threshold is set with `gc.auto` configuration + variable, and can be disabled by setting it to 0. Some + Porcelain commands use this after they perform operation + that could create many loose objects automatically. + Configuration ------------- -- cgit v1.2.3 From 17815501a8f95c080891acd9537514adfe17c80e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 17 Sep 2007 00:55:13 -0700 Subject: git-gc --auto: run "repack -A -d -l" as necessary. This teaches "git-gc --auto" to consolidate many packs into one without losing unreachable objects in them by using "repack -A" when there are too many packfiles that are not marked with *.keep in the repository. gc.autopacklimit configuration can be used to set the maximum number of packs a repository is allowed to have before this mechanism kicks in. Signed-off-by: Junio C Hamano --- Documentation/config.txt | 6 ++++++ Documentation/git-gc.txt | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/config.txt b/Documentation/config.txt index 6b6553d9da..b0390f82b8 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -446,6 +446,12 @@ gc.auto:: light-weight garbage collection from time to time. Setting this to 0 disables it. +gc.autopacklimit:: + When there are more than this many packs that are not + marked with `*.keep` file in the repository, `git gc + --auto` consolidates them into one larger pack. Setting + this to 0 disables this. + gc.packrefs:: `git gc` does not run `git pack-refs` in a bare repository by default so that older dumb-transport clients can still fetch diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index 40c1ce4a21..b9d5660eac 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -47,10 +47,15 @@ OPTIONS With this option, `git gc` checks if there are too many loose objects in the repository and runs gitlink:git-repack[1] with `-d -l` option to pack them. - The threshold is set with `gc.auto` configuration + The threshold for loose objects is set with `gc.auto` configuration variable, and can be disabled by setting it to 0. Some Porcelain commands use this after they perform operation that could create many loose objects automatically. + Additionally, when there are too many packs are present, + they are consolidated into one larger pack by running + the `git-repack` command with `-A` option. The + threshold for number of packs is set with + `gc.autopacklimit` configuration variable. Configuration ------------- -- cgit v1.2.3 From 46232915d5ac84fb033ad395bbf161c9645c42c9 Mon Sep 17 00:00:00 2001 From: Josh England Date: Tue, 11 Sep 2007 10:59:03 -0600 Subject: Add post-merge hook, related documentation, and tests. The post-merge hook enables one to hook in for `git pull` operations in order to check and/or change attributes of a work tree from the hook. As an example, it can be used in combination with a pre-commit hook to save/restore file ownership and permissions data (or file ACLs) within the repository and transparently update the working tree after a `git pull` operation. Signed-off-by: Josh England Signed-off-by: Junio C Hamano --- Documentation/hooks.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Documentation') diff --git a/Documentation/hooks.txt b/Documentation/hooks.txt index c39edc57c4..50535a7983 100644 --- a/Documentation/hooks.txt +++ b/Documentation/hooks.txt @@ -87,6 +87,18 @@ parameter, and is invoked after a commit is made. This hook is meant primarily for notification, and cannot affect the outcome of `git-commit`. +post-merge +----------- + +This hook is invoked by `git-merge`, which happens when a `git pull` +is done on a local repository. The hook takes a single parameter, a status +flag specifying whether or not the merge being done was a squash merge. +This hook cannot affect the outcome of `git-merge`. + +This hook can be used in conjunction with a corresponding pre-commit hook to +save and restore any form of metadata associated with the working tree +(eg: permissions/ownership, ACLS, etc). + [[pre-receive]] pre-receive ----------- -- cgit v1.2.3 From af6fb4c822a5a65c7671d810127171759dff38f6 Mon Sep 17 00:00:00 2001 From: Josh England Date: Tue, 11 Sep 2007 10:59:04 -0600 Subject: Added example hook script to save/restore permissions/ownership. Usage info is emebed in the script, but the gist of it is to run the script from a pre-commit hook to save permissions/ownership data to a file and check that file into the repository. Then, a post_merge hook reads the file and updates working tree permissions/ownership. All updates are transparent to the user (although there is a --verbose option). Merge conflicts are handled in the "read" phase (in pre-commit), and the script aborts the commit and tells you how to fix things in the case of a merge conflict in the metadata file. This same idea could be extended to handle file ACLs or other file metadata if desired. Signed-off-by: Josh England Signed-off-by: Junio C Hamano --- Documentation/hooks.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/hooks.txt b/Documentation/hooks.txt index 50535a7983..58b9547596 100644 --- a/Documentation/hooks.txt +++ b/Documentation/hooks.txt @@ -97,7 +97,8 @@ This hook cannot affect the outcome of `git-merge`. This hook can be used in conjunction with a corresponding pre-commit hook to save and restore any form of metadata associated with the working tree -(eg: permissions/ownership, ACLS, etc). +(eg: permissions/ownership, ACLS, etc). See contrib/hooks/setgitperms.perl +for an example of how to do this. [[pre-receive]] pre-receive -- cgit v1.2.3 From 7a98869935a3682b5ff9679c92bf9bc12f87d8c5 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 17 Sep 2007 23:34:06 +0100 Subject: apply: get rid of --index-info in favor of --build-fake-ancestor git-am used "git apply -z --index-info" to find the original versions of the files touched by the diff, to be able to do an inexpensive three-way merge. This operation makes only sense in a repository, since the index information in the diff refers to blobs, which have to be present in the current repository. Therefore, teach "git apply" a mode to write out the result as an index file to begin with, obviating the need for scripts to do it themselves. The sole user for --index-info is "git am" is converted to use --build-fake-ancestor in this patch. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- Documentation/git-apply.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index 4c7e3a2f7f..c1c54bfe0b 100644 --- a/Documentation/git-apply.txt +++ b/Documentation/git-apply.txt @@ -10,7 +10,7 @@ SYNOPSIS -------- [verse] 'git-apply' [--stat] [--numstat] [--summary] [--check] [--index] - [--apply] [--no-add] [--index-info] [-R | --reverse] + [--apply] [--no-add] [--build-fake-ancestor ] [-R | --reverse] [--allow-binary-replacement | --binary] [--reject] [-z] [-pNUM] [-CNUM] [--inaccurate-eof] [--cached] [--whitespace=] @@ -63,12 +63,15 @@ OPTIONS cached data, apply the patch, and store the result in the index, without using the working tree. This implies '--index'. ---index-info:: +--build-fake-ancestor :: 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. + the original versions of the blobs is available locally, + builds a temporary index containing those blobs. ++ +When a pure mode change is encountered (which has no index information), +the information is read from the current index instead. -R, --reverse:: Apply the patch in reverse. -- cgit v1.2.3 From 1b4cbb5d5880091b1f4980e7a3f5cac276352bee Mon Sep 17 00:00:00 2001 From: James Bowes Date: Sat, 7 Jul 2007 11:22:43 -0400 Subject: remote: document the 'rm' subcommand Signed-off-by: James Bowes Signed-off-by: Junio C Hamano --- Documentation/git-remote.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt index 94b9f17772..027ba11bdb 100644 --- a/Documentation/git-remote.txt +++ b/Documentation/git-remote.txt @@ -11,6 +11,7 @@ SYNOPSIS [verse] 'git-remote' 'git-remote' add [-t ] [-m ] [-f] [--mirror] +'git-remote' rm 'git-remote' show 'git-remote' prune 'git-remote' update [group] @@ -50,6 +51,11 @@ In mirror mode, enabled with `--mirror`, the refs will not be stored in the 'refs/remotes/' namespace, but in 'refs/heads/'. This option only makes sense in bare repositories. +'rm':: + +Remove the remote named . All remote tracking branches and +configuration settings for the remote are removed. + 'show':: Gives some information about the remote . -- cgit v1.2.3 From 8fceacee676ba9595a4dfdbe7b9726781bfd3ef9 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 21 Sep 2007 12:52:30 -0700 Subject: Documentation/git-lost-found.txt: drop unnecessarily duplicated name. I only did this back when I wanted to make sure git-log and gitk work properly with non Occidental characters. There is really no reason to keep it around. Signed-off-by: Junio C Hamano --- Documentation/git-lost-found.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-lost-found.txt b/Documentation/git-lost-found.txt index e48607f008..bc739117be 100644 --- a/Documentation/git-lost-found.txt +++ b/Documentation/git-lost-found.txt @@ -65,7 +65,7 @@ $ git rev-parse not-lost-anymore Author ------ -Written by Junio C Hamano 濱野 純 +Written by Junio C Hamano Documentation -------------- -- cgit v1.2.3 From 1e6ab5de4fc4ae2902a09f18fe43249c4d012a35 Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Fri, 21 Sep 2007 06:43:44 -0700 Subject: Move the paragraph specifying where the .idx and .pack files should be Signed-off-by: Matt Kraai Signed-off-by: Junio C Hamano --- Documentation/git-pack-objects.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt index f8a0be3511..d18259d93f 100644 --- a/Documentation/git-pack-objects.txt +++ b/Documentation/git-pack-objects.txt @@ -25,16 +25,16 @@ is efficient to access. The packed archive format (.pack) is designed to be unpackable without having anything else, but for random access, accompanied with the pack index file (.idx). +Placing both in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or +any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES) +enables git to read from such an archive. + 'git-unpack-objects' command can read the packed archive and expand the objects contained in the pack into "one-file one-object" format; this is typically done by the smart-pull commands when a pack is created on-the-fly for efficient network transport by their peers. -Placing both in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or -any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES) -enables git to read from such an archive. - In a packed archive, an object is either stored as a compressed whole, or as a difference from some other object. The latter is often called a delta. -- cgit v1.2.3 From 9c2d28c74e374174de01901238159b63a96a04ba Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Fri, 21 Sep 2007 07:37:18 -0700 Subject: Conjugate "search" correctly in the git-prune-packed man page. Signed-off-by: Matt Kraai Signed-off-by: Junio C Hamano --- Documentation/git-prune-packed.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-prune-packed.txt b/Documentation/git-prune-packed.txt index 3800edb7bb..9f85f3833e 100644 --- a/Documentation/git-prune-packed.txt +++ b/Documentation/git-prune-packed.txt @@ -13,7 +13,7 @@ SYNOPSIS DESCRIPTION ----------- -This program search the `$GIT_OBJECT_DIR` for all objects that currently +This program searches the `$GIT_OBJECT_DIR` for all objects that currently exist in a pack file as well as the independent object directories. All such extra objects are removed. -- cgit v1.2.3 From fc74ecc12cd339c6d8abd1c363733e67eb50945c Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Sun, 9 Sep 2007 22:07:02 -0400 Subject: user-manual: don't assume refs are stored under .git/refs The scripts taken from Tony Luck's howto assume all refs can be found under .git/refs, but this is not necessarily true, especially since git-gc runs git-pack-refs. Also add a note warning of this in the chapter that introduces refs, and fix the same incorrect assumption in one other spot. Signed-off-by: J. Bruce Fields --- Documentation/user-manual.txt | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'Documentation') diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index ecb2bf93f2..cf02e14ed0 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -369,6 +369,11 @@ shorthand: The full name is occasionally useful if, for example, there ever exists a tag and a branch with the same name. +(Newly created refs are actually stored in the .git/refs directory, +under the path given by their name. However, for efficiency reasons +they may also be packed together in a single file; see +gitlink:git-pack-refs[1]). + As another useful shortcut, the "HEAD" of a repository can be referred to just using the name of that repository. So, for example, "origin" is usually a shortcut for the HEAD branch in the repository "origin". @@ -2189,9 +2194,9 @@ test|release) git checkout $1 && git pull . origin ;; origin) - before=$(cat .git/refs/remotes/origin/master) + before=$(git rev-parse refs/remotes/origin/master) git fetch origin - after=$(cat .git/refs/remotes/origin/master) + after=$(git rev-parse refs/remotes/origin/master) if [ $before != $after ] then git log $before..$after | git shortlog @@ -2216,11 +2221,10 @@ usage() exit 1 } -if [ ! -f .git/refs/heads/"$1" ] -then +git show-ref -q --verify -- refs/heads/"$1" || { echo "Can't see branch <$1>" 1>&2 usage -fi +} case "$2" in test|release) @@ -2251,7 +2255,7 @@ then git log test..release fi -for branch in `ls .git/refs/heads` +for branch in `git show-ref --heads | sed 's|^.*/||'` do if [ $branch = test -o $branch = release ] then @@ -2946,7 +2950,7 @@ nLE/L9aUXdWeTFPron96DLA= See the gitlink:git-tag[1] command to learn how to create and verify tag objects. (Note that gitlink:git-tag[1] can also be used to create "lightweight tags", which are not tag objects at all, but just simple -references in .git/refs/tags/). +references whose names begin with "refs/tags/"). [[pack-files]] How git stores objects efficiently: pack files -- cgit v1.2.3 From 38a457baae8202e43b092dbb71dca736f6e45600 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 20 Sep 2007 02:34:14 +0200 Subject: User Manual: add a chapter for submodules Signed-off-by: Michael Smith Signed-off-by: Miklos Vajna Signed-off-by: J. Bruce Fields --- Documentation/user-manual.txt | 202 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 202 insertions(+) (limited to 'Documentation') diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index cf02e14ed0..a085ca1d39 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -3159,6 +3159,208 @@ a tree which you are in the process of working on. If you blow the index away entirely, you generally haven't lost any information as long as you have the name of the tree that it described. +[[submodules]] +Submodules +========== + +This tutorial explains how to create and publish a repository with submodules +using the gitlink:git-submodule[1] command. + +Submodules maintain their own identity; the submodule support just stores the +submodule repository location and commit ID, so other developers who clone the +superproject can easily clone all the submodules at the same revision. + +To see how submodule support works, create (for example) four example +repositories that can be used later as a submodule: + +------------------------------------------------- +$ mkdir ~/git +$ cd ~/git +$ for i in a b c d +do + mkdir $i + cd $i + git init + echo "module $i" > $i.txt + git add $i.txt + git commit -m "Initial commit, submodule $i" + cd .. +done +------------------------------------------------- + +Now create the superproject and add all the submodules: + +------------------------------------------------- +$ mkdir super +$ cd super +$ git init +$ for i in a b c d +do + git submodule add ~/git/$i +done +------------------------------------------------- + +NOTE: Do not use local URLs here if you plan to publish your superproject! + +See what files `git submodule` created: + +------------------------------------------------- +$ ls -a +. .. .git .gitmodules a b c d +------------------------------------------------- + +The `git submodule add` command does a couple of things: + +- It clones the submodule under the current directory and by default checks out + the master branch. +- It adds the submodule's clone path to the `.gitmodules` file and adds this + file to the index, ready to be committed. +- It adds the submodule's current commit ID to the index, ready to be + committed. + +Commit the superproject: + +------------------------------------------------- +$ git commit -m "Add submodules a, b, c and d." +------------------------------------------------- + +Now clone the superproject: + +------------------------------------------------- +$ cd .. +$ git clone super cloned +$ cd cloned +------------------------------------------------- + +The submodule directories are there, but they're empty: + +------------------------------------------------- +$ ls -a a +. .. +$ git submodule status +-d266b9873ad50488163457f025db7cdd9683d88b a +-e81d457da15309b4fef4249aba9b50187999670d b +-c1536a972b9affea0f16e0680ba87332dc059146 c +-d96249ff5d57de5de093e6baff9e0aafa5276a74 d +------------------------------------------------- + +NOTE: The commit object names shown above would be different for you, but they +should match the HEAD commit object names of your repositories. You can check +it by running `git ls-remote ../a`. + +Pulling down the submodules is a two-step process. First run `git submodule +init` to add the submodule repository URLs to `.git/config`: + +------------------------------------------------- +$ git submodule init +------------------------------------------------- + +Now use `git submodule update` to clone the repositories and check out the +commits specified in the superproject: + +------------------------------------------------- +$ git submodule update +$ cd a +$ ls -a +. .. .git a.txt +------------------------------------------------- + +One major difference between `git submodule update` and `git submodule add` is +that `git submodule update` checks out a specific commit, rather than the tip +of a branch. It's like checking out a tag: the head is detached, so you're not +working on a branch. + +------------------------------------------------- +$ git branch +* (no branch) + master +------------------------------------------------- + +If you want to make a change within a submodule and you have a detached head, +then you should create or checkout a branch, make your changes, publish the +change within the submodule, and then update the superproject to reference the +new commit: + +------------------------------------------------- +$ git checkout master +------------------------------------------------- + +or + +------------------------------------------------- +$ git checkout -b fix-up +------------------------------------------------- + +then + +------------------------------------------------- +$ echo "adding a line again" >> a.txt +$ git commit -a -m "Updated the submodule from within the superproject." +$ git push +$ cd .. +$ git diff +diff --git a/a b/a +index d266b98..261dfac 160000 +--- a/a ++++ b/a +@@ -1 +1 @@ +-Subproject commit d266b9873ad50488163457f025db7cdd9683d88b ++Subproject commit 261dfac35cb99d380eb966e102c1197139f7fa24 +$ git add a +$ git commit -m "Updated submodule a." +$ git push +------------------------------------------------- + +You have to run `git submodule update` after `git pull` if you want to update +submodules, too. + +Pitfalls with submodules +------------------------ + +Always publish the submodule change before publishing the change to the +superproject that references it. If you forget to publish the submodule change, +others won't be able to clone the repository: + +------------------------------------------------- +$ cd ~/git/super/a +$ echo i added another line to this file >> a.txt +$ git commit -a -m "doing it wrong this time" +$ cd .. +$ git add a +$ git commit -m "Updated submodule a again." +$ git push +$ cd ~/git/cloned +$ git pull +$ git submodule update +error: pathspec '261dfac35cb99d380eb966e102c1197139f7fa24' did not match any file(s) known to git. +Did you forget to 'git add'? +Unable to checkout '261dfac35cb99d380eb966e102c1197139f7fa24' in submodule path 'a' +------------------------------------------------- + +You also should not rewind branches in a submodule beyond commits that were +ever recorded in any superproject. + +It's not safe to run `git submodule update` if you've made and committed +changes within a submodule without checking out a branch first. They will be +silently overwritten: + +------------------------------------------------- +$ cat a.txt +module a +$ echo line added from private2 >> a.txt +$ git commit -a -m "line added inside private2" +$ cd .. +$ git submodule update +Submodule path 'a': checked out 'd266b9873ad50488163457f025db7cdd9683d88b' +$ cd a +$ cat a.txt +module a +------------------------------------------------- + +NOTE: The changes are still visible in the submodule's reflog. + +This is not the case if you did not commit your changes. + [[low-level-operations]] Low-level git operations ======================== -- cgit v1.2.3 From aec7b362ad07e1a2c58051c8db653dabffee8960 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Mon, 24 Sep 2007 00:51:43 +0200 Subject: git-merge: add support for branch..mergeoptions This enables per branch configuration of merge options. Currently, the most useful options to specify per branch are --squash, --summary/--no-summary and possibly --strategy, but all options are supported. Note: Options containing whitespace will _not_ be handled correctly. Luckily, the only option which can include whitespace is --message and it doesn't make much sense to give that option a default value. Signed-off-by: Lars Hjemli Signed-off-by: Junio C Hamano --- Documentation/config.txt | 6 ++++++ Documentation/git-merge.txt | 4 ++++ 2 files changed, 10 insertions(+) (limited to 'Documentation') diff --git a/Documentation/config.txt b/Documentation/config.txt index 015910f27a..d3c25f30f5 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -337,6 +337,12 @@ branch..merge:: branch..merge to the desired branch, and use the special setting `.` (a period) for branch..remote. +branch..mergeoptions:: + Sets default options for merging into branch . The syntax and + supported options are equal to that of gitlink:git-merge[1], but + option values containing whitespace characters are currently not + supported. + clean.requireForce:: A boolean to make git-clean do nothing unless given -f or -n. Defaults to false. diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index 144bc16ff2..b1771a13c8 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -58,6 +58,10 @@ merge.verbosity:: above outputs debugging information. The default is level 2. Can be overriden by 'GIT_MERGE_VERBOSITY' environment variable. +branch..mergeoptions:: + Sets default options for merging into branch . The syntax and + supported options are equal to that of git-merge, but option values + containing whitespace characters are currently not supported. HOW MERGE WORKS --------------- -- cgit v1.2.3 From d08af0ad745869a4fe36bc8df4f9804edfb74eb9 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Mon, 24 Sep 2007 00:51:44 +0200 Subject: git-merge: add support for --commit and --no-squash These options can be used to override --no-commit and --squash, which is needed since --no-commit and --squash now can be specified as default merge options in $GIT_DIR/config. The change also introduces slightly different behavior for --no-commit: when specified, it explicitly overrides --squash. Earlier, 'git merge --squash --no-commit' would result in a squashed merge (i.e. no $GIT_DIR/MERGE_HEAD was created) but with this patch the command will behave as if --squash hadn't been specified. Signed-off-by: Lars Hjemli Signed-off-by: Junio C Hamano --- Documentation/merge-options.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Documentation') diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt index d64c259bb3..0464a34645 100644 --- a/Documentation/merge-options.txt +++ b/Documentation/merge-options.txt @@ -10,6 +10,10 @@ not autocommit, to give the user a chance to inspect and further tweak the merge result before committing. +--commit:: + Perform the merge and commit the result. This option can + be used to override --no-commit. + --squash:: Produce the working tree and index state as if a real merge happened, but do not actually make a commit or @@ -19,6 +23,10 @@ top of the current branch whose effect is the same as merging another branch (or more in case of an octopus). +--no-squash:: + Perform the merge and commit the result. This option can + be used to override --squash. + -s , \--strategy=:: Use the given merge strategy; can be supplied more than once to specify them in the order they should be tried. -- cgit v1.2.3 From d66424c4ac661c69640765260235452499d80378 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Mon, 24 Sep 2007 00:51:45 +0200 Subject: git-merge: add --ff and --no-ff options These new options can be used to control the policy for fast-forward merges: --ff allows it (this is the default) while --no-ff will create a merge commit. Signed-off-by: Lars Hjemli Signed-off-by: Junio C Hamano --- Documentation/merge-options.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Documentation') diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt index 0464a34645..9f1fc82550 100644 --- a/Documentation/merge-options.txt +++ b/Documentation/merge-options.txt @@ -27,6 +27,15 @@ Perform the merge and commit the result. This option can be used to override --squash. +--no-ff:: + Generate a merge commit even if the merge resolved as a + fast-forward. + +--ff:: + Do not generate a merge commit if the merge resolved as + a fast-forward, only update the branch pointer. This is + the default behavior of git-merge. + -s , \--strategy=:: Use the given merge strategy; can be supplied more than once to specify them in the order they should be tried. -- cgit v1.2.3 From bc12651b08fe295ac5647208f9b3f946145cc9b1 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 24 Sep 2007 01:12:16 -0700 Subject: Start RelNotes for 1.5.4 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.5.4.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'Documentation') diff --git a/Documentation/RelNotes-1.5.4.txt b/Documentation/RelNotes-1.5.4.txt index 1df66af9ce..ceee857232 100644 --- a/Documentation/RelNotes-1.5.4.txt +++ b/Documentation/RelNotes-1.5.4.txt @@ -4,7 +4,22 @@ GIT v1.5.4 Release Notes Updates since v1.5.3 -------------------- + * git-reset is now built-in. + * git-send-email can optionally talk over ssmtp and use SMTP-AUTH. + + * git-rebase learned --whitespace option. + + * git-remote knows --mirror mode. + + * git-merge can call the "post-merge" hook. + + * git-pack-objects can optionally run deltification with multiple threads. + + * git-archive can optionally substitute keywords in files marked with + export-subst attribute. + + * Various Perforce importer updates. Fixes since v1.5.3 ------------------ @@ -12,3 +27,9 @@ Fixes since v1.5.3 All of the fixes in v1.5.3 maintenance series are included in this release, unless otherwise noted. +-- +exec >/var/tmp/1 +O=v1.5.3.2-99-ge4b2890 +echo O=`git describe refs/heads/master` +git shortlog --no-merges $O..refs/heads/master ^refs/heads/maint + -- cgit v1.2.3 From f31a522a2d64a5c7d83047e9234e1722ef63985e Mon Sep 17 00:00:00 2001 From: Mark Levedahl Date: Sun, 23 Sep 2007 22:19:42 -0400 Subject: git-submodule - allow a relative path as the subproject url This allows a subproject's location to be specified and stored as relative to the parent project's location (e.g., ./foo, or ../foo). This url is stored in .gitmodules as given. It is resolved into an absolute url by appending it to the parent project's url when the information is written to .git/config (i.e., during submodule add for the originator, and submodule init for a downstream recipient). This allows cloning of the project to work "as expected" if the project is hosted on a different server than when the subprojects were added. Signed-off-by: Mark Levedahl Signed-off-by: Junio C Hamano --- Documentation/git-submodule.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index 2c48936fcd..335e973a6a 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -21,6 +21,9 @@ add:: repository is cloned at the specified path, added to the changeset and registered in .gitmodules. If no path is specified, the path is deduced from the repository specification. + If the repository url begins with ./ or ../, it is stored as + given but resolved as a relative path from the main project's + url when cloning. status:: Show the status of the submodules. This will print the SHA-1 of the -- cgit v1.2.3 From 6dd14366d9478fdb3b459e1b39e384deb5f38f9f Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 25 Sep 2007 08:44:38 -0400 Subject: user-manual: Explain what submodules are good for. Rework the introduction to the Submodules section to explain why someone would use them, and fix up submodule references from the tree-object and todo sections. Signed-off-by: Michael Smith Acked-by: J. Bruce Fields Signed-off-by: Junio C Hamano --- Documentation/user-manual.txt | 54 +++++++++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 12 deletions(-) (limited to 'Documentation') diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index a085ca1d39..c7fdf25e27 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -2856,8 +2856,7 @@ between two related tree objects, since it can ignore any entries with identical object names. (Note: in the presence of submodules, trees may also have commits as -entries. See gitlink:git-submodule[1] and gitlink:gitmodules.txt[1] -for partial documentation.) +entries. See <> for documentation.) Note that the files all have mode 644 or 755: git actually only pays attention to the executable bit. @@ -3163,12 +3162,45 @@ information as long as you have the name of the tree that it described. Submodules ========== -This tutorial explains how to create and publish a repository with submodules -using the gitlink:git-submodule[1] command. - -Submodules maintain their own identity; the submodule support just stores the -submodule repository location and commit ID, so other developers who clone the -superproject can easily clone all the submodules at the same revision. +Large projects are often composed of smaller, self-contained modules. For +example, an embedded Linux distribution's source tree would include every +piece of software in the distribution with some local modifications; a movie +player might need to build against a specific, known-working version of a +decompression library; several independent programs might all share the same +build scripts. + +With centralized revision control systems this is often accomplished by +including every module in one single repository. Developers can check out +all modules or only the modules they need to work with. They can even modify +files across several modules in a single commit while moving things around +or updating APIs and translations. + +Git does not allow partial checkouts, so duplicating this approach in Git +would force developers to keep a local copy of modules they are not +interested in touching. Commits in an enormous checkout would be slower +than you'd expect as Git would have to scan every directory for changes. +If modules have a lot of local history, clones would take forever. + +On the plus side, distributed revision control systems can much better +integrate with external sources. In a centralized model, a single arbitrary +snapshot of the external project is exported from its own revision control +and then imported into the local revision control on a vendor branch. All +the history is hidden. With distributed revision control you can clone the +entire external history and much more easily follow development and re-merge +local changes. + +Git's submodule support allows a repository to contain, as a subdirectory, a +checkout of an external project. Submodules maintain their own identity; +the submodule support just stores the submodule repository location and +commit ID, so other developers who clone the containing project +("superproject") can easily clone all the submodules at the same revision. +Partial checkouts of the superproject are possible: you can tell Git to +clone none, some or all of the submodules. + +The gitlink:git-submodule[1] command is available since Git 1.5.3. Users +with Git 1.5.2 can look up the submodule commits in the repository and +manually check them out; earlier versions won't recognize the submodules at +all. To see how submodule support works, create (for example) four example repositories that can be used later as a submodule: @@ -3213,8 +3245,8 @@ The `git submodule add` command does a couple of things: - It clones the submodule under the current directory and by default checks out the master branch. -- It adds the submodule's clone path to the `.gitmodules` file and adds this - file to the index, ready to be committed. +- It adds the submodule's clone path to the gitlink:gitmodules[5] file and + adds this file to the index, ready to be committed. - It adds the submodule's current commit ID to the index, ready to be committed. @@ -4277,5 +4309,3 @@ Write a chapter on using plumbing and writing scripts. Alternates, clone -reference, etc. git unpack-objects -r for recovery - -submodules -- cgit v1.2.3 From 2ecb5ea2ad375017eedf73bd0130fa9ca33010d2 Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Tue, 25 Sep 2007 07:03:46 -0700 Subject: Move convert-objects to contrib. convert-objects was needed to convert from an old-style repository, which hashed the compressed contents and used a different date format. Such repositories are presumably no longer common and, if such conversions are necessary, should be done by writing a frontend for git-fast-import. Linus, the original author, is OK with moving it to contrib. Signed-off-by: Matt Kraai Signed-off-by: Junio C Hamano --- Documentation/cmd-list.perl | 1 - Documentation/git-convert-objects.txt | 28 ---------------------------- 2 files changed, 29 deletions(-) delete mode 100644 Documentation/git-convert-objects.txt (limited to 'Documentation') diff --git a/Documentation/cmd-list.perl b/Documentation/cmd-list.perl index 4ee76eaf99..1061fd8bcd 100755 --- a/Documentation/cmd-list.perl +++ b/Documentation/cmd-list.perl @@ -94,7 +94,6 @@ git-clone mainporcelain git-commit mainporcelain git-commit-tree plumbingmanipulators git-config ancillarymanipulators -git-convert-objects ancillarymanipulators git-count-objects ancillaryinterrogators git-cvsexportcommit foreignscminterface git-cvsimport foreignscminterface diff --git a/Documentation/git-convert-objects.txt b/Documentation/git-convert-objects.txt deleted file mode 100644 index 9718abf86d..0000000000 --- a/Documentation/git-convert-objects.txt +++ /dev/null @@ -1,28 +0,0 @@ -git-convert-objects(1) -====================== - -NAME ----- -git-convert-objects - Converts old-style git repository - - -SYNOPSIS --------- -'git-convert-objects' - -DESCRIPTION ------------ -Converts old-style git repository to the latest format - - -Author ------- -Written by Linus Torvalds - -Documentation --------------- -Documentation by David Greaves, Junio C Hamano and the git-list . - -GIT ---- -Part of the gitlink:git[7] suite -- cgit v1.2.3 From 2dbbc45730cd85e311a1bff38a07148a423a4f1e Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Tue, 25 Sep 2007 15:05:28 +0200 Subject: gitattributes.txt: Remove a duplicated paragraph about 'ident' and 'crlf' interaction. The order in which 'ident' and 'crlf' are carried out is documented a few paragraphs later again, after 'filter' was introduced. Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- Documentation/gitattributes.txt | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'Documentation') diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt index 46f9d591aa..676f694f82 100644 --- a/Documentation/gitattributes.txt +++ b/Documentation/gitattributes.txt @@ -145,17 +145,6 @@ sign `$` upon checkout. Any byte sequence that begins with with `$Id$` upon check-in. -Interaction between checkin/checkout attributes -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -In the check-in codepath, the worktree file is first converted -with `ident` (if specified), and then with `crlf` (again, if -specified and applicable). - -In the check-out codepath, the blob content is first converted -with `crlf`, and then `ident`. - - `filter` ^^^^^^^^ -- cgit v1.2.3 From 4d84aff356d9c6d86a8d621ee577283ed70e145e Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Tue, 25 Sep 2007 15:05:29 +0200 Subject: gitattributes.txt: Be more to the point in the filter driver description. The description was meant to emphasizes that the project should remain usable even if the filter driver was not used. This makes it more explicit and removes the "here is rope to hang yourself" paraphrase. Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- Documentation/gitattributes.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Documentation') diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt index 676f694f82..dd51aa11ea 100644 --- a/Documentation/gitattributes.txt +++ b/Documentation/gitattributes.txt @@ -164,11 +164,10 @@ but makes the filter a no-op passthru. The content filtering is done to massage the content into a shape that is more convenient for the platform, filesystem, and the user to use. The keyword here is "more convenient" and not -"turning something unusable into usable". In other words, it is -"hanging yourself because we gave you a long rope" if your -project uses filtering mechanism in such a way that it makes -your project unusable unless the checkout is done with a -specific filter in effect. +"turning something unusable into usable". In other words, the +intent is that if someone unsets the filter driver definition, +or does not have the appropriate filter program, the project +should still be usable. Interaction between checkin/checkout attributes -- cgit v1.2.3 From b06743925c3022ffbbd459431531709df13bbf38 Mon Sep 17 00:00:00 2001 From: Shawn Bohrer Date: Tue, 25 Sep 2007 23:12:46 -0500 Subject: Fix spelling of overridden in documentation Signed-off-by: Shawn Bohrer Signed-off-by: Junio C Hamano --- Documentation/git-merge.txt | 2 +- Documentation/gitignore.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index 144bc16ff2..eae49c4876 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -56,7 +56,7 @@ merge.verbosity:: message if conflicts were detected. Level 1 outputs only conflicts, 2 outputs conflicts and file changes. Level 5 and above outputs debugging information. The default is level 2. - Can be overriden by 'GIT_MERGE_VERBOSITY' environment variable. + Can be overridden by 'GIT_MERGE_VERBOSITY' environment variable. HOW MERGE WORKS diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt index 9c83095693..e8b8581f52 100644 --- a/Documentation/gitignore.txt +++ b/Documentation/gitignore.txt @@ -26,7 +26,7 @@ precedence, the last matching pattern decides the outcome): * Patterns read from a `.gitignore` file in the same directory as the path, or in any parent directory, with patterns in the - higher level files (up to the root) being overriden by those in + higher level files (up to the root) being overridden by those in lower level files down to the directory containing the file. These patterns match relative to the location of the `.gitignore` file. A project normally includes such -- cgit v1.2.3 From bce92405aebf217a4738bab0df89516910818e68 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 25 Sep 2007 22:02:28 -0700 Subject: core-tutorial: correct URL The tinyurl is incorrect -- it attempts to go to groups.osdl.org, which is gone. Either use the full URL (in patch) or create a new tinyurl for this URL. Is the web page (where I first saw this problem) generated from this txt file? http://www.kernel.org/pub/software/scm/git/docs/core-tutorial.html If not, it needs to be updated also. Signed-off-by: Randy Dunlap Signed-off-by: Junio C Hamano --- Documentation/core-tutorial.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/core-tutorial.txt b/Documentation/core-tutorial.txt index 4b4fd9a506..6b2590d072 100644 --- a/Documentation/core-tutorial.txt +++ b/Documentation/core-tutorial.txt @@ -1459,7 +1459,8 @@ Although git is a truly distributed system, it is often convenient to organize your project with an informal hierarchy of developers. Linux kernel development is run this way. There is a nice illustration (page 17, "Merges to Mainline") in -link:http://tinyurl.com/a2jdg[Randy Dunlap's presentation]. +link:http://www.xenotime.net/linux/mentor/linux-mentoring-2006.pdf +[Randy Dunlap's presentation]. It should be stressed that this hierarchy is purely *informal*. There is nothing fundamental in git that enforces the "chain of -- cgit v1.2.3 From 44b2476a1278c87d6985993b5e6fd45f1e5f08f2 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 25 Sep 2007 17:27:54 -0700 Subject: send-email --smtp-server-port: allow overriding the default port You can use --smtp-server-port option to specify a port different from the default (typically, SMTP servers listen to smtp port 25 and ssmtp port 465). Users should be aware that sending auth info over non-ssl connections may be unsafe or just may not work at all depending on SMTP server config. Signed-off-by: Glenn Rempe Signed-off-by: Junio C Hamano --- Documentation/git-send-email.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index 1ec61affab..3727776a0b 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -91,6 +91,11 @@ The --cc option must be repeated for each user you want on the cc list. `/usr/lib/sendmail` if such program is available, or `localhost` otherwise. +--smtp-server-port:: + Specifies a port different from the default port (SMTP + servers typically listen to smtp port 25 and ssmtp port + 465). + --smtp-user, --smtp-pass:: Username and password for SMTP-AUTH. Defaults are the values of the configuration values 'sendemail.smtpuser' and -- cgit v1.2.3 From 26b28007689d27a921ea90e5a29fc8eb74b0d297 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 17 Sep 2007 23:34:06 +0100 Subject: apply: get rid of --index-info in favor of --build-fake-ancestor git-am used "git apply -z --index-info" to find the original versions of the files touched by the diff, to be able to do an inexpensive three-way merge. This operation makes only sense in a repository, since the index information in the diff refers to blobs, which have to be present in the current repository. Therefore, teach "git apply" a mode to write out the result as an index file to begin with, obviating the need for scripts to do it themselves. The sole user for --index-info is "git am" is converted to use --build-fake-ancestor in this patch. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- Documentation/git-apply.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index 4c7e3a2f7f..c1c54bfe0b 100644 --- a/Documentation/git-apply.txt +++ b/Documentation/git-apply.txt @@ -10,7 +10,7 @@ SYNOPSIS -------- [verse] 'git-apply' [--stat] [--numstat] [--summary] [--check] [--index] - [--apply] [--no-add] [--index-info] [-R | --reverse] + [--apply] [--no-add] [--build-fake-ancestor ] [-R | --reverse] [--allow-binary-replacement | --binary] [--reject] [-z] [-pNUM] [-CNUM] [--inaccurate-eof] [--cached] [--whitespace=] @@ -63,12 +63,15 @@ OPTIONS cached data, apply the patch, and store the result in the index, without using the working tree. This implies '--index'. ---index-info:: +--build-fake-ancestor :: 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. + the original versions of the blobs is available locally, + builds a temporary index containing those blobs. ++ +When a pure mode change is encountered (which has no index information), +the information is read from the current index instead. -R, --reverse:: Apply the patch in reverse. -- cgit v1.2.3 From ee8245b54a2e4ea8838d28a7bcce2e07ef887a2c Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 27 Sep 2007 01:34:59 +0200 Subject: git-bundle: fix commandline examples in the manpage Multiple commands were displayed in one line, making the manpage hard to read. Signed-off-by: Miklos Vajna Signed-off-by: Junio C Hamano --- Documentation/git-bundle.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt index 5051e2bada..0cc6511bdf 100644 --- a/Documentation/git-bundle.txt +++ b/Documentation/git-bundle.txt @@ -103,14 +103,20 @@ We set a tag in R1 (lastR2bundle) after the previous such transport, and move it afterwards to help build the bundle. in R1 on A: + +------------ $ git-bundle create mybundle master ^lastR2bundle $ git tag -f lastR2bundle master +------------ (move mybundle from A to B by some mechanism) in R2 on B: + +------------ $ git-bundle verify mybundle $ git-fetch mybundle refspec +------------ where refspec is refInBundle:localRef @@ -124,9 +130,11 @@ Also, with something like this in your config: You can first sneakernet the bundle file to ~/tmp/file.bdl and then these commands: +------------ $ git ls-remote bundle $ git fetch bundle $ git pull bundle +------------ would treat it as if it is talking with a remote side over the network. -- cgit v1.2.3 From 552ce11006e39bd07efd79946f180df47aa35b4e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 29 Sep 2007 16:07:46 -0700 Subject: GIT 1.5.3.3 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.5.3.3.txt | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/RelNotes-1.5.3.3.txt (limited to 'Documentation') diff --git a/Documentation/RelNotes-1.5.3.3.txt b/Documentation/RelNotes-1.5.3.3.txt new file mode 100644 index 0000000000..e91bd84162 --- /dev/null +++ b/Documentation/RelNotes-1.5.3.3.txt @@ -0,0 +1,37 @@ +GIT v1.5.3.3 Release Notes +========================== + +Fixes since v1.5.3.2 +-------------------- + + * git-quiltimport did not like it when a patch described in the + series file does not exist. + + * p4 importer missed executable bit in some cases. + + * The default shell on some FreeBSD did not execute the + argument parsing code correctly and made git unusable. + + * git-svn incorrectly spawned pager even when the user user + explicitly asked not to. + + * sample post-receive hook overquoted the envelope sender + value. + + * git-am got confused when the patch contained a change that is + only about type and not contents. + + * git-mergetool did not show our and their version of the + conflicted file when started from a subdirectory of the + project. + + * git-mergetool did not pass correct options when invoking diff3. + + * git-log sometimes invoked underlying "diff" machinery + unnecessarily. + +-- +exec >/var/tmp/1 +O=v1.5.3.2-29-gb7bb760 +echo O=`git describe refs/heads/maint` +git shortlog --no-merges $O..refs/heads/maint -- cgit v1.2.3 From d392e712a844e6ce029aa901902e08a3da82f89d Mon Sep 17 00:00:00 2001 From: Andy Parkins Date: Fri, 28 Sep 2007 15:17:45 +0100 Subject: Make for-each-ref's grab_date() support per-atom formatting grab_date() gets an extra parameter - atomname; this extra parameter is checked to see if it has a ":" extra component in it, and if so that "" string is passed to parse_date_format() to produce an enum date_mode value which is then further passed to show_date(). In short it allows the user of git-for-each-ref to do things like this: $ git-for-each-ref --format='%(taggerdate:default)' refs/tags/v1.5.2 Sun May 20 00:30:42 2007 -0700 $ git-for-each-ref --format='%(taggerdate:relative)' refs/tags/v1.5.2 4 months ago $ git-for-each-ref --format='%(taggerdate:short)' refs/tags/v1.5.2 2007-05-20 $ git-for-each-ref --format='%(taggerdate:local)' refs/tags/v1.5.2 Sun May 20 08:30:42 2007 $ git-for-each-ref --format='%(taggerdate:iso8601)' refs/tags/v1.5.2 2007-05-20 00:30:42 -0700 $ git-for-each-ref --format='%(taggerdate:rfc2822)' refs/tags/v1.5.2 Sun, 20 May 2007 00:30:42 -0700 The default, when no ":" is specified is ":default", leaving the existing behaviour unchanged. Signed-off-by: Andy Parkins Signed-off-by: Junio C Hamano --- Documentation/git-for-each-ref.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt index 6df8e85004..f1f90cca62 100644 --- a/Documentation/git-for-each-ref.txt +++ b/Documentation/git-for-each-ref.txt @@ -100,6 +100,11 @@ In any case, a field name that refers to a field inapplicable to the object referred by the ref does not cause an error. It returns an empty string instead. +As a special case for the date-type fields, you may specify a format for +the date by adding one of `:default`, `:relative`, `:short`, `:local`, +`:iso8601` or `:rfc2822` to the end of the fieldname; e.g. +`%(taggerdate:relative)`. + EXAMPLES -------- -- cgit v1.2.3 From 1abbe475ff17349839f72a024cf665b8ec86473f Mon Sep 17 00:00:00 2001 From: Josh England Date: Wed, 26 Sep 2007 15:31:01 -0600 Subject: post-checkout hook, tests, and docs Updated post-checkout hook to take a flag specifying whether the checkout is a branch checkout or a file checkout (from the index). Signed-off-by: Josh England Signed-off-by: Junio C Hamano --- Documentation/hooks.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Documentation') diff --git a/Documentation/hooks.txt b/Documentation/hooks.txt index 58b9547596..f110162b01 100644 --- a/Documentation/hooks.txt +++ b/Documentation/hooks.txt @@ -87,6 +87,20 @@ parameter, and is invoked after a commit is made. This hook is meant primarily for notification, and cannot affect the outcome of `git-commit`. +post-checkout +----------- + +This hook is invoked when a `git-checkout` is run after having updated the +worktree. The hook is given three parameters: the ref of the previous HEAD, +the ref of the new HEAD (which may or may not have changed), and a flag +indicating whether the checkout was a branch checkout (changing branches, +flag=1) or a file checkout (retrieving a file from the index, flag=0). +This hook cannot affect the outcome of `git-checkout`. + +This hook can be used to perform repository validity checks, auto-display +differences from the previous HEAD if different, or set working dir metadata +properties. + post-merge ----------- -- cgit v1.2.3 From 81ab1cb43a872fc527b26388bc7e781c816d723b Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 30 Sep 2007 00:34:23 +0100 Subject: rebase -i: squash should retain the authorship of the _first_ commit It was determined on the mailing list, that it makes more sense for a "squash" to keep the author of the first commit as the author for the result of the squash. Make it so. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- Documentation/git-rebase.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 61b1810dba..dfb8a0da5b 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -293,7 +293,7 @@ rebasing. If you want to fold two or more commits into one, replace the command "pick" with "squash" for the second and subsequent commit. If the commits had different authors, it will attribute the squashed commit to -the author of the last commit. +the author of the first commit. In both cases, or when a "pick" does not succeed (because of merge errors), the loop will stop to let you fix things, and you can continue -- cgit v1.2.3 From 326df26d3349ee2f4d63b737ba318d6e6fafccd9 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 30 Sep 2007 17:32:25 -0700 Subject: Update stale documentation link in the k.org site Signed-off-by: Junio C Hamano --- Documentation/git.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation') diff --git a/Documentation/git.txt b/Documentation/git.txt index cb59639f77..abce801e48 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -46,6 +46,7 @@ Documentation for older releases are available here: * link:v1.5.3/git.html[documentation for release 1.5.3] * release notes for + link:RelNotes-1.5.3.3.txt[1.5.3.3], link:RelNotes-1.5.3.2.txt[1.5.3.2], link:RelNotes-1.5.3.1.txt[1.5.3.1]. -- cgit v1.2.3 From 0bdcac5666170547dc7882cc1d39b0481206074b Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 1 Oct 2007 00:30:27 +0200 Subject: git stash: document apply's --index switch Signed-off-by: Junio C Hamano --- Documentation/git-stash.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 05f40cff6c..5723bb06f0 100644 --- a/Documentation/git-stash.txt +++ b/Documentation/git-stash.txt @@ -63,7 +63,7 @@ show []:: it will accept any format known to `git-diff` (e.g., `git-stash show -p stash@\{1}` to view the second most recent stash in patch form). -apply []:: +apply [--index] []:: Restore the changes recorded in the stash on top of the current working tree state. When no `` is given, applies the latest @@ -71,6 +71,11 @@ apply []:: + This operation can fail with conflicts; you need to resolve them by hand in the working tree. ++ +If the `--index` option is used, then tries to reinstate not only the working +tree's changes, but also the index's ones. However, this can fail, when you +have conflicts (which are stored in the index, where you therefore can no +longer apply the changes as they were originally). clear:: Remove all the stashed states. Note that those states will then -- cgit v1.2.3 From 5946d4ba8970f00bb62b2c9e8714264831034043 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 1 Oct 2007 02:07:47 -0700 Subject: Whip post 1.5.3.3 maintenance series into shape. Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.5.3.3.txt | 6 ------ Documentation/RelNotes-1.5.3.4.txt | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 Documentation/RelNotes-1.5.3.4.txt (limited to 'Documentation') diff --git a/Documentation/RelNotes-1.5.3.3.txt b/Documentation/RelNotes-1.5.3.3.txt index e91bd84162..2a7bfdd5cc 100644 --- a/Documentation/RelNotes-1.5.3.3.txt +++ b/Documentation/RelNotes-1.5.3.3.txt @@ -29,9 +29,3 @@ Fixes since v1.5.3.2 * git-log sometimes invoked underlying "diff" machinery unnecessarily. - --- -exec >/var/tmp/1 -O=v1.5.3.2-29-gb7bb760 -echo O=`git describe refs/heads/maint` -git shortlog --no-merges $O..refs/heads/maint diff --git a/Documentation/RelNotes-1.5.3.4.txt b/Documentation/RelNotes-1.5.3.4.txt new file mode 100644 index 0000000000..47ba2870a2 --- /dev/null +++ b/Documentation/RelNotes-1.5.3.4.txt @@ -0,0 +1,28 @@ +GIT v1.5.3.4 Release Notes +========================== + +Fixes since v1.5.3.3 +-------------------- + + * Sample 'post-receive-hook' incorrectly sent out push + notification e-mails marked as "From: " the committer of the + commit that happened to be at the tip of the branch that was + pushed, not from the person who pushed. + + * git-remote did not exit non-zero status upon error. + + * "git-add -i" did not respond very well to EOF from tty nor + bogus input. + + * "git rebase -i" squash subcommand incorrectly made the + author of later commit the author of resulting commit, + instead of taking from the first one in the squashed series. + + * "git stash apply --index" was not documented. + + +-- +exec >/var/tmp/1 +O=v1.5.3.3-6-g0bdcac5 +echo O=`git describe refs/heads/maint` +git shortlog --no-merges $O..refs/heads/maint -- cgit v1.2.3 From 63a1f810a6f976a307aaaabdce21082f6d7f20aa Mon Sep 17 00:00:00 2001 From: Steffen Prohaska Date: Tue, 2 Oct 2007 08:14:37 +0200 Subject: fixed link in documentation of diff-options Signed-off-by: Steffen Prohaska Signed-off-by: Junio C Hamano --- Documentation/diff-options.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation') diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 228ccaf10a..b1f528ae88 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -179,8 +179,8 @@ --ext-diff:: Allow an external diff helper to be executed. If you set an - external diff driver with gitlink:gitattributes(5), you need - to use this option with gitlink:git-log(1) and friends. + external diff driver with gitlink:gitattributes[5], you need + to use this option with gitlink:git-log[1] and friends. --no-ext-diff:: Disallow external diff drivers. -- cgit v1.2.3 From 6ea9c7eb2713d55f9af7522e878e6912972bb889 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 2 Oct 2007 21:14:30 +0100 Subject: Fix typo in config.txt There was an 'l' (ell) instead of a '1' (one) in one of the gitlinks. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- Documentation/config.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/config.txt b/Documentation/config.txt index 866e0534b8..7ee97df8a7 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -579,7 +579,7 @@ merge.summary:: merge.tool:: Controls which merge resolution program is used by - gitlink:git-mergetool[l]. Valid values are: "kdiff3", "tkdiff", + gitlink:git-mergetool[1]. Valid values are: "kdiff3", "tkdiff", "meld", "xxdiff", "emerge", "vimdiff", "gvimdiff", and "opendiff". merge.verbosity:: -- cgit v1.2.3 From ac150747d7cc62d53daf9f7c128a0fa88a399f44 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 2 Oct 2007 18:32:32 -0500 Subject: Say when --track is useful in the git-checkout docs. The documentation used to say what the option does, but it didn't mention a use case. Signed-off-by: Federico Mena Quintero Signed-off-by: Junio C Hamano --- Documentation/git-checkout.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 734928bf96..2e58481ed6 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -50,7 +50,9 @@ OPTIONS --track:: When -b is given and a branch is created off a remote branch, set up configuration so that git-pull will automatically - retrieve data from the remote branch. Set the + retrieve data from the remote branch. Use this if you always + pull from the same remote branch into the new branch, or if you + don't want to use "git pull " explicitly. Set the branch.autosetupmerge configuration variable to true if you want git-checkout and git-branch to always behave as if '--track' were given. -- cgit v1.2.3 From 84d176cef65ad23e11643d463c69ad313b728eda Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 2 Oct 2007 18:33:30 -0500 Subject: Add documentation for --track and --no-track to the git-branch docs. Signed-off-by: Federico Mena Quintero Signed-off-by: Junio C Hamano --- Documentation/git-branch.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 33bc31b0d4..c839961494 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -91,6 +91,21 @@ OPTIONS --no-abbrev:: Display the full sha1s in output listing rather than abbreviating them. +--track:: + Set up configuration so that git-pull will automatically + retrieve data from the remote branch. Use this if you always + pull from the same remote branch into the new branch, or if you + don't want to use "git pull " explicitly. Set the + branch.autosetupmerge configuration variable to true if you + want git-checkout and git-branch to always behave as if + '--track' were given. + +--no-track:: + When -b is given and a branch is created off a remote branch, + set up configuration so that git-pull will not retrieve data + from the remote branch, ignoring the branch.autosetupmerge + configuration variable. + :: The name of the branch to create or delete. The new branch name must pass all checks defined by -- cgit v1.2.3 From 46749204e97290a0bf20e988d0356f0daba99347 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 2 Oct 2007 18:34:32 -0500 Subject: Note that git-branch will not automatically checkout the new branch Signed-off-by: Federico Mena Quintero Signed-off-by: Junio C Hamano --- Documentation/git-branch.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index c839961494..b7285bcdbc 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -26,6 +26,10 @@ It will start out with a head equal to the one given as . If no is given, the branch will be created with a head equal to that of the currently checked out branch. +Note that this will create the new branch, but it will not switch the +working tree to it; use "git checkout " to switch to the +new branch. + When a local branch is started off a remote branch, git can setup the branch so that gitlink:git-pull[1] will appropriately merge from that remote branch. If this behavior is desired, it is possible to make it -- cgit v1.2.3 From 4c75136f7697f76b31641db775163f5c75906ee2 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 3 Oct 2007 02:33:11 -0700 Subject: GIT 1.5.3.4 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.5.3.4.txt | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'Documentation') diff --git a/Documentation/RelNotes-1.5.3.4.txt b/Documentation/RelNotes-1.5.3.4.txt index 47ba2870a2..b04b3a45a5 100644 --- a/Documentation/RelNotes-1.5.3.4.txt +++ b/Documentation/RelNotes-1.5.3.4.txt @@ -4,25 +4,32 @@ GIT v1.5.3.4 Release Notes Fixes since v1.5.3.3 -------------------- - * Sample 'post-receive-hook' incorrectly sent out push + * Change to "git-ls-files" in v1.5.3.3 that was introduced to support + partial commit of removal better had a segfaulting bug, which was + diagnosed and fixed by Keith and Carl. + + * Performance improvements for rename detection has been backported + from the 'master' branch. + + * "git-for-each-ref --format='%(numparent)'" was not working + correctly at all, and --format='%(parent)' was not working for + merge commits. + + * Sample "post-receive-hook" incorrectly sent out push notification e-mails marked as "From: " the committer of the commit that happened to be at the tip of the branch that was pushed, not from the person who pushed. - * git-remote did not exit non-zero status upon error. + * "git-remote" did not exit non-zero status upon error. * "git-add -i" did not respond very well to EOF from tty nor bogus input. - * "git rebase -i" squash subcommand incorrectly made the + * "git-rebase -i" squash subcommand incorrectly made the author of later commit the author of resulting commit, instead of taking from the first one in the squashed series. - * "git stash apply --index" was not documented. - + * "git-stash apply --index" was not documented. --- -exec >/var/tmp/1 -O=v1.5.3.3-6-g0bdcac5 -echo O=`git describe refs/heads/maint` -git shortlog --no-merges $O..refs/heads/maint + * autoconfiguration learned that "ar" command is found as "gas" on + some systems. -- cgit v1.2.3 From 58ba4f6ac828606fc206cfd5cec412a6974c91a1 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 4 Oct 2007 01:35:01 -0700 Subject: Update state documentation link for 1.5.3.4 Signed-off-by: Junio C Hamano --- Documentation/git.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation') diff --git a/Documentation/git.txt b/Documentation/git.txt index abce801e48..1c0ee078e6 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -46,6 +46,7 @@ Documentation for older releases are available here: * link:v1.5.3/git.html[documentation for release 1.5.3] * release notes for + link:RelNotes-1.5.3.4.txt[1.5.3.4], link:RelNotes-1.5.3.3.txt[1.5.3.3], link:RelNotes-1.5.3.2.txt[1.5.3.2], link:RelNotes-1.5.3.1.txt[1.5.3.1]. -- cgit v1.2.3 From a5d410153736fc5320ad7322e25a6ccf56efcf10 Mon Sep 17 00:00:00 2001 From: Michele Ballabio Date: Thu, 4 Oct 2007 14:26:54 +0200 Subject: git-reflog: document --verbose Signed-off-by: Michele Ballabio Signed-off-by: Lars Hjemli Signed-off-by: Shawn O. Pearce --- Documentation/git-reflog.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-reflog.txt b/Documentation/git-reflog.txt index 5180f6810d..5c7316ceb8 100644 --- a/Documentation/git-reflog.txt +++ b/Documentation/git-reflog.txt @@ -16,7 +16,7 @@ The command takes various subcommands, and different options depending on the subcommand: [verse] -git reflog expire [--dry-run] [--stale-fix] +git reflog expire [--dry-run] [--stale-fix] [--verbose] [--expire=