summaryrefslogtreecommitdiff
path: root/Documentation/git.txt
Commit message (Collapse)AuthorAgeFilesLines
* git.txt: fix asciidoc syntax of --*-pathspecsSteffen Prohaska2013-10-151-3/+3
| | | | | | | | | | | | | Labeled lists require a double colon. [jc] I eyeballed the output from git grep '[^:]:$' Documentation/\*.txt and the patch fixes all breakages of this kind. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Sync with Git 1.8.4.1Jonathan Nieder2013-09-261-1/+2
|\
| * Git 1.8.4.1v1.8.4.1Jonathan Nieder2013-09-261-1/+2
| | | | | | | | Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
* | Merge branch 'nr/git-cd-to-a-directory'Junio C Hamano2013-09-201-1/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Just like "make -C <directory>", make "git -C <directory> ..." to go there before doing anything else. * nr/git-cd-to-a-directory: t0056: "git -C" test updates git: run in a directory given with -C option
| * | git: run in a directory given with -C optionNazri Ramliy2013-09-091-1/+15
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is similar in spirit to "make -C dir ..." and "tar -C dir ...". It takes more keypresses to invoke git command in a different directory without leaving the current directory: 1. (cd ~/foo && git status) git --git-dir=~/foo/.git --work-dir=~/foo status GIT_DIR=~/foo/.git GIT_WORK_TREE=~/foo git status 2. (cd ../..; git grep foo) 3. for d in d1 d2 d3; do (cd $d && git svn rebase); done The methods shown above are acceptable for scripting but are too cumbersome for quick command line invocations. With this new option, the above can be done with fewer keystrokes: 1. git -C ~/foo status 2. git -C ../.. grep foo 3. for d in d1 d2 d3; do git -C $d svn rebase; done A new test script is added to verify the behavior of this option with other path-related options like --git-dir and --work-tree. Signed-off-by: Nazri Ramliy <ayiehere@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'jl/submodule-mv'Junio C Hamano2013-09-091-2/+29
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git mv A B" when moving a submodule A does "the right thing", inclusing relocating its working tree and adjusting the paths in the .gitmodules file. * jl/submodule-mv: (53 commits) rm: delete .gitmodules entry of submodules removed from the work tree mv: update the path entry in .gitmodules for moved submodules submodule.c: add .gitmodules staging helper functions mv: move submodules using a gitfile mv: move submodules together with their work trees rm: do not set a variable twice without intermediate reading. t6131 - skip tests if on case-insensitive file system parse_pathspec: accept :(icase)path syntax pathspec: support :(glob) syntax pathspec: make --literal-pathspecs disable pathspec magic pathspec: support :(literal) syntax for noglob pathspec kill limit_pathspec_to_literal() as it's only used by parse_pathspec() parse_pathspec: preserve prefix length via PATHSPEC_PREFIX_ORIGIN parse_pathspec: make sure the prefix part is wildcard-free rename field "raw" to "_raw" in struct pathspec tree-diff: remove the use of pathspec's raw[] in follow-rename codepath remove match_pathspec() in favor of match_pathspec_depth() remove init_pathspec() in favor of parse_pathspec() remove diff_tree_{setup,release}_paths convert common_prefix() to use struct pathspec ...
| * | parse_pathspec: accept :(icase)path syntaxNguyễn Thái Ngọc Duy2013-07-151-0/+8
| | | | | | | | | | | | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | pathspec: support :(glob) syntaxNguyễn Thái Ngọc Duy2013-07-151-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | :(glob)path differs from plain pathspec that it uses wildmatch with WM_PATHNAME while the other uses fnmatch without FNM_PATHNAME. The difference lies in how '*' (and '**') is processed. With the introduction of :(glob) and :(literal) and their global options --[no]glob-pathspecs, the user can: - make everything literal by default via --noglob-pathspecs --literal-pathspecs cannot be used for this purpose as it disables _all_ pathspec magic. - individually turn on globbing with :(glob) - make everything globbing by default via --glob-pathspecs - individually turn off globbing with :(literal) The implication behind this is, there is no way to gain the default matching behavior (i.e. fnmatch without FNM_PATHNAME). You either get new globbing or literal. The old fnmatch behavior is considered deprecated and discouraged to use. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | pathspec: make --literal-pathspecs disable pathspec magicNguyễn Thái Ngọc Duy2013-07-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --literal-pathspecs and its equivalent environment variable are probably used for scripting. In that setting, pathspec magic may be unwanted. Disabling globbing in individual pathspec can be done via :(literal) magic. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'mm/war-on-whatchanged'Junio C Hamano2013-08-301-1/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | * mm/war-on-whatchanged: whatchanged: document its historical nature core-tutorial: trim the section on Inspecting Changes
| * | core-tutorial: trim the section on Inspecting ChangesJunio C Hamano2013-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back when the core tutorial was written, `log` and `whatchanged` were scripted Porcelains. In the "Inspecting Changes" section that talks about the plumbing commands in the diff family, it made sense to use `log` and `whatchanged` as good examples of the use of these plumbing commands, and because even these scripted Porcelains were novelty (there wasn't the new end-user tutorial written), it made some sense to illustrate uses of the `git log` (and `git whatchanged`) scripted Porcelain commands. But we no longer have scripted `log` and `whatchanged` to serve as examples, and this document is not where the end users learn what `git log` command is about. Stop at briefly mentioning the possibility of combining rev-list with diff-tree to build your own log, and leave the end-user documentation of `log` to the new tutorial and the user manual. Also resurrect the last version of `git-log`, `git-whatchanged`, and `git-show` to serve as examples to contrib/examples/ directory. While at it, remove 'whatchanged' from a list of sample commands that are affected by GIT_FLUSH environment variable. This is not meant to be an exhaustive list but as a list of typical ones, and an old command that is kept primarily for backward compatibility does not belong to it. Helped-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Git 1.8.4v1.8.4Junio C Hamano2013-08-231-0/+5
|/ / | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Sync with Git 1.8.3.4Junio C Hamano2013-07-221-1/+2
|\ \
| * | Git 1.8.3.4v1.8.3.4Junio C Hamano2013-07-221-1/+2
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Sync with 1.8.3.3Junio C Hamano2013-07-151-1/+2
|\ \ \ | |/ / | | / | |/ |/| Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Git 1.8.3.3v1.8.3.3Junio C Hamano2013-07-151-1/+2
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Merge branch 'cr/git-work-tree-sans-git-dir' into maintJunio C Hamano2013-07-031-3/+1
| |\ | | | | | | | | | | | | * cr/git-work-tree-sans-git-dir: git.txt: remove stale comment regarding GIT_WORK_TREE
* | \ Sync with 1.8.3.2Junio C Hamano2013-06-281-1/+2
|\ \ \ | |/ /
| * | Git 1.8.3.2v1.8.3.2Junio C Hamano2013-06-281-1/+2
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'nd/traces'Junio C Hamano2013-06-201-0/+13
|\ \ \ | | | | | | | | | | | | | | | | | | | | * nd/traces: git.txt: document GIT_TRACE_PACKET core: use env variable instead of config var to turn on logging pack access
| * | | git.txt: document GIT_TRACE_PACKETNguyễn Thái Ngọc Duy2013-06-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "This can help with debugging object negotiation or other protocol issues." Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | core: use env variable instead of config var to turn on logging pack accessNguyễn Thái Ngọc Duy2013-06-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5f44324 (core: log offset pack data accesses happened - 2011-07-06) provides a way to observe pack access patterns via a config switch. Setting an environment variable looks more obvious than a config var, especially when you just need to _observe_, and more inline with other tracing knobs we have. Document it as it may be useful for remote troubleshooting. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'cr/git-work-tree-sans-git-dir'Junio C Hamano2013-06-111-3/+1
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | These days, "git --work-tree=there cmd" without specifying an explicit --git-dir=here will do the usual discovery, but we had a description of older behaviour in the documentation. * cr/git-work-tree-sans-git-dir: git.txt: remove stale comment regarding GIT_WORK_TREE
| * | | git.txt: remove stale comment regarding GIT_WORK_TREEChris Rorvick2013-06-031-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Official support for specifying --work-tree/GIT_WORK_TREE without --git-dir/GIT_DIR was added with v1.7.4-rc3~2^2~2. Update description of GIT_WORK_TREE to reflect this. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Sync with 1.8.3.1Junio C Hamano2013-06-101-1/+2
|\ \ \ \ | | |_|/ | |/| | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Git 1.8.3.1v1.8.3.1Junio C Hamano2013-06-101-0/+6
| | |/ | |/| | | | | | | | | | | | | | | | | | | Primarily to push out two regression issues that seem to affect many people, namely, the ".gitignore !directory" bug and "daemon cannot read from $HOME owned by root" bug. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Start 1.8.4 cycleJunio C Hamano2013-05-291-3/+8
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'as/check-ignore'Junio C Hamano2013-05-291-2/+3
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enhance "check-ignore" (1.8.2 update) to work more like "check-attr" over bidi-pipes. * as/check-ignore: t0008: use named pipe (FIFO) to test check-ignore streaming Documentation: add caveats about I/O buffering for check-{attr,ignore} check-ignore: allow incremental streaming of queries via --stdin check-ignore: move setup into cmd_check_ignore() check-ignore: add -n / --non-matching option t0008: remove duplicated test fixture data
| * | Documentation: add caveats about I/O buffering for check-{attr,ignore}Adam Spiers2013-04-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | check-attr and check-ignore have the potential to deadlock callers which do not read back the output in real-time. For example, if a caller writes N paths out and then reads N lines back in, it risks becoming blocked on write() to check-*, and check-* is blocked on write back to the caller. Somebody has to buffer; the pipe buffers provide some leeway, but they are limited. Thanks to Peff for pointing this out: http://article.gmane.org/gmane.comp.version-control.git/220534 Signed-off-by: Adam Spiers <git@adamspiers.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Git 1.8.2.3v1.8.2.3Junio C Hamano2013-05-091-1/+2
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Git 1.8.2.2v1.8.2.2Junio C Hamano2013-04-261-1/+2
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | The name of the hash function is "SHA-1", not "SHA1"Thomas Ackermann2013-04-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Use "SHA-1" instead of "SHA1" whenever we talk about the hash function. When used as a programming symbol, we keep "SHA1". Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Git 1.8.2.1v1.8.2.1Junio C Hamano2013-04-071-1/+2
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Sync with 1.8.1.6Junio C Hamano2013-04-071-1/+2
|\ \ \
| * | | Git 1.8.1.6v1.8.1.6Junio C Hamano2013-04-071-1/+2
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'maint-1.8.1' into maintJunio C Hamano2013-03-261-3/+6
|\ \ \ \ | |/ / / | | | | | | | | | | | | * maint-1.8.1: Correct the docs about GIT_SSH.
| * | | Correct the docs about GIT_SSH.Dan Bornstein2013-03-261-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, it can get called with four arguments if you happen to be referring to a repo using the ssh:// scheme with a non-default port number. Signed-off-by: Dan Bornstein <danfuzz@milk.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Merge branch 'mh/maint-ceil-absolute' into maintJunio C Hamano2013-03-071-6/+13
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * mh/maint-ceil-absolute: Provide a mechanism to turn off symlink resolution in ceiling paths
* | | | | Git 1.8.2v1.8.2Junio C Hamano2013-03-131-0/+5
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Sync with 1.8.1.5Junio C Hamano2013-03-011-1/+2
|\ \ \ \ \ | |/ / / /
| * | | | Git 1.8.1.5v1.8.1.5Junio C Hamano2013-03-011-1/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Merge branch 'mm/config-intro-in-git-doc' into maintJunio C Hamano2013-02-251-6/+5
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * mm/config-intro-in-git-doc: git.txt: update description of the configuration mechanism
* | \ \ \ \ Merge branch 'mh/maint-ceil-absolute'Junio C Hamano2013-02-271-6/+13
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An earlier workaround designed to help people who list logical directories that will not match what getcwd(3) returns in the GIT_CEILING_DIRECTORIES had an adverse effect when it is slow to stat and readlink a directory component of an element listed on it. * mh/maint-ceil-absolute: Provide a mechanism to turn off symlink resolution in ceiling paths
| * | | | | Provide a mechanism to turn off symlink resolution in ceiling pathsMichael Haggerty2013-02-221-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1b77d83cab 'setup_git_directory_gently_1(): resolve symlinks in ceiling paths' changed the setup code to resolve symlinks in the entries in GIT_CEILING_DIRECTORIES. Because those entries are compared textually to the symlink-resolved current directory, an entry in GIT_CEILING_DIRECTORIES that contained a symlink would have no effect. It was known that this could cause performance problems if the symlink resolution *itself* touched slow filesystems, but it was thought that such use cases would be unlikely. The intention of the earlier change was to deal with a case when the user has this: GIT_CEILING_DIRECTORIES=/home/gitster but in reality, /home/gitster is a symbolic link to somewhere else, e.g. /net/machine/home4/gitster. A textual comparison between the specified value /home/gitster and the location getcwd(3) returns would not help us, but readlink("/home/gitster") would still be fast. After this change was released, Anders Kaseorg <andersk@mit.edu> reported: > [...] my computer has been acting so slow when I’m not connected to > the network. I put various network filesystem paths in > $GIT_CEILING_DIRECTORIES, such as > /afs/athena.mit.edu/user/a/n/andersk (to avoid hitting its parents > /afs/athena.mit.edu, /afs/athena.mit.edu/user/a, and > /afs/athena.mit.edu/user/a/n which all live in different AFS > volumes). Now when I’m not connected to the network, every > invocation of Git, including the __git_ps1 in my shell prompt, waits > for AFS to timeout. To allow users to work around this problem, give them a mechanism to turn off symlink resolution in GIT_CEILING_DIRECTORIES entries. All the entries that follow an empty entry will not be checked for symbolic links and used literally in comparison. E.g. with these: GIT_CEILING_DIRECTORIES=:/foo/bar:/xyzzy or GIT_CEILING_DIRECTORIES=/foo/bar::/xyzzy we will not readlink("/xyzzy") because it comes after an empty entry. With the former (but not with the latter), "/foo/bar" comes after an empty entry, and we will not readlink it, either. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Sync with v1.8.1.4Junio C Hamano2013-02-191-1/+2
|\ \ \ \ \ \ | | |/ / / / | |/| | | |
| * | | | | Git 1.8.1.4v1.8.1.4Junio C Hamano2013-02-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'mm/config-intro-in-git-doc'Junio C Hamano2013-02-181-6/+5
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | | | | | | | * mm/config-intro-in-git-doc: git.txt: update description of the configuration mechanism
| * | | | | git.txt: update description of the configuration mechanismMatthieu Moy2013-02-151-6/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old Git version where it appeared is now useful only to historians, not to normal users. Also, the text was mentioning only the per-repo config file, but this is a good place to teach that customization can also be made per-user. While at it, remove a now-defunct e-mail from an example. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Sync with 1.8.1.3Junio C Hamano2013-02-071-1/+3
|\ \ \ \ \ | |/ / / /
| * | | | Git 1.8.1.3v1.8.1.3Junio C Hamano2013-02-071-1/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>