summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore51
-rw-r--r--Documentation/.gitignore5
-rw-r--r--Documentation/Makefile18
-rw-r--r--Documentation/git.txt5
-rw-r--r--Documentation/glossary.txt14
-rwxr-xr-xDocumentation/howto-index.sh49
-rw-r--r--Documentation/howto/make-dist.txt5
-rw-r--r--Documentation/howto/rebase-and-edit.txt3
-rw-r--r--Documentation/howto/rebase-from-internal-branch.txt5
-rw-r--r--Documentation/howto/using-topic-branches.txt70
-rwxr-xr-xDocumentation/install-webdoc.sh25
-rw-r--r--debian/.gitignore6
-rw-r--r--debian/control5
-rw-r--r--debian/git-core.doc-base5
-rw-r--r--debian/git-tk.files2
-rw-r--r--show-branch.c24
-rw-r--r--templates/.gitignore1
-rw-r--r--tools/.gitignore2
18 files changed, 260 insertions, 35 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000..245f54e050
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,51 @@
+git-apply
+git-build-rev-cache
+git-cat-file
+git-checkout-cache
+git-clone-pack
+git-commit-tree
+git-convert-cache
+git-daemon
+git-diff-cache
+git-diff-files
+git-diff-helper
+git-diff-stages
+git-diff-tree
+git-export
+git-fetch-pack
+git-fsck-cache
+git-get-tar-commit-id
+git-hash-object
+git-http-pull
+git-init-db
+git-local-pull
+git-ls-files
+git-ls-tree
+git-merge-base
+git-merge-cache
+git-mktag
+git-pack-objects
+git-patch-id
+git-peek-remote
+git-prune-packed
+git-read-tree
+git-receive-pack
+git-rev-list
+git-rev-parse
+git-rev-tree
+git-send-pack
+git-show-branch
+git-show-index
+git-show-rev-cache
+git-ssh-pull
+git-ssh-push
+git-stripspace
+git-tar-tree
+git-unpack-file
+git-unpack-objects
+git-update-cache
+git-update-server-info
+git-upload-pack
+git-var
+git-verify-pack
+git-write-tree
diff --git a/Documentation/.gitignore b/Documentation/.gitignore
new file mode 100644
index 0000000000..dad52b80d3
--- /dev/null
+++ b/Documentation/.gitignore
@@ -0,0 +1,5 @@
+*.xml
+*.html
+*.1
+*.7
+howto-index.txt
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 91addedca0..bd6833b79e 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -1,9 +1,10 @@
-MAN1_TXT=$(wildcard git-*.txt)
+MAN1_TXT=$(wildcard git-*.txt) gitk.txt
MAN7_TXT=git.txt
DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT))
DOC_HTML += glossary.html
DOC_HTML += tutorial.html
+DOC_HTML += howto-index.html
DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
@@ -44,7 +45,7 @@ git-diff-%.txt: diff-format.txt diff-options.txt
touch $@
clean:
- rm -f *.xml *.html *.1 *.7
+ rm -f *.xml *.html *.1 *.7 howto-index.txt
%.html : %.txt
asciidoc -b xhtml11 -d manpage $<
@@ -62,3 +63,16 @@ glossary.html : glossary.txt sort_glossary.pl
tutorial.html : tutorial.txt
asciidoc -b xhtml11 tutorial.txt
+
+howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
+ rm -f $@+ $@
+ sh ./howto-index.sh $(wildcard howto/*.txt) >$@+
+ mv $@+ $@
+
+howto-index.html: howto-index.txt
+ asciidoc -b xhtml11 howto-index.txt
+
+WEBDOC_DEST = /pub/software/scm/git/docs
+
+install-webdoc : html
+ sh ./install-webdoc.sh $(WEBDOC_DEST)
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 664b88a917..d4ede094f8 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -24,6 +24,11 @@ clarification info - read that first. And of the commands, I suggest
reading link:git-update-cache.html[git-update-cache] and
link:git-read-tree.html[git-read-tree] first - I wish I had!
+After you get the general feel from the tutorial and this
+overview page, you may want to take a look at the
+link:howto-index.html[howto] documents.
+
+
David Greaves <david@dgreaves.com>
08/05/05
diff --git a/Documentation/glossary.txt b/Documentation/glossary.txt
index 7456cffd33..a069b7bb0c 100644
--- a/Documentation/glossary.txt
+++ b/Documentation/glossary.txt
@@ -27,14 +27,20 @@ blob object::
tree object::
An object containing a list of file names and modes along with refs
- to the associated blob and/or tree objects. A tree object is
- equivalent to a directory.
+ to the associated blob and/or tree objects. A tree is equivalent
+ to a directory.
tree::
Either a working tree, or a tree object together with the
dependent blob and tree objects (i.e. a stored representation
of a working tree).
+DAG::
+ Directed acyclic graph. The commit objects form a directed acyclic
+ graph, because they have parents (directed), and the graph of commit
+ objects is acyclic (there is no chain which begins and ends with the
+ same object).
+
index::
A collection of files with stat information, whose contents are
stored as objects. The cache is a stored version of your working
@@ -142,6 +148,10 @@ merge::
merge uses heuristics to accomplish that. Evidently, an automatic
merge can fail.
+octopus::
+ To merge more than two branches. Also denotes an intelligent
+ predator.
+
resolve::
The action of fixing up manually what a failed automatic merge
left behind.
diff --git a/Documentation/howto-index.sh b/Documentation/howto-index.sh
new file mode 100755
index 0000000000..f9d3e57a91
--- /dev/null
+++ b/Documentation/howto-index.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+cat <<\EOF
+GIT Howto Index
+===============
+
+Here is a collection of mailing list postings made by various
+people describing how they use git in their workflow.
+
+EOF
+
+for txt
+do
+ title=`expr "$txt" : '.*/\(.*\)\.txt$'`
+ from=`sed -ne '
+ /^$/q
+ /^From:[ ]/{
+ s///
+ s/^[ ]*//
+ s/[ ]*$//
+ s/^/by /
+ p
+ }
+ ' "$txt"`
+
+ abstract=`sed -ne '
+ /^Abstract:[ ]/{
+ s/^[^ ]*//
+ x
+ s/.*//
+ x
+ : again
+ /^[ ]/{
+ s/^[ ]*//
+ H
+ n
+ b again
+ }
+ x
+ p
+ q
+ }' "$txt"`
+
+ echo "* link:$txt[$title] $from
+$abstract
+
+"
+
+done
diff --git a/Documentation/howto/make-dist.txt b/Documentation/howto/make-dist.txt
index ae9094157c..132d5eca66 100644
--- a/Documentation/howto/make-dist.txt
+++ b/Documentation/howto/make-dist.txt
@@ -3,6 +3,11 @@ From: Linus Torvalds <torvalds@osdl.org>
To: Dave Jones <davej@redhat.com>
cc: git@vger.kernel.org
Subject: Re: Fwd: Re: git checkout -f branch doesn't remove extra files
+Abstract: In this article, Linus talks about building a tarball,
+ incremental patch, and ChangeLog, given a base release and two
+ rc releases, following the convention of giving the patch from
+ the base release and the latest rc, with ChangeLog between the
+ last rc and the latest rc.
On Sat, 13 Aug 2005, Dave Jones wrote:
>
diff --git a/Documentation/howto/rebase-and-edit.txt b/Documentation/howto/rebase-and-edit.txt
index 8299ca5cdc..6cc1c7921f 100644
--- a/Documentation/howto/rebase-and-edit.txt
+++ b/Documentation/howto/rebase-and-edit.txt
@@ -3,6 +3,9 @@ From: Linus Torvalds <torvalds@osdl.org>
To: Steve French <smfrench@austin.rr.com>
cc: git@vger.kernel.org
Subject: Re: sending changesets from the middle of a git tree
+Abstract: In this article, Linus demonstrates how a broken commit
+ in a sequence of commits can be removed by rewinding the head and
+ reapplying selected changes.
On Sat, 13 Aug 2005, Linus Torvalds wrote:
diff --git a/Documentation/howto/rebase-from-internal-branch.txt b/Documentation/howto/rebase-from-internal-branch.txt
index 8109b7ff26..f627e4271c 100644
--- a/Documentation/howto/rebase-from-internal-branch.txt
+++ b/Documentation/howto/rebase-from-internal-branch.txt
@@ -3,6 +3,11 @@ To: git@vger.kernel.org
Cc: Petr Baudis <pasky@suse.cz>, Linus Torvalds <torvalds@osdl.org>
Subject: Re: sending changesets from the middle of a git tree
Date: Sun, 14 Aug 2005 18:37:39 -0700
+Abstract: In this article, JC talks about how he rebases the
+ public "pu" branch using the core GIT tools when he updates
+ the "master" branch, and how "rebase" works. Also discussed
+ is how this applies to individual developers who sends patches
+ upstream.
Petr Baudis <pasky@suse.cz> writes:
diff --git a/Documentation/howto/using-topic-branches.txt b/Documentation/howto/using-topic-branches.txt
index 52fa4c012a..b3b4d2c97a 100644
--- a/Documentation/howto/using-topic-branches.txt
+++ b/Documentation/howto/using-topic-branches.txt
@@ -1,16 +1,16 @@
Date: Mon, 15 Aug 2005 12:17:41 -0700
From: tony.luck@intel.com
Subject: Some tutorial text (was git/cogito workshop/bof at linuxconf au?)
+Abstract: In this article, Tony Luck discusses how he uses GIT
+ as a Linux subsystem maintainer.
Here's something that I've been putting together on how I'm using
GIT as a Linux subsystem maintainer.
-I suspect that I'm a bit slap-happy with the "git checkout" commands in
-the examples below, and perhaps missing some of the _true-git_ ways of
-doing things.
-
-Tony
+Last updated w.r.t. GIT 0.99.5
+
Linux subsystem maintenance using GIT
-------------------------------------
@@ -48,24 +48,38 @@ Change directory into the cloned tree you just created
$ cd work
-Make a GIT branch named "linus", and rename the "origin" branch as linus too:
+Set up a remotes file so that you can fetch the latest from Linus' master
+branch into a local branch named "linus":
+
+ $ cat > .git/remotes/linus
+ URL: rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+ Pull: master:linus
+ ^D
- $ git checkout -b linus
- $ mv .git/branches/origin .git/branches/linus
+and create the linus branch:
+
+ $ git branch linus
The "linus" branch will be used to track the upstream kernel. To update it,
you simply run:
- $ git checkout linus && git pull linus
+ $ git fetch linus
+
+you can do this frequently (and it should be safe to do so with pending
+work in your tree, but perhaps not if you are in mid-merge).
-you can do this frequently (as long as you don't have any uncommited work
-in your tree).
+If you need to keep track of other public trees, you can add remote branches
+for them too:
-If you need to keep track of other public trees, you can add branches for
-them too:
+ $ git branch another
+ $ cat > .git/remotes/another
+ URL: ... insert URL here ...
+ Pull: name-of-branch-in-this-remote-tree:another
+ ^D
- $ git checkout -b another linus
- $ echo URL-for-another-public-tree > .git/branches/another
+and run:
+
+ $ git fetch another
Now create the branches in which you are going to work, these start
out at the current tip of the linus branch.
@@ -78,15 +92,25 @@ These can be easily kept up to date by merging from the "linus" branch:
$ git checkout test && git resolve test linus "Auto-update from upstream"
$ git checkout release && git resolve release linus "Auto-update from upstream"
-Set up so that you can push upstream to your public tree:
+Set up so that you can push upstream to your public tree (you need to
+log-in to the remote system and create an empty tree there before the
+first push).
- $ echo master.kernel.org:/ftp/pub/scm/linux/kernel/git/aegl/linux-2.6.git > .git/branches/origin
+ $ cat > .git/remotes/mytree
+ URL: master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6.git
+ Push: release
+ Push: test
+ ^D
-and then push each of the test and release branches using:
+and the push both the test and release trees using:
- $ git push origin test
-and
- $ git push origin release
+ $ git push mytree
+
+or push just one of the test and release branches using:
+
+ $ git push mytree test
+or
+ $ git push mytree release
Now to apply some patches from the community. Think of a short
snappy name for a branch to hold this patch (or related group of
@@ -169,9 +193,9 @@ test|release)
git checkout $1 && git resolve $1 linus "Auto-update from upstream"
;;
linus)
- before=$(cat .git/HEAD)
- git checkout linus && git pull linus
- after=$(cat .git/HEAD)
+ before=$(cat .git/refs/heads/linus)
+ git fetch linus
+ after=$(cat .git/refs/heads/linus)
if [ $before != $after ]
then
git-whatchanged $after ^$before | git-shortlog
diff --git a/Documentation/install-webdoc.sh b/Documentation/install-webdoc.sh
new file mode 100755
index 0000000000..1f534f1e77
--- /dev/null
+++ b/Documentation/install-webdoc.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+T="$1"
+
+for h in *.html howto/*.txt
+do
+ diff -u "$T/$h" "$h" || {
+ echo >&2 "# install $h $T/$h"
+ rm -f "$T/$h"
+ mkdir -p `dirname "$T/$h"`
+ cp "$h" "$T/$h"
+ }
+done
+strip_leading=`echo "$T/" | sed -e 's|.|.|g'`
+for th in "$T"/*.html "$T"/howto/*.txt
+do
+ h=`expr "$th" : "$strip_leading"'\(.*\)'`
+ case "$h" in
+ index.html) continue ;;
+ esac
+ test -f "$h" && continue
+ echo >&2 "# rm -f $th"
+ rm -f "$th"
+done
+ln -sf git.html "$T/index.html"
diff --git a/debian/.gitignore b/debian/.gitignore
new file mode 100644
index 0000000000..335ce9c596
--- /dev/null
+++ b/debian/.gitignore
@@ -0,0 +1,6 @@
+git-core
+git-tk
+*.debhelper
+*.substvars
+build-stamp
+files
diff --git a/debian/control b/debian/control
index 5df89dde32..6735a0da03 100644
--- a/debian/control
+++ b/debian/control
@@ -2,14 +2,15 @@ Source: git-core
Section: devel
Priority: optional
Maintainer: Junio C Hamano <junkio@cox.net>
-Build-Depends-Indep: libz-dev, libssl-dev, libcurl3-dev, asciidoc > 6.0.3, xmlto, debhelper (>= 4.0.0)
+Build-Depends-Indep: libz-dev, libssl-dev, libcurl3-dev, asciidoc (>= 6.0.3), xmlto, debhelper (>= 4.0.0)
Standards-Version: 3.6.1
Package: git-core
Architecture: any
Depends: ${shlibs:Depends}, ${perl:Depends}, ${misc:Depends}, patch, rcs
Recommends: rsync, curl, ssh, libmail-sendmail-perl, libemail-valid-perl
-Conflicts: git
+Suggests: cogito
+Conflicts: git, cogito (<< 0.13)
Description: The git content addressable filesystem
GIT comes in two layers. The bottom layer is merely an extremely fast
and flexible filesystem-based database designed to store directory trees
diff --git a/debian/git-core.doc-base b/debian/git-core.doc-base
index f1bbea8119..1ed46333d1 100644
--- a/debian/git-core.doc-base
+++ b/debian/git-core.doc-base
@@ -1,6 +1,5 @@
Document: git-core
-Title: git-core
-Author:
+Title: git reference
Abstract: This manual describes git
Section: Devel
@@ -9,4 +8,4 @@ Index: /usr/share/doc/git-core/git.html
Files: /usr/share/doc/git-core/*.html
Format: text
-Files: /usr/share/doc/git-core/git-core.txt
+Files: /usr/share/doc/git-core/git.txt*
diff --git a/debian/git-tk.files b/debian/git-tk.files
index 3801e7564b..e54f897ce3 100644
--- a/debian/git-tk.files
+++ b/debian/git-tk.files
@@ -1 +1,3 @@
/usr/bin/gitk
+/usr/share/man/man1/gitk.*
+/usr/share/doc/git-core/gitk.*
diff --git a/show-branch.c b/show-branch.c
index fc827ee497..2a4e1768ad 100644
--- a/show-branch.c
+++ b/show-branch.c
@@ -141,6 +141,18 @@ static void show_one_commit(struct commit *commit, char **head_name)
static char *ref_name[MAX_REVS + 1];
static int ref_name_cnt;
+static int compare_ref_name(const void *a_, const void *b_)
+{
+ const char * const*a = a_, * const*b = b_;
+ return strcmp(*a, *b);
+}
+
+static void sort_ref_range(int bottom, int top)
+{
+ qsort(ref_name + bottom, top - bottom, sizeof(ref_name[0]),
+ compare_ref_name);
+}
+
static int append_ref(const char *refname, const unsigned char *sha1)
{
struct commit *commit = lookup_commit_reference_gently(sha1, 1);
@@ -161,7 +173,7 @@ static int append_head_ref(const char *refname, const unsigned char *sha1)
{
if (strncmp(refname, "refs/heads/", 11))
return 0;
- return append_ref(refname + 5, sha1);
+ return append_ref(refname + 11, sha1);
}
static int append_tag_ref(const char *refname, const unsigned char *sha1)
@@ -173,10 +185,16 @@ static int append_tag_ref(const char *refname, const unsigned char *sha1)
static void snarf_refs(int head, int tag)
{
- if (head)
+ if (head) {
+ int orig_cnt = ref_name_cnt;
for_each_ref(append_head_ref);
- if (tag)
+ sort_ref_range(orig_cnt, ref_name_cnt);
+ }
+ if (tag) {
+ int orig_cnt = ref_name_cnt;
for_each_ref(append_tag_ref);
+ sort_ref_range(orig_cnt, ref_name_cnt);
+ }
}
static int rev_is_head(char *head_path, int headlen,
diff --git a/templates/.gitignore b/templates/.gitignore
new file mode 100644
index 0000000000..ca680c5b9c
--- /dev/null
+++ b/templates/.gitignore
@@ -0,0 +1 @@
+blt
diff --git a/tools/.gitignore b/tools/.gitignore
new file mode 100644
index 0000000000..d1ea9ea306
--- /dev/null
+++ b/tools/.gitignore
@@ -0,0 +1,2 @@
+git-mailinfo
+git-mailsplit