diff options
Diffstat (limited to 'Documentation')
46 files changed, 738 insertions, 206 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index e5ca3b75d3..a600e35c81 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -145,6 +145,14 @@ For C programs: they were describing changes. Often splitting a function into two makes the intention of the code much clearer. + - Multi-line comments include their delimiters on separate lines from + the text. E.g. + + /* + * A very long + * multi-line comment. + */ + - Double negation is often harder to understand than no negation at all. diff --git a/Documentation/Makefile b/Documentation/Makefile index 0cfdc36b44..4f13a23893 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -103,6 +103,7 @@ MAKEINFO = makeinfo INSTALL_INFO = install-info DOCBOOK2X_TEXI = docbook2x-texi DBLATEX = dblatex +ASCIIDOC_DBLATEX_DIR = /etc/asciidoc/dblatex ifndef PERL_PATH PERL_PATH = /usr/bin/perl endif @@ -354,7 +355,7 @@ user-manual.texi: user-manual.xml user-manual.pdf: user-manual.xml $(QUIET_DBLATEX)$(RM) $@+ $@ && \ - $(DBLATEX) -o $@+ -p /etc/asciidoc/dblatex/asciidoc-dblatex.xsl -s /etc/asciidoc/dblatex/asciidoc-dblatex.sty $< && \ + $(DBLATEX) -o $@+ -p $(ASCIIDOC_DBLATEX_DIR)/asciidoc-dblatex.xsl -s $(ASCIIDOC_DBLATEX_DIR)/asciidoc-dblatex.sty $< && \ mv $@+ $@ gitman.texi: $(MAN_XML) cat-texi.perl diff --git a/Documentation/RelNotes/1.7.11.2.txt b/Documentation/RelNotes/1.7.11.2.txt index a0d24d1270..f0cfd02d6f 100644 --- a/Documentation/RelNotes/1.7.11.2.txt +++ b/Documentation/RelNotes/1.7.11.2.txt @@ -31,7 +31,7 @@ Fixes since v1.7.11.1 * "git diff --no-index" did not work with pagers correctly. * "git diff COPYING HEAD:COPYING" gave a nonsense error message that - claimed that the treeish HEAD did not have COPYING in it. + claimed that the tree-ish HEAD did not have COPYING in it. * When "git log" gets "--simplify-merges/by-decoration" together with "--first-parent", the combination of these options makes the diff --git a/Documentation/RelNotes/1.8.4.1.txt b/Documentation/RelNotes/1.8.4.1.txt new file mode 100644 index 0000000000..3aa25a2743 --- /dev/null +++ b/Documentation/RelNotes/1.8.4.1.txt @@ -0,0 +1,71 @@ +Git v1.8.4.1 Release Notes +======================== + +Fixes since v1.8.4 +------------------ + + * Some old versions of bash do not grok some constructs like + 'printf -v varname' which the prompt and completion code started + to use recently. The completion and prompt scripts have been + adjusted to work better with these old versions of bash. + + * In FreeBSD's and NetBSD's "sh", a return in a dot script in a + function returns from the function, not only in the dot script, + breaking "git rebase" on these platforms (regression introduced + in 1.8.4-rc1). + + * "git rebase -i" and other scripted commands were feeding a + random, data dependant error message to 'echo' and expecting it + to come out literally. + + * Setting the "submodule.<name>.path" variable to the empty + "true" caused the configuration parser to segfault. + + * Output from "git log --full-diff -- <pathspec>" looked strange + because comparison was done with the previous ancestor that + touched the specified <pathspec>, causing the patches for paths + outside the pathspec to show more than the single commit has + changed. + + * The auto-tag-following code in "git fetch" tries to reuse the + same transport twice when the serving end does not cooperate and + does not give tags that point to commits that are asked for as + part of the primary transfer. Unfortunately, Git-aware transport + helper interface is not designed to be used more than once, hence + this did not work over smart-http transfer. Fixed. + + * Send a large request to read(2)/write(2) as a smaller but still + reasonably large chunks, which would improve the latency when the + operation needs to be killed and incidentally works around broken + 64-bit systems that cannot take a 2GB write or read in one go. + + * A ".mailmap" file that ends with an incomplete line, when read + from a blob, was not handled properly. + + * The recent "short-cut clone connectivity check" topic broke a + shallow repository when a fetch operation tries to auto-follow + tags. + + * When send-email comes up with an error message to die with upon + failure to start an SSL session, it tried to read the error + string from a wrong place. + + * A call to xread() was used without a loop to cope with short + read in the codepath to stream large blobs to a pack. + + * On platforms with fgetc() and friends defined as macros, the + configuration parser did not compile. + + * New versions of MediaWiki introduced a new API for returning + more than 500 results in response to a query, which would cause + the MediaWiki remote helper to go into an infinite loop. + + * Subversion's serf access method (the only one available in + Subversion 1.8) for http and https URLs in skelta mode tells its + caller to open multiple files at a time, which made "git svn + fetch" complain that "Temp file with moniker 'svn_delta' already + in use" instead of fetching. + + +Also contains a handful of trivial code clean-ups, documentation +updates, updates to the test suite, etc. diff --git a/Documentation/RelNotes/1.8.4.2.txt b/Documentation/RelNotes/1.8.4.2.txt new file mode 100644 index 0000000000..ebe5e68fcb --- /dev/null +++ b/Documentation/RelNotes/1.8.4.2.txt @@ -0,0 +1,50 @@ +Git v1.8.4.2 Release Notes +======================== + +Fixes since v1.8.4.1 +-------------------- + + * When running "fetch -q", a long silence while the sender side + computes the set of objects to send can be mistaken by proxies as + dropped connection. The server side has been taught to send a + small empty messages to keep the connection alive. + + * When the webserver responds with "405 Method Not Allowed", "git + http-backend" should tell the client what methods are allowed with + the "Allow" header. + + * "git cvsserver" computed the permission mode bits incorrectly for + executable files. + + * The implementation of "add -i" has a crippling code to work around + ActiveState Perl limitation but it by mistake also triggered on Git + for Windows where MSYS perl is used. + + * We made sure that we notice the user-supplied GIT_DIR is actually a + gitfile, but did not do the same when the default ".git" is a + gitfile. + + * When an object is not found after checking the packfiles and then + loose object directory, read_sha1_file() re-checks the packfiles to + prevent racing with a concurrent repacker; teach the same logic to + has_sha1_file(). + + * "git commit --author=$name", when $name is not in the canonical + "A. U. Thor <au.thor@example.xz>" format, looks for a matching name + from existing history, but did not consult mailmap to grab the + preferred author name. + + * The commit object names in the insn sheet that was prepared at the + beginning of "rebase -i" session can become ambiguous as the + rebasing progresses and the repository gains more commits. Make + sure the internal record is kept with full 40-hex object names. + + * "git rebase --preserve-merges" internally used the merge machinery + and as a side effect, left merge summary message in the log, but + when rebasing, there should not be a need for merge summary. + + * "git rebase -i" forgot that the comment character can be + configurable while reading its insn sheet. + +Also contains a handful of trivial code clean-ups, documentation +updates, updates to the test suite, etc. diff --git a/Documentation/RelNotes/1.8.5.txt b/Documentation/RelNotes/1.8.5.txt index d6fb0c054a..aa50f0543a 100644 --- a/Documentation/RelNotes/1.8.5.txt +++ b/Documentation/RelNotes/1.8.5.txt @@ -42,12 +42,25 @@ release, will keep ignoring removals, but the users who rely on this behaviour are encouraged to start using "git add --ignore-removal <path>" now before 2.0 is released. +The default prefix for "git svn" will change in Git 2.0. For a long +time, "git svn" created its remote-tracking branches directly under +refs/remotes, but it will place them under refs/remotes/origin/ unless +it is told otherwise with its --prefix option. + Updates since v1.8.4 -------------------- Foreign interfaces, subsystems and ports. + * "git-svn" used with SVN 1.8.0 when talking over https:// connection + dumped core due to a bug in the serf library that SVN uses. Work + it around on our side, even though the SVN side is being fixed. + + * On MacOS X, we detected if the filesystem needs the "pre-composed + unicode strings" workaround, but did not automatically enable it. + Now we do. + * remote-hg remote helper misbehaved when interacting with a local Hg repository relative to the home directory, e.g. "clone hg::~/there". @@ -63,6 +76,68 @@ Foreign interfaces, subsystems and ports. UI, Workflows & Features + * "git replace" helper no longer allows an object to be replaced with + another object of a different type to avoid confusion (you can + still manually craft such replacement using "git update-ref", as an + escape hatch). + + * "git status" no longer prints dirty status information for + submodules for which submodule.$name.ignore is set to "all". + + * "git rebase -i" honours core.abbrev when preparing the insn sheet + for editing. + + * "git status" during a cherry-pick shows what original commit is + being picked. + + * Instead of typing four capital letters "HEAD", you can say "@" now, + e.g. "git log @". + + * "git check-ignore" follows the same rule as "git add" and "git + status" in that the ignore/exclude mechanism does not take effect + on paths that are already tracked. With "--no-index" option, it + can be used to diagnose which paths that should have been ignored + have been mistakenly added to the index. + + * Some irrelevant "advice" messages that are shared with "git status" + output have been removed from the commit log template. + + * "update-refs" learnt a "--stdin" option to read multiple update + requests and perform them in an all-or-none fashion. + + * Just like "make -C <directory>", "git -C <directory> ..." tells Git + to go there before doing anything else. + + * Just like "git checkout -" knows to check out and "git merge -" + knows to merge the branch you were previously on, "git cherry-pick" + now understands "git cherry-pick -" to pick from the previous + branch. + + * "git status" now omits the prefix to make its output a comment in a + commit log editor, which is not necessary for human consumption. + Scripts that parse the output of "git status" are advised to use + "git status --porcelain" instead, as its format is stable and easier + to parse. + + * Make "foo^{tag}" to peel a tag to itself, i.e. no-op., and fail if + "foo" is not a tag. "git rev-parse --verify v1.0^{tag}" would be + a more convenient way to say "test $(git cat-file -t v1.0) = tag". + + * "git branch -v -v" (and "git status") did not distinguish among a + branch that does not build on any other branch, a branch that is in + sync with the branch it builds on, and a branch that is configured + to build on some other branch that no longer exists. + + * A packfile that stores the same object more than once is broken and + will be rejected by "git index-pack" that is run when receiving + data over the wire. + + * Earlier we started rejecting an attempt to add 0{40} object name to + the index and to tree objects, but it sometimes is necessary to + allow so to be able to use tools like filter-branch to correct such + broken tree objects. "filter-branch" can again be used to to do + so. + * "git config" did not provide a way to set or access numbers larger than a native "int" on the platform; it now provides 64-bit signed integers on all platforms. @@ -126,6 +201,14 @@ UI, Workflows & Features Performance, Internal Implementation, etc. + * "git repack" is now written in C. + + * Build procedure for MSVC has been updated. + + * If a build-time fallback is set to "cat" instead of "less", we + should apply the same "no subprocess or pipe" optimization as we + apply to user-supplied GIT_PAGER=cat. + * Many commands use --dashed-option as a operation mode selector (e.g. "git tag --delete") that the user can use at most one (e.g. "git tag --delete --verify" is a nonsense) and you cannot @@ -155,6 +238,80 @@ Unless otherwise noted, all the fixes since v1.8.4 in the maintenance track are contained in this release (see release notes to them for details). + * "git clone" gave some progress messages to the standard output, not + to the standard error, and did not allow suppressing them with the + --no-progress option. + (merge 643f918 jk/clone-progress-to-stderr later to maint). + + * "format-patch --from=<whom>" forgot to omit unnecessary in-body + from line, i.e. when <whom> is the same as the real author. + (merge 662cc30 jk/format-patch-from later to maint). + + * "git shortlog" used to choke and die when there is a malformed + commit (e.g. missing authors); it now simply ignore such a commit + and keeps going. + (merge cd4f09e jk/shortlog-tolerate-broken-commit later to maint). + + * "git merge-recursive" did not parse its "--diff-algorithm=" command + line option correctly. + (merge 6562928 jk/diff-algo later to maint). + + * When running "fetch -q", a long silence while the sender side + computes the set of objects to send can be mistaken by proxies as + dropped connection. The server side has been taught to send a + small empty messages to keep the connection alive. + (merge 115dedd jk/upload-pack-keepalive later to maint). + + * "git rebase" had a portability regression in v1.8.4 to trigger a + bug in some BSD shell implementations. + (merge 99855dd mm/rebase-continue-freebsd-WB later to maint). + + * "git branch --track" had a minor regression in v1.8.3.2 and later + that made it impossible to base your local work on anything but a + local branch of the upstream repository you are tracking from. + (merge b0f49ff jh/checkout-auto-tracking later to maint). + + * When the webserver responds with "405 Method Not Allowed", "git + http-backend" should tell the client what methods are allowed with + the "Allow" header. + (merge 9247be0 bc/http-backend-allow-405 later to maint). + + * When there is no sufficient overlap between old and new history + during a "git fetch" into a shallow repository, objects that the + sending side knows the receiving end has were unnecessarily sent. + (merge f21d2a7 nd/fetch-into-shallow later to maint). + + * "git cvsserver" computed the permission mode bits incorrectly for + executable files. + (merge 1b48d56 jc/cvsserver-perm-bit-fix later to maint). + + * When send-email comes up with an error message to die with upon + failure to start an SSL session, it tried to read the error string + from a wrong place. + (merge 6cb0c88 bc/send-email-ssl-die-message-fix later to maint). + + * The implementation of "add -i" has a crippling code to work around + ActiveState Perl limitation but it by mistake also triggered on Git + for Windows where MSYS perl is used. + (merge df17e77 js/add-i-mingw later to maint). + + * We made sure that we notice the user-supplied GIT_DIR is actually a + gitfile, but did not do the same when the default ".git" is a + gitfile. + (merge 487a2b7 nd/git-dir-pointing-at-gitfile later to maint). + + * When an object is not found after checking the packfiles and then + loose object directory, read_sha1_file() re-checks the packfiles to + prevent racing with a concurrent repacker; teach the same logic to + has_sha1_file(). + (merge 45e8a74 jk/has-sha1-file-retry-packed later to maint). + + * "git commit --author=$name", when $name is not in the canonical + "A. U. Thor <au.thor@example.xz>" format, looks for a matching name + from existing history, but did not consult mailmap to grab the + preferred author name. + (merge ea16794 ap/commit-author-mailmap later to maint). + * "git ls-files -k" needs to crawl only the part of the working tree that may overlap the paths in the index to find killed files, but shared code with the logic to find all the untracked files, which diff --git a/Documentation/config.txt b/Documentation/config.txt index 0614f338e7..ab26963d61 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -170,8 +170,8 @@ advice.*:: pushNeedsForce:: Shown when linkgit:git-push[1] rejects an update that tries to overwrite a remote ref that points at an - object that is not a committish, or make the remote - ref point at an object that is not a committish. + object that is not a commit-ish, or make the remote + ref point at an object that is not a commit-ish. statusHints:: Show directions on how to proceed from the current state in the output of linkgit:git-status[1], in @@ -791,8 +791,8 @@ browser.<tool>.path:: working repository in gitweb (see linkgit:git-instaweb[1]). clean.requireForce:: - A boolean to make git-clean do nothing unless given -f - or -n. Defaults to true. + A boolean to make git-clean do nothing unless given -f, + -i or -n. Defaults to true. color.branch:: A boolean to enable/disable color in the output of @@ -2185,6 +2185,13 @@ status.branch:: Set to true to enable --branch by default in linkgit:git-status[1]. The option --no-branch takes precedence over this variable. +status.displayCommentPrefix:: + If set to true, linkgit:git-status[1] will insert a comment + prefix before each output line (starting with + `core.commentChar`, i.e. `#` by default). This was the + behavior of linkgit:git-status[1] in Git 1.8.4 and previous. + Defaults to false. + status.showUntrackedFiles:: By default, linkgit:git-status[1] and linkgit:git-commit[1] show files which are not currently tracked by Git. Directories which @@ -2209,7 +2216,14 @@ status.submodulesummary:: If this is set to a non zero number or true (identical to -1 or an unlimited number), the submodule summary will be enabled and a summary of commits for modified submodules will be shown (see - --summary-limit option of linkgit:git-submodule[1]). + --summary-limit option of linkgit:git-submodule[1]). Please note + that the summary output command will be suppressed for all + submodules when `diff.ignoreSubmodules` is set to 'all' or only + for those submodules where `submodule.<name>.ignore=all`. To + also view the summary for ignored submodules you can either use + the --ignore-submodules=dirty command line option or the 'git + submodule summary' command, which shows a similar output but does + not honor these settings. submodule.<name>.path:: submodule.<name>.url:: @@ -2244,7 +2258,8 @@ submodule.<name>.ignore:: submodules that have untracked files in their work tree as changed. This setting overrides any setting made in .gitmodules for this submodule, both settings can be overridden on the command line by using the - "--ignore-submodules" option. + "--ignore-submodules" option. The 'git submodule' commands are not + affected by this setting. tar.umask:: This variable can be used to restrict the permission bits of @@ -2283,6 +2298,17 @@ uploadpack.allowtipsha1inwant:: of a hidden ref (by default, such a request is rejected). see also `uploadpack.hiderefs`. +uploadpack.keepalive:: + When `upload-pack` has started `pack-objects`, there may be a + quiet period while `pack-objects` prepares the pack. Normally + it would output progress information, but if `--quiet` was used + for the fetch, `pack-objects` will output nothing at all until + the pack data begins. Some clients and networks may consider + the server to be hung and give up. Setting this option instructs + `upload-pack` to send an empty keepalive packet every + `uploadpack.keepalive` seconds. Setting this option to 0 + disables keepalive packets entirely. The default is 5 seconds. + url.<base>.insteadOf:: Any URL that starts with this value will be rewritten to start, instead, with <base>. In cases where some site serves a @@ -2318,11 +2344,11 @@ user.name:: environment variables. See linkgit:git-commit-tree[1]. user.signingkey:: - If linkgit:git-tag[1] is not selecting the key you want it to - automatically when creating a signed tag, you can override the - default selection with this variable. This option is passed - unchanged to gpg's --local-user parameter, so you may specify a key - using any method that gpg supports. + If linkgit:git-tag[1] or linkgit:git-commit[1] is not selecting the + key you want it to automatically when creating a signed tag or + commit, you can override the default selection with this variable. + This option is passed unchanged to gpg's --local-user parameter, + so you may specify a key using any method that gpg supports. web.browser:: Specify a web browser that may be used by some commands. diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt index ac77050255..223b9310df 100644 --- a/Documentation/diff-config.txt +++ b/Documentation/diff-config.txt @@ -73,7 +73,11 @@ diff.ignoreSubmodules:: Sets the default value of --ignore-submodules. Note that this affects only 'git diff' Porcelain, and not lower level 'diff' commands such as 'git diff-files'. 'git checkout' also honors - this setting when reporting uncommitted changes. + this setting when reporting uncommitted changes. Setting it to + 'all' disables the submodule summary normally shown by 'git commit' + and 'git status' when 'status.submodulesummary' is set unless it is + overridden by using the --ignore-submodules command line option. + The 'git submodule' commands are not affected by this setting. diff.mnemonicprefix:: If set, 'git diff' uses a prefix pair that is different from the diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt index e1fba85660..2a18c1f6f2 100644 --- a/Documentation/everyday.txt +++ b/Documentation/everyday.txt @@ -304,7 +304,7 @@ and maintain access to the repository by developers. * linkgit:git-shell[1] can be used as a 'restricted login shell' for shared central repository users. -link:howto/update-hook-example.txt[update hook howto] has a good +link:howto/update-hook-example.html[update hook howto] has a good example of managing a shared central repository. diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index b7cb625b89..311b33674e 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -48,7 +48,8 @@ working tree to it; use "git checkout <newbranch>" to switch to the new branch. When a local branch is started off a remote-tracking branch, Git sets up the -branch so that 'git pull' will appropriately merge from +branch (specifically the `branch.<name>.remote` and `branch.<name>.merge` +configuration entries) so that 'git pull' will appropriately merge from the remote-tracking branch. This behavior may be changed via the global `branch.autosetupmerge` configuration flag. That setting can be overridden by using the `--track` and `--no-track` options, and @@ -156,7 +157,8 @@ This option is only applicable in non-verbose mode. -t:: --track:: - When creating a new branch, set up configuration to mark the + When creating a new branch, set up `branch.<name>.remote` and + `branch.<name>.merge` configuration entries to mark the start-point branch as "upstream" from the new branch. This configuration will tell git to show the relationship between the two branches in `git status` and `git branch -v`. Furthermore, diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt index 21cffe2bcd..322f5ed315 100644 --- a/Documentation/git-cat-file.txt +++ b/Documentation/git-cat-file.txt @@ -54,7 +54,7 @@ OPTIONS --textconv:: Show the content as transformed by a textconv filter. In this case, - <object> has be of the form <treeish>:<path>, or :<path> in order + <object> has be of the form <tree-ish>:<path>, or :<path> in order to apply the filter to the content recorded in the index at <path>. --batch:: diff --git a/Documentation/git-check-ignore.txt b/Documentation/git-check-ignore.txt index d2df487aa2..ee2e091704 100644 --- a/Documentation/git-check-ignore.txt +++ b/Documentation/git-check-ignore.txt @@ -45,6 +45,13 @@ OPTIONS not be possible to distinguish between paths which match a pattern and those which don't. +--no-index:: + Don't look in the index when undertaking the checks. This can + be used to debug why a path became tracked by e.g. `git add .` + and was not ignored by the rules as expected by the user or when + developing patterns including negation to match a path previously + added with `git add -f`. + OUTPUT ------ diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt index a49be1bab4..fc02959ba4 100644 --- a/Documentation/git-check-ref-format.txt +++ b/Documentation/git-check-ref-format.txt @@ -54,6 +54,8 @@ Git imposes the following rules on how references are named: . They cannot contain a sequence `@{`. +. They cannot be the single character `@`. + . They cannot contain a `\`. These rules make it easy for shell script based tools to parse diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index ca118ac6bf..91294f89c8 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -9,7 +9,8 @@ SYNOPSIS -------- [verse] 'git checkout' [-q] [-f] [-m] [<branch>] -'git checkout' [-q] [-f] [-m] [--detach] [<commit>] +'git checkout' [-q] [-f] [-m] --detach [<branch>] +'git checkout' [-q] [-f] [-m] [--detach] <commit> 'git checkout' [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>] 'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>... 'git checkout' [-p|--patch] [<tree-ish>] [--] [<paths>...] @@ -62,7 +63,7 @@ that is to say, the branch is not reset/created unless "git checkout" is successful. 'git checkout' --detach [<branch>]:: -'git checkout' <commit>:: +'git checkout' [--detach] <commit>:: Prepare to work on top of <commit>, by detaching HEAD at it (see "DETACHED HEAD" section), and updating the index and the @@ -71,10 +72,11 @@ successful. tree will be the state recorded in the commit plus the local modifications. + -Passing `--detach` forces this behavior in the case of a <branch> (without -the option, giving a branch name to the command would check out the branch, -instead of detaching HEAD at it), or the current commit, -if no <branch> is specified. +When the <commit> argument is a branch name, the `--detach` option can +be used to detach HEAD at the tip of the branch (`git checkout +<branch>` would check out that branch without detaching HEAD). ++ +Omitting <branch> detaches HEAD at the tip of the current branch. 'git checkout' [-p|--patch] [<tree-ish>] [--] <pathspec>...:: diff --git a/Documentation/git-cherry.txt b/Documentation/git-cherry.txt index f6c19c734d..2d0daae626 100644 --- a/Documentation/git-cherry.txt +++ b/Documentation/git-cherry.txt @@ -14,8 +14,7 @@ DESCRIPTION ----------- The changeset (or "diff") of each commit between the fork-point and <head> is compared against each commit between the fork-point and <upstream>. -The commits are compared with their 'patch id', obtained from -the 'git patch-id' program. +The diffs are compared after removing any whitespace and line numbers. Every commit that doesn't exist in the <upstream> branch has its id (sha1) reported, prefixed by a symbol. The ones that have diff --git a/Documentation/git-credential.txt b/Documentation/git-credential.txt index 7da0f13a5c..b211440373 100644 --- a/Documentation/git-credential.txt +++ b/Documentation/git-credential.txt @@ -20,7 +20,7 @@ usernames and passwords. The git-credential command exposes this interface to scripts which may want to retrieve, store, or prompt for credentials in the same manner as Git. The design of this scriptable interface models the internal C API; see -link:technical/api-credentials.txt[the Git credential API] for more +link:technical/api-credentials.html[the Git credential API] for more background on the concepts. git-credential takes an "action" option on the command-line (one of diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt index 9439cd6d56..d20ca402a1 100644 --- a/Documentation/git-describe.txt +++ b/Documentation/git-describe.txt @@ -9,7 +9,7 @@ git-describe - Show the most recent tag that is reachable from a commit SYNOPSIS -------- [verse] -'git describe' [--all] [--tags] [--contains] [--abbrev=<n>] <committish>... +'git describe' [--all] [--tags] [--contains] [--abbrev=<n>] <commit-ish>... 'git describe' [--all] [--tags] [--contains] [--abbrev=<n>] --dirty[=<mark>] DESCRIPTION @@ -26,8 +26,8 @@ see the -a and -s options to linkgit:git-tag[1]. OPTIONS ------- -<committish>...:: - Committish object names to describe. +<commit-ish>...:: + Commit-ish object names to describe. --dirty[=<mark>]:: Describe the working tree. @@ -57,7 +57,7 @@ OPTIONS --candidates=<n>:: Instead of considering only the 10 most recent tags as - candidates to describe the input committish consider + candidates to describe the input commit-ish consider up to <n> candidates. Increasing <n> above 10 will take slightly longer but may produce a more accurate result. An <n> of 0 will cause only exact matches to be output. @@ -145,7 +145,7 @@ be sufficient to disambiguate these commits. SEARCH STRATEGY --------------- -For each committish supplied, 'git describe' will first look for +For each commit-ish supplied, 'git describe' will first look for a tag which tags exactly that commit. Annotated tags will always be preferred over lightweight tags, and tags with newer dates will always be preferred over tags with older dates. If an exact match @@ -154,12 +154,12 @@ is found, its name will be output and searching will stop. If an exact match was not found, 'git describe' will walk back through the commit history to locate an ancestor commit which has been tagged. The ancestor's tag will be output along with an -abbreviation of the input committish's SHA-1. If '--first-parent' was +abbreviation of the input commit-ish's SHA-1. If '--first-parent' was specified then the walk will only consider the first parent of each commit. If multiple tags were found during the walk then the tag which -has the fewest commits different from the input committish will be +has the fewest commits different from the input commit-ish will be selected and output. Here fewest commits different is defined as the number of commits which would be shown by `git log tag..input` will be the smallest number of commits possible. diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index 78d6d50489..33fbd8c56f 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -28,10 +28,15 @@ two blob objects, or changes between two files on disk. words, the differences are what you _could_ tell Git to further add to the index but you still haven't. You can stage these changes by using linkgit:git-add[1]. -+ -If exactly two paths are given and at least one points outside -the current repository, 'git diff' will compare the two files / -directories. This behavior can be forced by --no-index. + +'git diff' --no-index [--options] [--] [<path>...]:: + + This form is to compare the given two paths on the + filesystem. You can omit the `--no-index` option when + running the command in a working tree controlled by Git and + at least one of the paths points outside the working tree, + or when running the command outside a working tree + controlled by Git. 'git diff' [--options] --cached [<commit>] [--] [<path>...]:: diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt index 4a9cc74d57..73f980638e 100644 --- a/Documentation/git-fast-import.txt +++ b/Documentation/git-fast-import.txt @@ -380,8 +380,8 @@ change to the project. ('author' (SP <name>)? SP LT <email> GT SP <when> LF)? 'committer' (SP <name>)? SP LT <email> GT SP <when> LF data - ('from' SP <committish> LF)? - ('merge' SP <committish> LF)? + ('from' SP <commit-ish> LF)? + ('merge' SP <commit-ish> LF)? (filemodify | filedelete | filecopy | filerename | filedeleteall | notemodify)* LF? .... @@ -460,9 +460,9 @@ as the current commit on that branch is automatically assumed to be the first ancestor of the new commit. As `LF` is not valid in a Git refname or SHA-1 expression, no -quoting or escaping syntax is supported within `<committish>`. +quoting or escaping syntax is supported within `<commit-ish>`. -Here `<committish>` is any of the following: +Here `<commit-ish>` is any of the following: * The name of an existing branch already in fast-import's internal branch table. If fast-import doesn't know the name, it's treated as a SHA-1 @@ -509,7 +509,7 @@ additional ancestors (forming a 16-way merge). For this reason it is suggested that frontends do not use more than 15 `merge` commands per commit; 16, if starting a new, empty branch. -Here `<committish>` is any of the commit specification expressions +Here `<commit-ish>` is any of the commit specification expressions also accepted by `from` (see above). `filemodify` @@ -677,8 +677,8 @@ paths for a commit are encouraged to do so. `notemodify` ^^^^^^^^^^^^ Included in a `commit` `<notes_ref>` command to add a new note -annotating a `<committish>` or change this annotation contents. -Internally it is similar to filemodify 100644 on `<committish>` +annotating a `<commit-ish>` or change this annotation contents. +Internally it is similar to filemodify 100644 on `<commit-ish>` path (maybe split into subdirectories). It's not advised to use any other commands to write to the `<notes_ref>` tree except `filedeleteall` to delete all existing notes in this tree. @@ -691,7 +691,7 @@ External data format:: commit that is to be annotated. + .... - 'N' SP <dataref> SP <committish> LF + 'N' SP <dataref> SP <commit-ish> LF .... + Here `<dataref>` can be either a mark reference (`:<idnum>`) @@ -704,13 +704,13 @@ Inline data format:: command. + .... - 'N' SP 'inline' SP <committish> LF + 'N' SP 'inline' SP <commit-ish> LF data .... + See below for a detailed description of the `data` command. -In both formats `<committish>` is any of the commit specification +In both formats `<commit-ish>` is any of the commit specification expressions also accepted by `from` (see above). `mark` @@ -741,7 +741,7 @@ lightweight (non-annotated) tags see the `reset` command below. .... 'tag' SP <name> LF - 'from' SP <committish> LF + 'from' SP <commit-ish> LF 'tagger' (SP <name>)? SP LT <email> GT SP <when> LF data .... @@ -786,11 +786,11 @@ branch from an existing commit without creating a new commit. .... 'reset' SP <ref> LF - ('from' SP <committish> LF)? + ('from' SP <commit-ish> LF)? LF? .... -For a detailed description of `<ref>` and `<committish>` see above +For a detailed description of `<ref>` and `<commit-ish>` see above under `commit` and `from`. The `LF` after the command is optional (it used to be required). diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index 9e0ef0eaf3..5c0a4ab2d6 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -438,7 +438,8 @@ Edit..Preferences..Composition, wrap plain text messages at 0 In Thunderbird 3: Edit..Preferences..Advanced..Config Editor. Search for "mail.wrap_long_lines". -Toggle it to make sure it is set to `false`. +Toggle it to make sure it is set to `false`. Also, search for +"mailnews.wraplength" and set the value to 0. 3. Disable the use of format=flowed: Edit..Preferences..Advanced..Config Editor. Search for diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt index 8497aa4494..f83733490f 100644 --- a/Documentation/git-grep.txt +++ b/Documentation/git-grep.txt @@ -9,7 +9,7 @@ git-grep - Print lines matching a pattern SYNOPSIS -------- [verse] -'git grep' [-a | --text] [-I] [-i | --ignore-case] [-w | --word-regexp] +'git grep' [-a | --text] [-I] [--textconv] [-i | --ignore-case] [-w | --word-regexp] [-v | --invert-match] [-h|-H] [--full-name] [-E | --extended-regexp] [-G | --basic-regexp] [-P | --perl-regexp] @@ -80,6 +80,13 @@ OPTIONS --text:: Process binary files as if they were text. +--textconv:: + Honor textconv filter settings. + +--no-textconv:: + Do not honor textconv filter settings. + This is the default. + -i:: --ignore-case:: Ignore case differences between the patterns and the diff --git a/Documentation/git-merge-tree.txt b/Documentation/git-merge-tree.txt index c5f84b6495..58731c1942 100644 --- a/Documentation/git-merge-tree.txt +++ b/Documentation/git-merge-tree.txt @@ -13,7 +13,7 @@ SYNOPSIS DESCRIPTION ----------- -Reads three treeish, and output trivial merge results and +Reads three tree-ish, and output trivial merge results and conflicting stages to the standard output. This is similar to what three-way 'git read-tree -m' does, but instead of storing the results in the index, the command outputs the entries to the diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index a74c3713c6..439545926e 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -10,7 +10,7 @@ SYNOPSIS -------- [verse] 'git merge' [-n] [--stat] [--no-commit] [--squash] [--[no-]edit] - [-s <strategy>] [-X <strategy-option>] + [-s <strategy>] [-X <strategy-option>] [-S[<keyid>]] [--[no-]rerere-autoupdate] [-m <msg>] [<commit>...] 'git merge' <msg> HEAD <commit>... 'git merge' --abort @@ -65,6 +65,10 @@ OPTIONS ------- include::merge-options.txt[] +-S[<keyid>]:: +--gpg-sign[=<keyid>]:: + GPG-sign the resulting merge commit. + -m <msg>:: Set the commit message to be used for the merge commit (in case one is created). diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt index 15b00e0991..ca28fb8e2a 100644 --- a/Documentation/git-name-rev.txt +++ b/Documentation/git-name-rev.txt @@ -10,7 +10,7 @@ SYNOPSIS -------- [verse] 'git name-rev' [--tags] [--refs=<pattern>] - ( --all | --stdin | <committish>... ) + ( --all | --stdin | <commit-ish>... ) DESCRIPTION ----------- diff --git a/Documentation/git-prune-packed.txt b/Documentation/git-prune-packed.txt index 80dc022ede..6738055bd3 100644 --- a/Documentation/git-prune-packed.txt +++ b/Documentation/git-prune-packed.txt @@ -14,7 +14,7 @@ SYNOPSIS DESCRIPTION ----------- -This program searches the `$GIT_OBJECT_DIR` for all objects that currently +This program searches the `$GIT_OBJECT_DIRECTORY` for all objects that currently exist in a pack file as well as the independent object directories. All such extra objects are removed. diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index e2992f17a0..9eec740910 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -121,7 +121,7 @@ already exists on the remote side. --follow-tags:: Push all the refs that would be pushed without this option, and also push annotated tags in `refs/tags` that are missing - from the remote but are pointing at committish that are + from the remote but are pointing at commit-ish that are reachable from the refs being pushed. --receive-pack=<git-receive-pack>:: diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 6b2e1c86ab..94e07fdab5 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -322,7 +322,7 @@ You may find this (or --no-ff with an interactive rebase) helpful after reverting a topic branch merge, as this option recreates the topic branch with fresh commits so it can be remerged successfully without needing to "revert the reversion" (see the -link:howto/revert-a-faulty-merge.txt[revert-a-faulty-merge How-To] for details). +link:howto/revert-a-faulty-merge.html[revert-a-faulty-merge How-To] for details). --ignore-whitespace:: --whitespace=<option>:: @@ -416,7 +416,7 @@ Without --interactive, this is a synonym for --force-rebase. You may find this helpful after reverting a topic branch merge, as this option recreates the topic branch with fresh commits so it can be remerged successfully without needing to "revert the reversion" (see the -link:howto/revert-a-faulty-merge.txt[revert-a-faulty-merge How-To] for details). +link:howto/revert-a-faulty-merge.html[revert-a-faulty-merge How-To] for details). include::merge-strategies.txt[] diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt index 9c3e3bf83a..2507c8bd91 100644 --- a/Documentation/git-remote.txt +++ b/Documentation/git-remote.txt @@ -13,7 +13,7 @@ SYNOPSIS 'git remote add' [-t <branch>] [-m <master>] [-f] [--[no-]tags] [--mirror=<fetch|push>] <name> <url> 'git remote rename' <old> <new> 'git remote remove' <name> -'git remote set-head' <name> (-a | -d | <branch>) +'git remote set-head' <name> (-a | --auto | -d | --delete | <branch>) 'git remote set-branches' [--add] <name> <branch>... 'git remote set-url' [--push] <name> <newurl> [<oldurl>] 'git remote set-url --add' [--push] <name> <newurl> @@ -101,9 +101,9 @@ branch. For example, if the default branch for `origin` is set to `master`, then `origin` may be specified wherever you would normally specify `origin/master`. + -With `-d`, the symbolic ref `refs/remotes/<name>/HEAD` is deleted. +With `-d` or `--delete`, the symbolic ref `refs/remotes/<name>/HEAD` is deleted. + -With `-a`, the remote is queried to determine its `HEAD`, then the +With `-a` or `--auto`, the remote is queried to determine its `HEAD`, then the symbolic-ref `refs/remotes/<name>/HEAD` is set to the same branch. e.g., if the remote `HEAD` is pointed at `next`, "`git remote set-head origin -a`" will set the symbolic-ref `refs/remotes/origin/HEAD` to `refs/remotes/origin/next`. This will diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index e0b4057976..f373ab48d4 100644 --- a/Documentation/git-replace.txt +++ b/Documentation/git-replace.txt @@ -20,8 +20,14 @@ The name of the 'replace' reference is the SHA-1 of the object that is replaced. The content of the 'replace' reference is the SHA-1 of the replacement object. +The replaced object and the replacement object must be of the same type. +This restriction can be bypassed using `-f`. + Unless `-f` is given, the 'replace' reference must not yet exist. +There is no other restriction on the replaced and replacement objects. +Merge commits can be replaced by non-merge commits and vice versa. + Replacement references will be used by default by all Git commands except those doing reachability traversal (prune, pack transfer and fsck). @@ -49,18 +55,34 @@ achieve the same effect as the `--no-replace-objects` option. OPTIONS ------- -f:: +--force:: If an existing replace ref for the same object exists, it will be overwritten (instead of failing). -d:: +--delete:: Delete existing replace refs for the given objects. -l <pattern>:: +--list <pattern>:: List replace refs for objects that match the given pattern (or all if no pattern is given). Typing "git replace" without arguments, also lists all replace refs. +CREATING REPLACEMENT OBJECTS +---------------------------- + +linkgit:git-filter-branch[1], linkgit:git-hash-object[1] and +linkgit:git-rebase[1], among other git commands, can be used to create +replacement objects from existing objects. + +If you want to replace many blobs, trees or commits that are part of a +string of commits, you may just want to create a replacement string of +commits and then only replace the commit at the tip of the target +string of commits with the commit at the tip of the replacement string +of commits. + BUGS ---- Comparing blobs or trees that have been replaced with those that @@ -69,12 +91,13 @@ go back to a replaced commit will move the branch to the replacement commit instead of the replaced commit. There may be other problems when using 'git rev-list' related to -pending objects. And of course things may break if an object of one -type is replaced by an object of another type (for example a blob -replaced by a commit). +pending objects. SEE ALSO -------- +linkgit:git-hash-object[1] +linkgit:git-filter-branch[1] +linkgit:git-rebase[1] linkgit:git-tag[1] linkgit:git-branch[1] linkgit:git[1] diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt index f79c9d8583..2de67a5496 100644 --- a/Documentation/git-revert.txt +++ b/Documentation/git-revert.txt @@ -59,7 +59,7 @@ brought in by the merge. As a result, later merges will only bring in tree changes introduced by commits that are not ancestors of the previously reverted merge. This may or may not be what you want. + -See the link:howto/revert-a-faulty-merge.txt[revert-a-faulty-merge How-To] for +See the link:howto/revert-a-faulty-merge.html[revert-a-faulty-merge How-To] for more details. --no-edit:: diff --git a/Documentation/git-sh-setup.txt b/Documentation/git-sh-setup.txt index 5d709d02c3..4f67c4cde6 100644 --- a/Documentation/git-sh-setup.txt +++ b/Documentation/git-sh-setup.txt @@ -41,9 +41,11 @@ usage:: die with the usage message. set_reflog_action:: - set the message that will be recorded to describe the - end-user action in the reflog, when the script updates a - ref. + Set GIT_REFLOG_ACTION environment to a given string (typically + the name of the program) unless it is already set. Whenever + the script runs a `git` command that updates refs, a reflog + entry is created using the value of this string to leave the + record of what command updated the ref. git_editor:: runs an editor of user's choice (GIT_EDITOR, core.editor, VISUAL or diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt index 9046df98a0..a4acaa038c 100644 --- a/Documentation/git-status.txt +++ b/Documentation/git-status.txt @@ -210,7 +210,13 @@ directory. If `status.submodulesummary` is set to a non zero number or true (identical to -1 or an unlimited number), the submodule summary will be enabled for the long format and a summary of commits for modified submodules will be -shown (see --summary-limit option of linkgit:git-submodule[1]). +shown (see --summary-limit option of linkgit:git-submodule[1]). Please note +that the summary output from the status command will be suppressed for all +submodules when `diff.ignoreSubmodules` is set to 'all' or only for those +submodules where `submodule.<name>.ignore=all`. To also view the summary for +ignored submodules you can either use the --ignore-submodules=dirty command +line option or the 'git submodule summary' command, which shows a similar +output but does not honor these settings. SEE ALSO -------- diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 4dd3bcb511..2a3847649d 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -79,8 +79,21 @@ COMMANDS trailing slash, so be sure you include one in the argument if that is what you want. If --branches/-b is specified, the prefix must include a trailing slash. - Setting a prefix is useful if you wish to track multiple - projects that share a common repository. + Setting a prefix (with a trailing slash) is strongly + encouraged in any case, as your SVN-tracking refs will + then be located at "refs/remotes/$prefix/*", which is + compatible with Git's own remote-tracking ref layout + (refs/remotes/$remote/*). Setting a prefix is also useful + if you wish to track multiple projects that share a common + repository. ++ +NOTE: In Git v2.0, the default prefix will CHANGE from "" (no prefix) +to "origin/". This is done to put SVN-tracking refs at +"refs/remotes/origin/*" instead of "refs/remotes/*", and make them +more compatible with how Git's own remote-tracking refs are organized +(i.e. refs/remotes/$remote/*). You can enjoy the same benefits today, +by using the --prefix option. + --ignore-paths=<regex>;; When passed to 'init' or 'clone' this regular expression will be preserved as a config key. See 'fetch' for a description @@ -104,8 +117,11 @@ COMMANDS 'fetch':: Fetch unfetched revisions from the Subversion remote we are tracking. The name of the [svn-remote "..."] section in the - .git/config file may be specified as an optional command-line - argument. + $GIT_DIR/config file may be specified as an optional + command-line argument. ++ +This automatically updates the rev_map if needed (see +'$GIT_DIR/svn/\*\*/.rev_map.*' in the FILES section below for details). --localtime;; Store Git commit times in the local timezone instead of UTC. This @@ -201,6 +217,9 @@ accept. However, '--fetch-all' only fetches from the current + Like 'git rebase'; this requires that the working tree be clean and have no uncommitted changes. ++ +This automatically updates the rev_map if needed (see +'$GIT_DIR/svn/\*\*/.rev_map.*' in the FILES section below for details). -l;; --local;; @@ -435,8 +454,8 @@ Any other arguments are passed directly to 'git log' specific revision. 'gc':: - Compress $GIT_DIR/svn/<refname>/unhandled.log files in .git/svn - and remove $GIT_DIR/svn/<refname>index files in .git/svn. + Compress $GIT_DIR/svn/<refname>/unhandled.log files and remove + $GIT_DIR/svn/<refname>/index files. 'reset':: Undoes the effects of 'fetch' back to the specified revision. @@ -449,9 +468,10 @@ Any other arguments are passed directly to 'git log' file cannot be ignored forever (with --ignore-paths) the only way to repair the repo is to use 'reset'. + -Only the rev_map and refs/remotes/git-svn are changed. Follow 'reset' -with a 'fetch' and then 'git reset' or 'git rebase' to move local -branches onto the new tree. +Only the rev_map and refs/remotes/git-svn are changed (see +'$GIT_DIR/svn/\*\*/.rev_map.*' in the FILES section below for details). +Follow 'reset' with a 'fetch' and then 'git reset' or 'git rebase' to +move local branches onto the new tree. -r <n>;; --revision=<n>;; @@ -684,7 +704,7 @@ svn-remote.<name>.noMetadata:: + This option can only be used for one-shot imports as 'git svn' will not be able to fetch again without metadata. Additionally, -if you lose your .git/svn/**/.rev_map.* files, 'git svn' will not +if you lose your '$GIT_DIR/svn/\*\*/.rev_map.*' files, 'git svn' will not be able to rebuild them. + The 'git svn log' command will not work on repositories using @@ -804,16 +824,16 @@ Tracking and contributing to an entire Subversion-managed project ------------------------------------------------------------------------ # Clone a repo with standard SVN directory layout (like git clone): - git svn clone http://svn.example.com/project --stdlayout + git svn clone http://svn.example.com/project --stdlayout --prefix svn/ # Or, if the repo uses a non-standard directory layout: - git svn clone http://svn.example.com/project -T tr -b branch -t tag + git svn clone http://svn.example.com/project -T tr -b branch -t tag --prefix svn/ # View all branches and tags you have cloned: git branch -r # Create a new branch in SVN git svn branch waldo # Reset your master to trunk (or any other branch, replacing 'trunk' # with the appropriate name): - git reset --hard remotes/trunk + git reset --hard svn/trunk # You may only dcommit to one branch/tag/trunk at a time. The usage # of dcommit/rebase/show-ignore should be the same as above. ------------------------------------------------------------------------ @@ -827,7 +847,7 @@ have each person clone that repository with 'git clone': ------------------------------------------------------------------------ # Do the initial import on a server - ssh server "cd /pub && git svn clone http://svn.example.com/project + ssh server "cd /pub && git svn clone http://svn.example.com/project [options...]" # Clone locally - make sure the refs/remotes/ space matches the server mkdir project cd project @@ -840,8 +860,9 @@ have each person clone that repository with 'git clone': git config --remove-section remote.origin # Create a local branch from one of the branches just fetched git checkout -b master FETCH_HEAD -# Initialize 'git svn' locally (be sure to use the same URL and -T/-b/-t options as were used on server) - git svn init http://svn.example.com/project +# Initialize 'git svn' locally (be sure to use the same URL and +# --stdlayout/-T/-b/-t/--prefix options as were used on server) + git svn init http://svn.example.com/project [options...] # Pull the latest changes from Subversion git svn rebase ------------------------------------------------------------------------ @@ -973,12 +994,22 @@ without giving any repository layout options. If the full history with branches and tags is required, the options '--trunk' / '--branches' / '--tags' must be used. +When using the options for describing the repository layout (--trunk, +--tags, --branches, --stdlayout), please also specify the --prefix +option (e.g. '--prefix=origin/') to cause your SVN-tracking refs to be +placed at refs/remotes/origin/* rather than the default refs/remotes/*. +The former is more compatible with the layout of Git's "regular" +remote-tracking refs (refs/remotes/$remote/*), and may potentially +prevent similarly named SVN branches and Git remotes from clobbering +each other. In Git v2.0 the default prefix used (i.e. when no --prefix +is given) will change from "" (no prefix) to "origin/". + When using multiple --branches or --tags, 'git svn' does not automatically handle name collisions (for example, if two branches from different paths have the same name, or if a branch and a tag have the same name). In these cases, use 'init' to set up your Git repository then, before your first 'fetch', edit -the .git/config file so that the branches and tags are associated with -different name spaces. For example: +the $GIT_DIR/config file so that the branches and tags are associated +with different name spaces. For example: branches = stable/*:refs/remotes/svn/stable/* branches = debug/*:refs/remotes/svn/debug/* @@ -1006,7 +1037,7 @@ CONFIGURATION ------------- 'git svn' stores [svn-remote] configuration information in the -repository .git/config file. It is similar the core Git +repository $GIT_DIR/config file. It is similar the core Git [remote] sections except 'fetch' keys do not accept glob arguments; but they are instead handled by the 'branches' and 'tags' keys. Since some SVN repositories are oddly @@ -1035,8 +1066,8 @@ comma-separated list of names within braces. For example: [svn-remote "huge-project"] url = http://server.org/svn fetch = trunk/src:refs/remotes/trunk - branches = branches/{red,green}/src:refs/remotes/branches/* - tags = tags/{1.0,2.0}/src:refs/remotes/tags/* + branches = branches/{red,green}/src:refs/remotes/project-a/branches/* + tags = tags/{1.0,2.0}/src:refs/remotes/project-a/tags/* ------------------------------------------------------------------------ Multiple fetch, branches, and tags keys are supported: @@ -1060,8 +1091,21 @@ $ git svn branch -d branches/server release-2-3-0 Note that git-svn keeps track of the highest revision in which a branch or tag has appeared. If the subset of branches or tags is changed after -fetching, then .git/svn/.metadata must be manually edited to remove (or -reset) branches-maxRev and/or tags-maxRev as appropriate. +fetching, then $GIT_DIR/svn/.metadata must be manually edited to remove +(or reset) branches-maxRev and/or tags-maxRev as appropriate. + +FILES +----- +$GIT_DIR/svn/\*\*/.rev_map.*:: + Mapping between Subversion revision numbers and Git commit + names. In a repository where the noMetadata option is not set, + this can be rebuilt from the git-svn-id: lines that are at the + end of every commit (see the 'svn.noMetadata' section above for + details). ++ +'git svn fetch' and 'git svn rebase' automatically update the rev_map +if it is missing or not up to date. 'git svn reset' automatically +rewinds it. SEE ALSO -------- diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt index 0df13ff6f4..0a0a5512b3 100644 --- a/Documentation/git-update-ref.txt +++ b/Documentation/git-update-ref.txt @@ -8,7 +8,7 @@ git-update-ref - Update the object name stored in a ref safely SYNOPSIS -------- [verse] -'git update-ref' [-m <reason>] (-d <ref> [<oldvalue>] | [--no-deref] <ref> <newvalue> [<oldvalue>]) +'git update-ref' [-m <reason>] (-d <ref> [<oldvalue>] | [--no-deref] <ref> <newvalue> [<oldvalue>] | --stdin [-z]) DESCRIPTION ----------- @@ -58,6 +58,58 @@ archive by creating a symlink tree). With `-d` flag, it deletes the named <ref> after verifying it still contains <oldvalue>. +With `--stdin`, update-ref reads instructions from standard input and +performs all modifications together. Specify commands of the form: + + update SP <ref> SP <newvalue> [SP <oldvalue>] LF + create SP <ref> SP <newvalue> LF + delete SP <ref> [SP <oldvalue>] LF + verify SP <ref> [SP <oldvalue>] LF + option SP <opt> LF + +Quote fields containing whitespace as if they were strings in C source +code. Alternatively, use `-z` to specify commands without quoting: + + update SP <ref> NUL <newvalue> NUL [<oldvalue>] NUL + create SP <ref> NUL <newvalue> NUL + delete SP <ref> NUL [<oldvalue>] NUL + verify SP <ref> NUL [<oldvalue>] NUL + option SP <opt> NUL + +Lines of any other format or a repeated <ref> produce an error. +Command meanings are: + +update:: + Set <ref> to <newvalue> after verifying <oldvalue>, if given. + Specify a zero <newvalue> to ensure the ref does not exist + after the update and/or a zero <oldvalue> to make sure the + ref does not exist before the update. + +create:: + Create <ref> with <newvalue> after verifying it does not + exist. The given <newvalue> may not be zero. + +delete:: + Delete <ref> after verifying it exists with <oldvalue>, if + given. If given, <oldvalue> may not be zero. + +verify:: + Verify <ref> against <oldvalue> but do not change it. If + <oldvalue> zero or missing, the ref must not exist. + +option:: + Modify behavior of the next command naming a <ref>. + The only valid option is `no-deref` to avoid dereferencing + a symbolic ref. + +Use 40 "0" or the empty string to specify a zero value, except that +with `-z` an empty <oldvalue> is considered missing. + +If all <ref>s can be locked with matching <oldvalue>s +simultaneously, all modifications are performed. Otherwise, no +modifications are performed. Note that while each individual +<ref> is updated or deleted atomically, a concurrent reader may +still see a subset of the modifications. Logging Updates --------------- diff --git a/Documentation/git.txt b/Documentation/git.txt index c4f0ed5957..4f7e07f2e0 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -9,7 +9,7 @@ git - the stupid content tracker SYNOPSIS -------- [verse] -'git' [--version] [--help] [-c <name>=<value>] +'git' [--version] [--help] [-C <path>] [-c <name>=<value>] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path] [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>] @@ -43,9 +43,10 @@ unreleased) version of Git, that is available from 'master' branch of the `git.git` repository. Documentation for older releases are available here: -* link:v1.8.4/git.html[documentation for release 1.8.4] +* link:v1.8.4.1/git.html[documentation for release 1.8.4.1] * release notes for + link:RelNotes/1.8.4.1.txt[1.8.4.1], link:RelNotes/1.8.4.txt[1.8.4]. * link:v1.8.3.4/git.html[documentation for release 1.8.3.4] @@ -395,6 +396,20 @@ displayed. See linkgit:git-help[1] for more information, because `git --help ...` is converted internally into `git help ...`. +-C <path>:: + Run as if git was started in '<path>' instead of the current working + directory. When multiple `-C` options are given, each subsequent + non-absolute `-C <path>` is interpreted relative to the preceding `-C + <path>`. ++ +This option affects options that expect path name like `--git-dir` and +`--work-tree` in that their interpretations of the path names would be +made relative to the working directory caused by the `-C` option. For +example the following invocations are equivalent: + + git --git-dir=a.git --work-tree=b -C c status + git --git-dir=c/a.git --work-tree=c/b status + -c <name>=<value>:: Pass a configuration parameter to the command. The value given will override values from configuration files. @@ -461,19 +476,19 @@ help ...`. This is equivalent to setting the `GIT_LITERAL_PATHSPECS` environment variable to `1`. ---glob-pathspecs: +--glob-pathspecs:: Add "glob" magic to all pathspec. This is equivalent to setting the `GIT_GLOB_PATHSPECS` environment variable to `1`. Disabling globbing on individual pathspecs can be done using pathspec magic ":(literal)" ---noglob-pathspecs: +--noglob-pathspecs:: Add "literal" magic to all pathspec. This is equivalent to setting the `GIT_NOGLOB_PATHSPECS` environment variable to `1`. Enabling globbing on individual pathspecs can be done using pathspec magic ":(glob)" ---icase-pathspecs: +--icase-pathspecs:: Add "icase" magic to all pathspec. This is equivalent to setting the `GIT_ICASE_PATHSPECS` environment variable to `1`. @@ -894,6 +909,16 @@ GIT_ICASE_PATHSPECS:: Setting this variable to `1` will cause Git to treat all pathspecs as case-insensitive. +'GIT_REFLOG_ACTION':: + When a ref is updated, reflog entries are created to keep + track of the reason why the ref was updated (which is + typically the name of the high-level command that updated + the ref), in addition to the old and new values of the ref. + A scripted Porcelain command can use set_reflog_action + helper function in `git-sh-setup` to set its name to this + variable when it is invoked as the top level command by the + end user, to be recorded in the body of the reflog. + Discussion[[Discussion]] ------------------------ diff --git a/Documentation/gitcli.txt b/Documentation/gitcli.txt index 24e1784023..3146413cce 100644 --- a/Documentation/gitcli.txt +++ b/Documentation/gitcli.txt @@ -110,7 +110,7 @@ couple of magic command line options: + --------------------------------------------- $ git describe -h -usage: git describe [options] <committish>* +usage: git describe [options] <commit-ish>* or: git describe [options] --dirty --contains find the tag that comes after the commit diff --git a/Documentation/gitcvs-migration.txt b/Documentation/gitcvs-migration.txt index 5ab5b0727f..5ea94cbceb 100644 --- a/Documentation/gitcvs-migration.txt +++ b/Documentation/gitcvs-migration.txt @@ -157,7 +157,7 @@ points. You can use these, for example, to send all commits to the shared repository to a mailing list. See linkgit:githooks[5]. You can enforce finer grained permissions using update hooks. See -link:howto/update-hook-example.txt[Controlling access to branches using +link:howto/update-hook-example.html[Controlling access to branches using update hooks]. Providing CVS Access to a Git Repository diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt index 6a1ca4abad..f7be93f631 100644 --- a/Documentation/gitmodules.txt +++ b/Documentation/gitmodules.txt @@ -75,7 +75,8 @@ submodule.<name>.ignore:: the superproject, the setting there will override the one found in .gitmodules. Both settings can be overridden on the command line by using the - "--ignore-submodule" option. + "--ignore-submodule" option. The 'git submodule' commands are not + affected by this setting. EXAMPLES diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt index 13a64d3aac..e4706615be 100644 --- a/Documentation/glossary-content.txt +++ b/Documentation/glossary-content.txt @@ -82,6 +82,18 @@ to point at the new commit. to the top <<def_directory,directory>> of the stored revision. +[[def_commit-ish]]commit-ish (also committish):: + A <<def_commit_object,commit object>> or an + <<def_object,object>> that can be recursively dereferenced to + a commit object. + The following are all commit-ishes: + a commit object, + a <<def_tag_object,tag object>> that points to a commit + object, + a tag object that points to a tag object that points to a + commit object, + etc. + [[def_core_git]]core Git:: Fundamental data structures and utilities of Git. Exposes only limited source code management tools. @@ -427,10 +439,20 @@ should not be combined with other pathspec. to the result. [[def_ref]]ref:: - A 40-byte hex representation of a <<def_SHA1,SHA-1>> or a name that - denotes a particular <<def_object,object>>. They may be stored in - a file under `$GIT_DIR/refs/` directory, or - in the `$GIT_DIR/packed-refs` file. + A name that begins with `refs/` (e.g. `refs/heads/master`) + that points to an <<def_object_name,object name>> or another + ref (the latter is called a <<def_symref,symbolic ref>>). + For convenience, a ref can sometimes be abbreviated when used + as an argument to a Git command; see linkgit:gitrevisions[7] + for details. + Refs are stored in the <<def_repository,repository>>. ++ +The ref namespace is hierarchical. +Different subhierarchies are used for different purposes (e.g. the +`refs/heads/` hierarchy is used to represent local branches). ++ +There are a few special-purpose refs that do not begin with `refs/`. +The most notable example is `HEAD`. [[def_reflog]]reflog:: A reflog shows the local "history" of a ref. In other words, @@ -530,10 +552,19 @@ should not be combined with other pathspec. with refs to the associated blob and/or tree objects. A <<def_tree,tree>> is equivalent to a <<def_directory,directory>>. -[[def_tree-ish]]tree-ish:: - A <<def_ref,ref>> pointing to either a <<def_commit_object,commit - object>>, a <<def_tree_object,tree object>>, or a <<def_tag_object,tag - object>> pointing to a tag or commit or tree object. +[[def_tree-ish]]tree-ish (also treeish):: + A <<def_tree_object,tree object>> or an <<def_object,object>> + that can be recursively dereferenced to a tree object. + Dereferencing a <<def_commit_object,commit object>> yields the + tree object corresponding to the <<def_revision,revision>>'s + top <<def_directory,directory>>. + The following are all tree-ishes: + a <<def_commit-ish,commit-ish>>, + a tree object, + a <<def_tag_object,tag object>> that points to a tree object, + a tag object that points to a tag object that points to a tree + object, + etc. [[def_unmerged_index]]unmerged index:: An <<def_index,index>> which contains unmerged diff --git a/Documentation/howto/revert-a-faulty-merge.txt b/Documentation/howto/revert-a-faulty-merge.txt index 075418eeeb..acf3e477e5 100644 --- a/Documentation/howto/revert-a-faulty-merge.txt +++ b/Documentation/howto/revert-a-faulty-merge.txt @@ -37,7 +37,7 @@ where A and B are on the side development that was not so good, M is the merge that brings these premature changes into the mainline, x are changes unrelated to what the side branch did and already made on the mainline, and W is the "revert of the merge M" (doesn't W look M upside down?). -IOW, "diff W^..W" is similar to "diff -R M^..M". +IOW, `"diff W^..W"` is similar to `"diff -R M^..M"`. Such a "revert" of a merge can be made with: @@ -121,9 +121,9 @@ If you reverted the revert in such a case as in the previous example: ---A---B A'--B'--C' where Y is the revert of W, A' and B' are rerolled A and B, and there may -also be a further fix-up C' on the side branch. "diff Y^..Y" is similar -to "diff -R W^..W" (which in turn means it is similar to "diff M^..M"), -and "diff A'^..C'" by definition would be similar but different from that, +also be a further fix-up C' on the side branch. `"diff Y^..Y"` is similar +to `"diff -R W^..W"` (which in turn means it is similar to `"diff M^..M"`), +and `"diff A'^..C'"` by definition would be similar but different from that, because it is a rerolled series of the earlier change. There will be a lot of overlapping changes that result in conflicts. So do not do "revert of revert" blindly without thinking.. diff --git a/Documentation/howto/revert-branch-rebase.txt b/Documentation/howto/revert-branch-rebase.txt index 0d5419e1a9..85f69dbac9 100644 --- a/Documentation/howto/revert-branch-rebase.txt +++ b/Documentation/howto/revert-branch-rebase.txt @@ -154,7 +154,7 @@ $ git pull . master Packing 0 objects Unpacking 0 objects -* committish: e3a693c... refs/heads/master from . +* commit-ish: e3a693c... refs/heads/master from . Trying to merge e3a693c... into 8c1f5f0... using 10d781b... Committed merge 7fb9b7262a1d1e0a47bbfdcbbcf50ce0635d3f8f cache.h | 8 ++++---- diff --git a/Documentation/howto/setup-git-server-over-http.txt b/Documentation/howto/setup-git-server-over-http.txt index 7f4943e102..981cbddc86 100644 --- a/Documentation/howto/setup-git-server-over-http.txt +++ b/Documentation/howto/setup-git-server-over-http.txt @@ -81,8 +81,8 @@ Initialize a bare repository $ git --bare init -Change the ownership to your web-server's credentials. Use "grep ^User -httpd.conf" and "grep ^Group httpd.conf" to find out: +Change the ownership to your web-server's credentials. Use `"grep ^User +httpd.conf"` and `"grep ^Group httpd.conf"` to find out: $ chown -R www.www . diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt index d477b3f6bc..2c06ed34ad 100644 --- a/Documentation/revisions.txt +++ b/Documentation/revisions.txt @@ -58,6 +58,9 @@ the '$GIT_DIR/refs' directory or from the '$GIT_DIR/packed-refs' file. While the ref name encoding is unspecified, UTF-8 is preferred as some output processing may assume ref names in UTF-8. +'@':: + '@' alone is a shortcut for 'HEAD'. + '<refname>@\{<date>\}', e.g. 'master@\{yesterday\}', 'HEAD@\{5 minutes ago\}':: A ref followed by the suffix '@' with a date specification enclosed in a brace @@ -111,16 +114,23 @@ some output processing may assume ref names in UTF-8. '<rev>{caret}\{<type>\}', e.g. 'v0.99.8{caret}\{commit\}':: A suffix '{caret}' followed by an object type name enclosed in - brace pair means the object - could be a tag, and dereference the tag recursively until an - object of that type is found or the object cannot be - dereferenced anymore (in which case, barf). '<rev>{caret}0' + brace pair means dereference the object at '<rev>' recursively until + an object of type '<type>' is found or the object cannot be + dereferenced anymore (in which case, barf). + For example, if '<rev>' is a commit-ish, '<rev>{caret}\{commit\}' + describes the corresponding commit object. + Similarly, if '<rev>' is a tree-ish, '<rev>{caret}\{tree\}' + describes the corresponding tree object. + '<rev>{caret}0' is a short-hand for '<rev>{caret}\{commit\}'. + 'rev{caret}\{object\}' can be used to make sure 'rev' names an object that exists, without requiring 'rev' to be a tag, and without dereferencing 'rev'; because a tag is already an object, it does not have to be dereferenced even once to get to an object. ++ +'rev{caret}\{tag\}' can be used to ensure that 'rev' identifies an +existing tag object. '<rev>{caret}\{\}', e.g. 'v0.99.8{caret}\{\}':: A suffix '{caret}' followed by an empty brace pair diff --git a/Documentation/technical/api-diff.txt b/Documentation/technical/api-diff.txt index 2d2ebc04b7..8b001de0db 100644 --- a/Documentation/technical/api-diff.txt +++ b/Documentation/technical/api-diff.txt @@ -28,7 +28,8 @@ Calling sequence * Call `diff_setup_done()`; this inspects the options set up so far for internal consistency and make necessary tweaking to it (e.g. if - textual patch output was asked, recursive behaviour is turned on). + textual patch output was asked, recursive behaviour is turned on); + the callback set_default in diff_options can be used to tweak this more. * As you find different pairs of files, call `diff_change()` to feed modified files, `diff_addremove()` to feed created or deleted files, @@ -115,6 +116,13 @@ Notable members are: operation, but some do not have anything to do with the diffcore library. +`touched_flags`:: + Records whether a flag has been changed due to user request + (rather than just set/unset by default). + +`set_default`:: + Callback which allows tweaking the options in diff_setup_done(). + BINARY, TEXT;; Affects the way how a file that is seemingly binary is treated. diff --git a/Documentation/technical/http-protocol.txt b/Documentation/technical/http-protocol.txt index a1173ee266..caf941a1c5 100644 --- a/Documentation/technical/http-protocol.txt +++ b/Documentation/technical/http-protocol.txt @@ -499,5 +499,5 @@ References link:http://www.ietf.org/rfc/rfc1738.txt[RFC 1738: Uniform Resource Locators (URL)] link:http://www.ietf.org/rfc/rfc2616.txt[RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1] -link:technical/pack-protocol.txt -link:technical/protocol-capabilities.txt +link:technical/pack-protocol.html +link:technical/protocol-capabilities.html diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index fe723e4722..cbb01a1ea2 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -1,6 +1,5 @@ -Git User's Manual (for version 1.5.3 or newer) -______________________________________________ - +Git User Manual +_______________ Git is a fast distributed revision control system. @@ -220,7 +219,7 @@ of development leading to that point. The best way to see how this works is using the linkgit:gitk[1] command; running gitk now on a Git repository and looking for merge -commits will help understand how the Git organizes history. +commits will help understand how Git organizes history. In the following, we say that commit X is "reachable" from commit Y if commit X is an ancestor of commit Y. Equivalently, you could say @@ -269,27 +268,23 @@ Creating, deleting, and modifying branches is quick and easy; here's a summary of the commands: `git branch`:: - list all branches + list all branches. `git branch <branch>`:: create a new branch named `<branch>`, referencing the same - point in history as the current branch + point in history as the current branch. `git branch <branch> <start-point>`:: create a new branch named `<branch>`, referencing `<start-point>`, which may be specified any way you like, - including using a branch name or a tag name + including using a branch name or a tag name. `git branch -d <branch>`:: - delete the branch `<branch>`; if the branch you are deleting - points to a commit which is not reachable from the current - branch, this command will fail with a warning. + delete the branch `<branch>`; if the branch is not fully + merged in its upstream branch or contained in the current branch, + this command will fail with a warning. `git branch -D <branch>`:: - even if the branch points to a commit not reachable - from the current branch, you may know that that commit - is still reachable from some other branch or tag. In that - case it is safe to use this command to force Git to delete - the branch. + delete the branch `<branch>` irrespective of its merged status. `git checkout <branch>`:: make the current branch `<branch>`, updating the working - directory to reflect the version referenced by `<branch>` + directory to reflect the version referenced by `<branch>`. `git checkout -b <new> <start-point>`:: create a new branch `<new>` referencing `<start-point>`, and check it out. @@ -313,10 +308,17 @@ referenced by a tag: ------------------------------------------------ $ git checkout v2.6.17 -Note: moving to "v2.6.17" which isn't a local branch -If you want to create a new branch from this checkout, you may do so -(now or later) by using -b with the checkout command again. Example: - git checkout -b <new_branch_name> +Note: checking out 'v2.6.17'. + +You are in 'detached HEAD' state. You can look around, make experimental +changes and commit them, and you can discard any commits you make in this +state without impacting any branches by performing another checkout. + +If you want to create a new branch to retain commits you create, you may +do so (now or later) by using -b with the checkout command again. Example: + + git checkout -b new_branch_name + HEAD is now at 427abfa... Linux v2.6.17 ------------------------------------------------ @@ -327,7 +329,7 @@ and git branch shows that you are no longer on a branch: $ cat .git/HEAD 427abfa28afedffadfca9dd8b067eb6d36bac53f $ git branch -* (no branch) +* (detached from v2.6.17) master ------------------------------------------------ @@ -787,7 +789,7 @@ e05db0fd4f31dde7005f075a84f96b360d05984b ------------------------------------------------- Or you could recall that the `...` operator selects all commits -contained reachable from either one reference or the other but not +reachable from either one reference or the other but not both; so ------------------------------------------------- @@ -814,7 +816,7 @@ You could just visually inspect the commits since e05db0fd: $ gitk e05db0fd.. ------------------------------------------------- -Or you can use linkgit:git-name-rev[1], which will give the commit a +or you can use linkgit:git-name-rev[1], which will give the commit a name based on any tag it finds pointing to one of the commit's descendants: @@ -858,8 +860,8 @@ because it outputs only commits that are not reachable from v1.5.0-rc1. As yet another alternative, the linkgit:git-show-branch[1] command lists the commits reachable from its arguments with a display on the left-hand -side that indicates which arguments that commit is reachable from. So, -you can run something like +side that indicates which arguments that commit is reachable from. +So, if you run something like ------------------------------------------------- $ git show-branch e05db0fd v1.5.0-rc0 v1.5.0-rc1 v1.5.0-rc2 @@ -871,15 +873,15 @@ available ... ------------------------------------------------- -then search for a line that looks like +then a line like ------------------------------------------------- + ++ [e05db0fd] Fix warnings in sha1_file.c - use C99 printf format if available ------------------------------------------------- -Which shows that e05db0fd is reachable from itself, from v1.5.0-rc1, and -from v1.5.0-rc2, but not from v1.5.0-rc0. +shows that e05db0fd is reachable from itself, from v1.5.0-rc1, +and from v1.5.0-rc2, and not from v1.5.0-rc0. [[showing-commits-unique-to-a-branch]] Showing commits unique to a given branch @@ -1074,19 +1076,13 @@ produce no output at that point. Modifying the index is easy: -To update the index with the new contents of a modified file, use - -------------------------------------------------- -$ git add path/to/file -------------------------------------------------- - -To add the contents of a new file to the index, use +To update the index with the contents of a new or modified file, use ------------------------------------------------- $ git add path/to/file ------------------------------------------------- -To remove a file from the index and from the working tree, +To remove a file from the index and from the working tree, use ------------------------------------------------- $ git rm path/to/file @@ -1787,7 +1783,7 @@ $ git pull . branch $ git merge branch ------------------------------------------------- -are roughly equivalent. The former is actually very commonly used. +are roughly equivalent. [[submitting-patches]] Submitting patches to a project @@ -1977,7 +1973,7 @@ $ git clone http://yourserver.com/~you/proj.git ------------------------------------------------- (See also -link:howto/setup-git-server-over-http.txt[setup-git-server-over-http] +link:howto/setup-git-server-over-http.html[setup-git-server-over-http] for a slightly more sophisticated setup using WebDAV which also allows pushing over HTTP.) @@ -2249,11 +2245,11 @@ commit to this branch. $ ... patch ... test ... commit [ ... patch ... test ... commit ]* ------------------------------------------------- -When you are happy with the state of this change, you can pull it into the +When you are happy with the state of this change, you can merge it into the "test" branch in preparation to make it public: ------------------------------------------------- -$ git checkout test && git pull . speed-up-spinlocks +$ git checkout test && git merge speed-up-spinlocks ------------------------------------------------- It is unlikely that you would have any conflicts here ... but you might if you @@ -2265,7 +2261,7 @@ see the value of keeping each patch (or patch series) in its own branch. It means that the patches can be moved into the `release` tree in any order. ------------------------------------------------- -$ git checkout release && git pull . speed-up-spinlocks +$ git checkout release && git merge speed-up-spinlocks ------------------------------------------------- After a while, you will have a number of branches, and despite the @@ -3191,23 +3187,21 @@ those "loose" objects. You can save space and make Git faster by moving these loose objects in to a "pack file", which stores a group of objects in an efficient compressed format; the details of how pack files are formatted can be -found in link:technical/pack-format.txt[technical/pack-format.txt]. +found in link:technical/pack-format.html[pack format]. To put the loose objects into a pack, just run git repack: ------------------------------------------------ $ git repack -Generating pack... -Done counting 6020 objects. -Deltifying 6020 objects. - 100% (6020/6020) done -Writing 6020 objects. - 100% (6020/6020) done -Total 6020, written 6020 (delta 4070), reused 0 (delta 0) -Pack pack-3e54ad29d5b2e05838c75df582c65257b8d08e1c created. +Counting objects: 6020, done. +Delta compression using up to 4 threads. +Compressing objects: 100% (6020/6020), done. +Writing objects: 100% (6020/6020), done. +Total 6020 (delta 4070), reused 0 (delta 0) ------------------------------------------------ -You can then run +This creates a single "pack file" in .git/objects/pack/ +containing all currently unpacked objects. You can then run ------------------------------------------------ $ git prune @@ -3305,17 +3299,11 @@ state, you can just prune all unreachable objects: $ git prune ------------------------------------------------ -and they'll be gone. But you should only run `git prune` on a quiescent +and they'll be gone. (You should only run `git prune` on a quiescent repository--it's kind of like doing a filesystem fsck recovery: you don't want to do that while the filesystem is mounted. - -(The same is true of `git fsck` itself, btw, but since -`git fsck` never actually *changes* the repository, it just reports -on what it found, `git fsck` itself is never 'dangerous' to run. -Running it while somebody is actually changing the repository can cause -confusing and scary messages, but it won't actually do anything bad. In -contrast, running `git prune` while somebody is actively changing the -repository is a *BAD* idea). +`git prune` is designed not to cause any harm in such cases of concurrent +accesses to a repository but you might receive confusing or scary messages.) [[recovering-from-repository-corruption]] Recovering from repository corruption @@ -3538,7 +3526,7 @@ 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 +To see how submodule support works, create four example repositories that can be used later as a submodule: ------------------------------------------------- @@ -3640,7 +3628,7 @@ working on a branch. ------------------------------------------------- $ git branch -* (no branch) +* (detached from d266b98) master ------------------------------------------------- @@ -3910,7 +3898,7 @@ fact that such a commit brings together ("merges") two or more previous states represented by other commits. In other words, while a "tree" represents a particular directory state -of a working directory, a "commit" represents that state in "time", +of a working directory, a "commit" represents that state in time, and explains how we got there. You create a commit object by giving it the tree that describes the @@ -3930,8 +3918,7 @@ save the note about that state, in practice we tend to just write the result to the file pointed at by `.git/HEAD`, so that we can always see what the last committed state was. -Here is an ASCII art by Jon Loeliger that illustrates how -various pieces fit together. +Here is a picture that illustrates how various pieces fit together: ------------ @@ -4010,27 +3997,26 @@ to see what the top commit was. Merging multiple trees ---------------------- -Git helps you do a three-way merge, which you can expand to n-way by -repeating the merge procedure arbitrary times until you finally -"commit" the state. The normal situation is that you'd only do one -three-way merge (two parents), and commit it, but if you like to, you -can do multiple parents in one go. +Git can help you perform a three-way merge, which can in turn be +used for a many-way merge by repeating the merge procedure several +times. The usual situation is that you only do one three-way merge +(reconciling two lines of history) and commit the result, but if +you like to, you can merge several branches in one go. -To do a three-way merge, you need the two sets of "commit" objects -that you want to merge, use those to find the closest common parent (a -third "commit" object), and then use those commit objects to find the -state of the directory ("tree" object) at these points. +To perform a three-way merge, you start with the two commits you +want to merge, find their closest common parent (a third commit), +and compare the trees corresponding to these three commits. -To get the "base" for the merge, you first look up the common parent -of two commits with +To get the "base" for the merge, look up the common parent of two +commits: ------------------------------------------------- $ git merge-base <commit1> <commit2> ------------------------------------------------- -which will return you the commit they are both based on. You should -now look up the "tree" objects of those commits, which you can easily -do with (for example) +This prints the name of a commit they are both based on. You should +now look up the tree objects of those commits, which you can easily +do with ------------------------------------------------- $ git cat-file commit <commitname> | head -1 @@ -4152,8 +4138,6 @@ about the data in the object. It's worth noting that the SHA-1 hash that is used to name the object is the hash of the original data plus this header, so `sha1sum` 'file' does not match the object name for 'file'. -(Historical note: in the dawn of the age of Git the hash -was the SHA-1 of the 'compressed' object.) As a result, the general consistency of an object can always be tested independently of the contents or the type of the object: all objects can |