Merge branch 'master' into next
authorJunio C Hamano <junkio@cox.net>
Thu, 8 Jun 2006 00:27:09 +0000 (17:27 -0700)
committerJunio C Hamano <junkio@cox.net>
Thu, 8 Jun 2006 00:27:09 +0000 (17:27 -0700)
* 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

21 files changed:
Documentation/config.txt
Documentation/cvs-migration.txt
Documentation/everyday.txt
Documentation/git-apply.txt
Documentation/git-check-ref-format.txt
Documentation/git-cvsserver.txt
Documentation/git-describe.txt
Documentation/git-ls-tree.txt
Documentation/git-name-rev.txt
Documentation/git-p4import.txt
Documentation/git-read-tree.txt
Documentation/git-shortlog.txt
Documentation/git-tar-tree.txt
Documentation/git-upload-tar.txt [new file with mode: 0644]
Documentation/git.txt
Documentation/glossary.txt
Documentation/hooks.txt
Documentation/tutorial.txt
Makefile
builtin-tar-tree.c
gitk
index c861c6ce17f79e78e5b0fb6f61a5419d143fd369..a04c5adf8e522e65fae58ec32db07c46aeebe070 100644 (file)
@@ -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 more detailed description
+in the appropriate manual page. You will find 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::
index 826d0897e2fd2ad2f63677b477c9e1e0f62337ae..1fbca83141e20599e4d6edd880b1cabbf0cd9913 100644 (file)
@@ -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:
 
 ------------------------------------------------
index 6745ab5fc5a1f1262edb9e2563627831b4b7f4bd..b935c180881571a964356e63a2e718c2721b5e6b 100644 (file)
@@ -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.
index 9cc7c74deab0251eba8e34daf2b3c718071bedfd..2ff74949a73aa8670750105a7d292206877477c7 100644 (file)
@@ -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::
index 3ea720dd005f7a9b4a66a419cf5438a3a7d0fa8b..13a5f43049c25e1df3bcbcbbed482acce0cebc8b 100644 (file)
@@ -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;
 
index 952635d809ba95b6bb747e30b2edb282169e2812..e328db3797888046802b82954d8946bc8d317075 100644 (file)
@@ -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
 ------------------------
index 7a253eaf284ab8effc7138f91ba6236a4f05dfdd..2700f35bdb6ec7aae9520eca0d21bcf5089bc750 100644 (file)
@@ -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
index 018c4019532d9eb18dcae4873cd641604e833779..f283bacb6557fe7c1313912402f60e3a1560d04a 100644 (file)
@@ -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
index ffaa00468f0c16f19ab632aac20aaa74db52b325..39a1434a0e6be3c07852dc0919536bc63551a3dd 100644 (file)
@@ -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
 -----------
index b8ff1e9bdebf04132a5b7dc85305ce0a20e95e09..c198ff2502d95be4dc1baadd6479b687acb0caa1 100644 (file)
@@ -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
index 1c01d00df2d46e7d2eaefae835e22a3b4724e8e8..11bd9c0adc5517ef1aadc76abdb8dfb0827c27b0 100644 (file)
@@ -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"`
index 54fb922ba9704112f953e4f6de25f053e81b2097..7486ebe785733a6d4f4e1a3a2ea8f5c37b3f0a51 100644 (file)
@@ -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
 ------
index 2139b6ff8ce3df6d1c872be1410349e2637eb4f1..831537b6ffe5c53b8b1955fe7b4f8bac9a3df60d 100644 (file)
@@ -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 (file)
index 0000000..a1019a0
--- /dev/null
@@ -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
index 24ca55da684265b5e14f0e60c00917c3d623fcbc..d4472b56d1b11227bc20b8ad3f69a3d42278dd42 100644 (file)
@@ -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.
 
index 39c90ad7a67cbceb83c41ee8dfe91d7b870e9e7a..116ddb7fbfd7654bb7330e8f56dd03a9be029cd1 100644 (file)
@@ -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.
 
index e3dde39190d7f69b2ca2482763a643d33f772b07..898b4aaf80aabe8caa9675c4371918a61312f1cb 100644 (file)
@@ -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
index db563127b236757de62be50a4e04439eddf2729e..554ee0af912368cb842d93c025e742daaf47f5f2 100644 (file)
@@ -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
index 265a716704130f6dbf856d2132ba1b12d5a50735..5226fa1881bf5c2df4f1a11c2daaf6b5a2fec2a5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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
index 5f740cf7025bc2a9b46656332c6a54e78ee737e4..7663b9bd8e5f10ee45e34752f631d435687cf1b3 100644 (file)
@@ -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;
 }
 
diff --git a/gitk b/gitk
index 91c11a368f71809e290ec669387849aea25dda76..9be10a43e603fcda952fde03254076f17275ed05 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -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