aboutsummaryrefslogtreecommitdiff
path: root/Documentation/git.txt
AgeCommit message (Collapse)Author
2013-06-20Merge branch 'nd/traces'Junio C Hamano
* nd/traces: git.txt: document GIT_TRACE_PACKET core: use env variable instead of config var to turn on logging pack access
2013-06-19setup_reflog_action: document the rules for using GIT_REFLOG_ACTIONJunio C Hamano
The set_reflog_action helper (in git-sh-setup) is designed to be used once at the very top of a program, like this in "git am", for example: set_reflog_action am The helper function sets the given string to GIT_REFLOG_ACTION only when GIT_REFLOG_ACTION is not yet set. Thanks to this, "git am", when run as the top-level program, will use "am" in GIT_REFLOG_ACTION and the reflog entries made by whatever it does will record the updates of refs done by "am". Because of the conditional assignment, when "git am" is run as a subprogram (i.e. an implementation detail) of "git rebase" that already sets GIT_REFLOG_ACTION to its own name, the call in "git am" to the helper function at the beginning will *not* have any effect. So "git rebase" can do this: set_reflog_action rebase ... do its own preparation, like checking out "onto" commit ... decide to do "format-patch" to "am" pipeline git format-patch --stdout >mbox git am mbox and the reflog entries made inside "git am" invocation will say "rebase", not "am". Calls to "git" commands that update refs would use GIT_REFLOG_ACTION to record who did that update. Most such calls in scripted Porcelains do not define custom reflog message and rely on GIT_REFLOG_ACTION to contain its (or its caller's, when it is called as a subprogram) name. If a scripted Porcelain wants to record a custom reflog message for a single invocation of "git" command (e.g. when "git rebase" uses "git checkout" to detach HEAD at the commit a series is to be replayed on), it needs to set GIT_REFLOG_ACTION to the custom message and export it while calling the "git" command, but such an assignment must be restricted to that single "git" invocation and should not be left behind to affect later codepath. Document the rules to avoid future confusion. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-11Merge branch 'cr/git-work-tree-sans-git-dir'Junio C Hamano
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
2013-06-10Sync with 1.8.3.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-10Git 1.8.3.1v1.8.3.1Junio C Hamano
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>
2013-06-09git.txt: document GIT_TRACE_PACKETNguyễn Thái Ngọc Duy
"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>
2013-06-09core: use env variable instead of config var to turn on logging pack accessNguyễn Thái Ngọc Duy
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>
2013-06-03git.txt: remove stale comment regarding GIT_WORK_TREEChris Rorvick
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>
2013-05-29Start 1.8.4 cycleJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-29Merge branch 'as/check-ignore'Junio C Hamano
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
2013-05-09Git 1.8.2.3v1.8.2.3Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-26Git 1.8.2.2v1.8.2.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-15The name of the hash function is "SHA-1", not "SHA1"Thomas Ackermann
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>
2013-04-11Documentation: add caveats about I/O buffering for check-{attr,ignore}Adam Spiers
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>
2013-04-07Git 1.8.2.1v1.8.2.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07Sync with 1.8.1.6Junio C Hamano
2013-04-07Git 1.8.1.6v1.8.1.6Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-26Merge branch 'maint-1.8.1' into maintJunio C Hamano
* maint-1.8.1: Correct the docs about GIT_SSH.
2013-03-26Correct the docs about GIT_SSH.Dan Bornstein
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>
2013-03-13Git 1.8.2v1.8.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-07Merge branch 'mh/maint-ceil-absolute' into maintJunio C Hamano
* mh/maint-ceil-absolute: Provide a mechanism to turn off symlink resolution in ceiling paths
2013-03-01Sync with 1.8.1.5Junio C Hamano
2013-03-01Git 1.8.1.5v1.8.1.5Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-27Merge branch 'mh/maint-ceil-absolute'Junio C Hamano
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
2013-02-25Merge branch 'mm/config-intro-in-git-doc' into maintJunio C Hamano
* mm/config-intro-in-git-doc: git.txt: update description of the configuration mechanism
2013-02-22Provide a mechanism to turn off symlink resolution in ceiling pathsMichael Haggerty
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>
2013-02-19Sync with v1.8.1.4Junio C Hamano
2013-02-19Git 1.8.1.4v1.8.1.4Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-18Merge branch 'mm/config-intro-in-git-doc'Junio C Hamano
* mm/config-intro-in-git-doc: git.txt: update description of the configuration mechanism
2013-02-15git.txt: update description of the configuration mechanismMatthieu Moy
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>
2013-02-07Sync with 1.8.1.3Junio C Hamano
2013-02-07Git 1.8.1.3v1.8.1.3Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01Documentation: the name of the system is 'Git', not 'git'Thomas Ackermann
Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01Documentation: avoid poor-man's small caps GITThomas Ackermann
In the earlier days, we used to spell the name of the system as GIT, to simulate as if it were typeset with capital G and IT in small caps. Later we stopped doing so at around 1.6.5 days. Let's stop doing so throughout the documentation. The name to refer to the whole system (and the concept it embodies) is "Git"; the command end-users type is "git". And document this in the coding guideline. Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-14Sync with 1.8.1.1Junio C Hamano
2013-01-14Git 1.8.1.1v1.8.1.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-11Merge branch 'jn/warn-on-inaccessible-loosen' into maintJunio C Hamano
When attempting to read the XDG-style $HOME/.config/git/config and finding that $HOME/.config/git is a file, we gave a wrong error message, instead of treating the case as "a custom config file does not exist there" and moving on. * jn/warn-on-inaccessible-loosen: config: exit on error accessing any config file doc: advertise GIT_CONFIG_NOSYSTEM config: treat user and xdg config permission problems as errors config, gitignore: failure to access with ENOTDIR is ok
2013-01-06Merge branch 'jn/warn-on-inaccessible-loosen'Junio C Hamano
Deal with a situation where .config/git is a file and we notice .config/git/config is not readable due to ENOTDIR, not ENOENT. * jn/warn-on-inaccessible-loosen: config: exit on error accessing any config file doc: advertise GIT_CONFIG_NOSYSTEM config: treat user and xdg config permission problems as errors config, gitignore: failure to access with ENOTDIR is ok
2013-01-05Merge branch 'jk/pathspec-literal'Junio C Hamano
Allow scripts to feed literal paths to commands that take pathspecs, by disabling wildcard globbing. * jk/pathspec-literal: add global --literal-pathspecs option Conflicts: dir.c
2012-12-31Git 1.8.1v1.8.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-27Git 1.8.0.3v1.8.0.3Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-27git(1): show link to contributor summary pageJunio C Hamano
We earlier removed a link to list of contributors that pointed to a defunct page; let's use a working one from Ohloh.net to replace it instead. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19add global --literal-pathspecs optionJeff King
Git takes pathspec arguments in many places to limit the scope of an operation. These pathspecs are treated not as literal paths, but as glob patterns that can be fed to fnmatch. When a user is giving a specific pattern, this is a nice feature. However, when programatically providing pathspecs, it can be a nuisance. For example, to find the latest revision which modified "$foo", one can use "git rev-list -- $foo". But if "$foo" contains glob characters (e.g., "f*"), it will erroneously match more entries than desired. The caller needs to quote the characters in $foo, and even then, the results may not be exactly the same as with a literal pathspec. For instance, the depth checks in match_pathspec_depth do not kick in if we match via fnmatch. This patch introduces a global command-line option (i.e., one for "git" itself, not for specific commands) to turn this behavior off. It also has a matching environment variable, which can make it easier if you are a script or porcelain interface that is going to issue many such commands. This option cannot turn off globbing for particular pathspecs. That could eventually be done with a ":(noglob)" magic pathspec prefix. However, that level of granularity is more cumbersome to use for many cases, and doing ":(noglob)" right would mean converting the whole codebase to use "struct pathspec", as the usual "const char **pathspec" cannot represent extra per-item flags. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-13Merge branch 'maint'Junio C Hamano
2012-12-13git.txt: add missing info about --git-dir command-line optionManlio Perillo
Unlike other environment variables (e.g. GIT_WORK_TREE, GIT_NAMESPACE), the Documentation/git.txt file did not mention that the GIT_DIR environment variable can also be set using the --git-dir command line option. Signed-off-by: Manlio Perillo <manlio.perillo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-12git(1): show link to contributor summary pageJunio C Hamano
We earlier removed a link to list of contributors that pointed to a defunct page; let's use a working one from Ohloh.net to replace it instead. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-10Git 1.8.0.2v1.8.0.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-09git(1): remove a defunct link to "list of authors"Junio C Hamano
The linked page has not been showing the promised "more complete list" for more than 6 months by now, and nobody has resurrected the list there nor elsewhere since then. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-25Git 1.8.0.1v1.8.0.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-21Git 1.8.0v1.8.0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>