diff options
author | Junio C Hamano <junkio@cox.net> | 2006-06-07 17:27:09 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-06-07 17:27:09 -0700 |
commit | ab1b3af7925682e0375667b892e2f7e985effba5 (patch) | |
tree | 3f2cdfe4fc3f15e385cf9ba00f06dc6bddf80943 | |
parent | Merge branch 'master' into next (diff) | |
parent | Documentation: git aliases (diff) | |
download | tgif-ab1b3af7925682e0375667b892e2f7e985effba5.tar.xz |
Merge branch 'master' into next
* master:
Documentation: git aliases
git-cvsserver asciidoc formatting tweaks
config.txt grammar, typo, and asciidoc fixes
Documentation: git-ls-tree (typofix)
Document git-ls-tree --fullname
Document git aliases support
make clean: remove dist-doc targets.
Misc doc improvements
Documentation: add missing docs make check-docs found.
Some doc typo fixes
Off-by-one error in get_path_prefix(), found by Valgrind
gitk: Re-read the descendent/ancestor tag & head info on update
-rw-r--r-- | Documentation/config.txt | 33 | ||||
-rw-r--r-- | Documentation/cvs-migration.txt | 2 | ||||
-rw-r--r-- | Documentation/everyday.txt | 2 | ||||
-rw-r--r-- | Documentation/git-apply.txt | 2 | ||||
-rw-r--r-- | Documentation/git-check-ref-format.txt | 5 | ||||
-rw-r--r-- | Documentation/git-cvsserver.txt | 49 | ||||
-rw-r--r-- | Documentation/git-describe.txt | 2 | ||||
-rw-r--r-- | Documentation/git-ls-tree.txt | 11 | ||||
-rw-r--r-- | Documentation/git-name-rev.txt | 2 | ||||
-rw-r--r-- | Documentation/git-p4import.txt | 2 | ||||
-rw-r--r-- | Documentation/git-read-tree.txt | 2 | ||||
-rw-r--r-- | Documentation/git-shortlog.txt | 19 | ||||
-rw-r--r-- | Documentation/git-tar-tree.txt | 31 | ||||
-rw-r--r-- | Documentation/git-upload-tar.txt | 39 | ||||
-rw-r--r-- | Documentation/git.txt | 10 | ||||
-rw-r--r-- | Documentation/glossary.txt | 7 | ||||
-rw-r--r-- | Documentation/hooks.txt | 2 | ||||
-rw-r--r-- | Documentation/tutorial.txt | 2 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | builtin-tar-tree.c | 3 | ||||
-rwxr-xr-x | gitk | 18 |
21 files changed, 193 insertions, 52 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index c861c6ce17..a04c5adf8e 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -2,15 +2,15 @@ CONFIGURATION FILE ------------------ The git configuration file contains a number of variables that affect -the git commands behavior. They can be used by both the git plumbing -and the porcelains. The variables are divided to sections, where +the git command's behavior. They can be used by both the git plumbing +and the porcelains. The variables are divided into sections, where in the fully qualified variable name the variable itself is the last dot-separated segment and the section name is everything before the last dot. The variable names are case-insensitive and only alphanumeric characters are allowed. Some variables may appear multiple times. The syntax is fairly flexible and permissive; whitespaces are mostly -ignored. The '#' and ';' characters begin commends to the end of line, +ignored. The '#' and ';' characters begin comments to the end of line, blank lines are ignored, lines containing strings enclosed in square brackets start sections and all the other lines are recognized as setting variables, in the form 'name = value'. If there is no equal @@ -35,8 +35,8 @@ Variables ~~~~~~~~~ Note that this list is non-comprehensive and not necessarily complete. -For command-specific variables, you will find more detailed description -in the appropriate manual page. You will find description of non-core +For command-specific variables, you will find a more detailed description +in the appropriate manual page. You will find a description of non-core porcelain configuration variables in the respective porcelain documentation. core.fileMode:: @@ -52,10 +52,10 @@ core.gitProxy:: on hostnames ending with the specified domain string. This variable may be set multiple times and is matched in the given order; the first match wins. - - Can be overridden by the 'GIT_PROXY_COMMAND' environment variable - (which always applies universally, without the special "for" - handling). ++ +Can be overridden by the 'GIT_PROXY_COMMAND' environment variable +(which always applies universally, without the special "for" +handling). core.ignoreStat:: The working copy files are assumed to stay unchanged until you @@ -91,6 +91,15 @@ core.warnAmbiguousRefs:: If true, git will warn you if the ref name you passed it is ambiguous and might match multiple refs in the .git/refs/ tree. True by default. +alias.*:: + Command aliases for the gitlink:git[1] command wrapper - e.g. + after defining "alias.last = cat-file commit HEAD", the invocation + "git last" is equivalent to "git cat-file commit HEAD". To avoid + confusion and troubles with script usage, aliases that + hide existing git commands are ignored. Arguments are split by + spaces, the usual shell quoting and escaping is supported. + quote pair and a backslash can be used to quote them. + apply.whitespace:: Tells `git-apply` how to handle whitespaces, in the same way as the '--whitespace' option. See gitlink:git-apply[1]. @@ -113,12 +122,12 @@ gitcvs.logfile:: http.sslVerify:: Whether to verify the SSL certificate when fetching or pushing - over HTTPS. Can be overriden by the 'GIT_SSL_NO_VERIFY' environment + over HTTPS. Can be overridden by the 'GIT_SSL_NO_VERIFY' environment variable. http.sslCert:: File containing the SSL certificate when fetching or pushing - over HTTPS. Can be overriden by the 'GIT_SSL_CERT' environment + over HTTPS. Can be overridden by the 'GIT_SSL_CERT' environment variable. http.sslKey:: @@ -133,7 +142,7 @@ http.sslCAInfo:: http.sslCAPath:: Path containing files with the CA certificates to verify the peer - with when fetching or pushing over HTTPS. Can be overriden + with when fetching or pushing over HTTPS. Can be overridden by the 'GIT_SSL_CAPATH' environment variable. http.maxRequests:: diff --git a/Documentation/cvs-migration.txt b/Documentation/cvs-migration.txt index 826d0897e2..1fbca83141 100644 --- a/Documentation/cvs-migration.txt +++ b/Documentation/cvs-migration.txt @@ -106,7 +106,7 @@ Make sure committers have a umask of at most 027, so that the directories they create are writable and searchable by other group members. Suppose this repository is now set up in /pub/repo.git on the host -foo.com. Then as an individual commiter you can clone the shared +foo.com. Then as an individual committer you can clone the shared repository: ------------------------------------------------ diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt index 6745ab5fc5..b935c18088 100644 --- a/Documentation/everyday.txt +++ b/Documentation/everyday.txt @@ -45,7 +45,7 @@ Everybody uses these commands to feed and care git repositories. * gitlink:git-fsck-objects[1] to validate the repository. - * gitlink:git-prune[1] to garbage collect crufts in the + * gitlink:git-prune[1] to garbage collect cruft in the repository. * gitlink:git-repack[1] to pack loose objects for efficiency. diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index 9cc7c74dea..2ff74949a7 100644 --- a/Documentation/git-apply.txt +++ b/Documentation/git-apply.txt @@ -76,7 +76,7 @@ OPTIONS -C<n>:: Ensure at least <n> lines of surrounding context match before and after each change. When fewer lines of surrounding - context exist they all most match. By default no context is + context exist they all must match. By default no context is ever ignored. --apply:: diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt index 3ea720dd00..13a5f43049 100644 --- a/Documentation/git-check-ref-format.txt +++ b/Documentation/git-check-ref-format.txt @@ -19,8 +19,9 @@ branch head is stored under `$GIT_DIR/refs/heads` directory, and a tag is stored under `$GIT_DIR/refs/tags` directory. git imposes the following rules on how refs are named: -. It could be named hierarchically (i.e. separated with slash - `/`), but each of its component cannot begin with a dot `.`; +. It can include slash `/` for hierarchical (directory) + grouping, but no slash-separated component can begin with a + dot `.`; . It cannot have two consecutive dots `..` anywhere; diff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt index 952635d809..e328db3797 100644 --- a/Documentation/git-cvsserver.txt +++ b/Documentation/git-cvsserver.txt @@ -36,49 +36,62 @@ INSTALLATION 1. If you are going to offer anonymous CVS access via pserver, add a line in /etc/inetd.conf like - ++ +-- +------ cvspserver stream tcp nowait nobody git-cvsserver pserver - Note: In some cases, you need to pass the 'pserver' argument twice for - git-cvsserver to see it. So the line would look like +------ +Note: In some cases, you need to pass the 'pserver' argument twice for +git-cvsserver to see it. So the line would look like +------ cvspserver stream tcp nowait nobody git-cvsserver pserver pserver - No special setup is needed for SSH access, other than having GIT tools - in the PATH. If you have clients that do not accept the CVS_SERVER - env variable, you can rename git-cvsserver to cvs. - +------ +No special setup is needed for SSH access, other than having GIT tools +in the PATH. If you have clients that do not accept the CVS_SERVER +env variable, you can rename git-cvsserver to cvs. +-- 2. For each repo that you want accessible from CVS you need to edit config in the repo and add the following section. - ++ +-- +------ [gitcvs] enabled=1 # optional for debugging logfile=/path/to/logfile - Note: you need to ensure each user that is going to invoke git-cvsserver has - write access to the log file and to the git repository. When offering anon - access via pserver, this means that the nobody user should have write access - to at least the sqlite database at the root of the repository. - +------ +Note: you need to ensure each user that is going to invoke git-cvsserver has +write access to the log file and to the git repository. When offering anon +access via pserver, this means that the nobody user should have write access +to at least the sqlite database at the root of the repository. +-- 3. On the client machine you need to set the following variables. CVSROOT should be set as per normal, but the directory should point at the appropriate git repo. For example: ++ +-- +For SSH access, CVS_SERVER should be set to git-cvsserver - For SSH access, CVS_SERVER should be set to git-cvsserver - - Example: +Example: +------ export CVSROOT=:ext:user@server:/var/git/project.git export CVS_SERVER=git-cvsserver - +------ +-- 4. For SSH clients that will make commits, make sure their .bashrc file sets the GIT_AUTHOR and GIT_COMMITTER variables. 5. Clients should now be able to check out the project. Use the CVS 'module' name to indicate what GIT 'head' you want to check out. Example: - ++ +------ cvs co -d project-master master +------ Eclipse CVS Client Notes ------------------------ diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt index 7a253eaf28..2700f35bdb 100644 --- a/Documentation/git-describe.txt +++ b/Documentation/git-describe.txt @@ -21,7 +21,7 @@ object name of the commit. OPTIONS ------- <committish>:: - The object name of the comittish. + The object name of the committish. --all:: Instead of using only the annotated tags, use any ref diff --git a/Documentation/git-ls-tree.txt b/Documentation/git-ls-tree.txt index 018c401953..f283bacb65 100644 --- a/Documentation/git-ls-tree.txt +++ b/Documentation/git-ls-tree.txt @@ -8,9 +8,10 @@ git-ls-tree - Lists the contents of a tree object SYNOPSIS -------- +[verse] 'git-ls-tree' [-d] [-r] [-t] [-z] - [--name-only] [--name-status] [--full-name] [--abbrev=[<n>]] - <tree-ish> [paths...] + [--name-only] [--name-status] [--full-name] [--abbrev=[<n>]] + <tree-ish> [paths...] DESCRIPTION ----------- @@ -47,6 +48,10 @@ OPTIONS lines, show only handful hexdigits prefix. Non default number of digits can be specified with --abbrev=<n>. +--full-name:: + Instead of showing the path names relative to the current working + directory, show the full path names. + paths:: When paths are given, show them (note that this isn't really raw pathnames, but rather a list of patterns to match). Otherwise @@ -72,8 +77,6 @@ Documentation Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>. -This manual page is a stub. You can help the git documentation by expanding it. - GIT --- Part of the gitlink:git[7] suite diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt index ffaa00468f..39a1434a0e 100644 --- a/Documentation/git-name-rev.txt +++ b/Documentation/git-name-rev.txt @@ -8,7 +8,7 @@ git-name-rev - Find symbolic names for given revs SYNOPSIS -------- -'git-name-rev' [--tags] ( --all | --stdin | <commitish>... ) +'git-name-rev' [--tags] ( --all | --stdin | <committish>... ) DESCRIPTION ----------- diff --git a/Documentation/git-p4import.txt b/Documentation/git-p4import.txt index b8ff1e9bde..c198ff2502 100644 --- a/Documentation/git-p4import.txt +++ b/Documentation/git-p4import.txt @@ -128,7 +128,7 @@ Therefore after the import you can use git to access any commit by its Perforce number, eg. git show p4/327. The tag associated with the HEAD commit is also how `git-p4import` -determines if their are new changes to incrementally import from the +determines if there are new changes to incrementally import from the Perforce repository. If you import from a repository with many thousands of changes diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt index 1c01d00df2..11bd9c0adc 100644 --- a/Documentation/git-read-tree.txt +++ b/Documentation/git-read-tree.txt @@ -266,7 +266,7 @@ file that does not match stage 2. This is done to prevent you from losing your work-in-progress changes, and mixing your random changes in an unrelated merge commit. To illustrate, suppose you start from what has been -commited last to your repository: +committed last to your repository: ---------------- $ JC=`git-rev-parse --verify "HEAD^0"` diff --git a/Documentation/git-shortlog.txt b/Documentation/git-shortlog.txt index 54fb922ba9..7486ebe785 100644 --- a/Documentation/git-shortlog.txt +++ b/Documentation/git-shortlog.txt @@ -5,7 +5,6 @@ NAME ---- git-shortlog - Summarize 'git log' output - SYNOPSIS -------- git-log --pretty=short | 'git-shortlog' @@ -13,8 +12,22 @@ git-log --pretty=short | 'git-shortlog' DESCRIPTION ----------- Summarizes 'git log' output in a format suitable for inclusion -in release announcements. - +in release announcements. Each commit will be grouped by author +the first line of the commit message will be shown. + +Additionally, "[PATCH]" will be stripped from the commit description. + +FILES +----- +'.mailmap':: + If this file exists, it will be used for mapping author email + addresses to a real author name. One mapping per line, first + the author name followed by the email address enclosed by + '<' and '>'. Use hash '#' for comments. Example: + + # Keep alphabetized + Adam Morrow <adam@localhost.localdomain> + Eve Jones <eve@laptop.(none)> Author ------ diff --git a/Documentation/git-tar-tree.txt b/Documentation/git-tar-tree.txt index 2139b6ff8c..831537b6ff 100644 --- a/Documentation/git-tar-tree.txt +++ b/Documentation/git-tar-tree.txt @@ -8,7 +8,7 @@ git-tar-tree - Creates a tar archive of the files in the named tree SYNOPSIS -------- -'git-tar-tree' <tree-ish> [ <base> ] +'git-tar-tree' [--remote=<repo>] <tree-ish> [ <base> ] DESCRIPTION ----------- @@ -23,6 +23,35 @@ commit time as recorded in the referenced commit object is used instead. Additionally the commit ID is stored in a global extended pax header. It can be extracted using git-get-tar-commit-id. +OPTIONS +------- + +<tree-ish>:: + The tree or commit to produce tar archive for. If it is + the object name of a commit object. + +<base>:: + Leading path to the files in the resulting tar archive. + +--remote=<repo>:: + Instead of making a tar archive from local repository, + retrieve a tar archive from a remote repository. + +Examples +-------- +git tar-tree HEAD | (cd /var/tmp/ && mkdir junk && tar Cxf junk -):: + + Create a tar archive that contains the contents of the + latest commit on the current branch, and extracts it in + `/var/tmp/junk` directory. + +git tar-tree v2.6.17 linux-2.6.17 | gzip >linux-2.6.17.tar.gz + + Create a tarball for v2.6.17 release. + +git tar-tree --remote=example.com:git.git v0.99 >git-0.99.tar + + Get a tarball v0.99 from example.com. Author ------ diff --git a/Documentation/git-upload-tar.txt b/Documentation/git-upload-tar.txt new file mode 100644 index 0000000000..a1019a0231 --- /dev/null +++ b/Documentation/git-upload-tar.txt @@ -0,0 +1,39 @@ +git-upload-tar(1) +================= + +NAME +---- +git-upload-tar - Send tar archive + + +SYNOPSIS +-------- +'git-upload-tar' <directory> + +DESCRIPTION +----------- +Invoked by 'git-tar-tree --remote' and sends a generated tar archive +to the other end over the git protocol. + +This command is usually not invoked directly by the end user. +The UI for the protocol is on the 'git-tar-tree' side, and the +program pair is meant to be used to get a tar achive from a +remote repository. + + +OPTIONS +------- +<directory>:: + The repository to get a tar archive from. + +Author +------ +Written by Junio C Hamano <junio@kernel.org> + +Documentation +-------------- +Documentation by Junio C Hamano. + +GIT +--- +Part of the gitlink:git[7] suite diff --git a/Documentation/git.txt b/Documentation/git.txt index 24ca55da68..d4472b56d1 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -21,6 +21,9 @@ link:everyday.html[Everyday Git] for a useful minimum set of commands, and "man git-commandname" for documentation of each command. CVS users may also want to read link:cvs-migration.html[CVS migration]. +The COMMAND is either a name of a Git command (see below) or an alias +as defined in the configuration file (see gitlink:git-repo-config[1]). + OPTIONS ------- --version:: @@ -237,6 +240,10 @@ gitlink:git-upload-pack[1]:: Invoked by 'git-clone-pack' and 'git-fetch-pack' to push what are asked for. +gitlink:git-upload-tar[1]:: + Invoked by 'git-tar-tree --remote' to return the tar + archive the other end asked for. + High-level commands (porcelain) ------------------------------- @@ -378,6 +385,9 @@ gitlink:git-merge-one-file[1]:: gitlink:git-prune[1]:: Prunes all unreachable objects from the object database. +gitlink:git-quiltimport[1]:: + Applies a quilt patchset onto the current branch. + gitlink:git-relink[1]:: Hardlink common objects in local repositories. diff --git a/Documentation/glossary.txt b/Documentation/glossary.txt index 39c90ad7a6..116ddb7fbf 100644 --- a/Documentation/glossary.txt +++ b/Documentation/glossary.txt @@ -109,6 +109,13 @@ file system:: git archive:: Synonym for repository (for arch people). +grafts:: + Grafts enables two otherwise different lines of development to be + joined together by recording fake ancestry information for commits. + This way you can make git pretend the set of parents a commit + has is different from what was recorded when the commit was created. + Configured via the `.git/info/grafts` file. + hash:: In git's context, synonym to object name. diff --git a/Documentation/hooks.txt b/Documentation/hooks.txt index e3dde39190..898b4aaf80 100644 --- a/Documentation/hooks.txt +++ b/Documentation/hooks.txt @@ -100,7 +100,7 @@ update This hook is invoked by `git-receive-pack` on the remote repository, which is happens when a `git push` is done on a local repository. Just before updating the ref on the remote repository, the update hook -is invoked. It's exit status determines the success or failure of +is invoked. Its exit status determines the success or failure of the ref update. The hook executes once for each ref to be updated, and takes diff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt index db563127b2..554ee0af91 100644 --- a/Documentation/tutorial.txt +++ b/Documentation/tutorial.txt @@ -357,7 +357,7 @@ $ git diff v2.5 HEAD # compare the current HEAD to v2.5 $ git branch stable v2.5 # start a new branch named "stable" based # at v2.5 $ git reset --hard HEAD^ # reset your current branch and working - # directory its state at HEAD^ + # directory to its state at HEAD^ ------------------------------------- Be careful with that last command: in addition to losing any changes @@ -707,7 +707,7 @@ clean: rm -f *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags rm -rf $(GIT_TARNAME) .doc-tmp-dir rm -f $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz - rm -f $(htmldocs).tar $(manpages).tar + rm -f $(htmldocs).tar.gz $(manpages).tar.gz $(MAKE) -C Documentation/ clean $(MAKE) -C templates clean $(MAKE) -C t/ clean diff --git a/builtin-tar-tree.c b/builtin-tar-tree.c index 5f740cf702..7663b9bd8e 100644 --- a/builtin-tar-tree.c +++ b/builtin-tar-tree.c @@ -168,8 +168,9 @@ static int get_path_prefix(const struct strbuf *path, int maxlen) int i = path->len; if (i > maxlen) i = maxlen; - while (i > 0 && path->buf[i] != '/') + do { i--; + } while (i > 0 && path->buf[i] != '/'); return i; } @@ -238,6 +238,7 @@ proc updatecommits {} { catch {unset selectedline} catch {unset thickerline} catch {unset viewdata($n)} + discardallcommits readrefs showview $n } @@ -4988,15 +4989,30 @@ proc wrcomcan {} { # Stuff for finding nearby tags proc getallcommits {} { - global allcstart allcommits + global allcstart allcommits allcfd set fd [open [concat | git rev-list --all --topo-order --parents] r] + set allcfd $fd fconfigure $fd -blocking 0 set allcommits "reading" nowbusy allcommits restartgetall $fd } +proc discardallcommits {} { + global allparents allchildren allcommits allcfd + global desc_tags anc_tags alldtags tagisdesc allids desc_heads + + if {![info exists allcommits]} return + if {$allcommits eq "reading"} { + catch {close $allcfd} + } + foreach v {allcommits allchildren allparents allids desc_tags anc_tags + alldtags tagisdesc desc_heads} { + catch {unset $v} + } +} + proc restartgetall {fd} { global allcstart |