Skip to content

Commit

Permalink
Merge branch 'master' into ph/strbuf
Browse files Browse the repository at this point in the history
* master: (94 commits)
  Fixed update-hook example allow-users format.
  Documentation/git-svn: updated design philosophy notes
  t/t4014: test "am -3" with mode-only change.
  git-commit.sh: Shell script cleanup
  preserve executable bits in zip archives
  Fix lapsus in builtin-apply.c
  git-push: documentation and tests for pushing only branches
  git-svnimport: Use separate arguments in the pipe for git-rev-parse
  contrib/fast-import: add perl version of simple example
  contrib/fast-import: add simple shell example
  rev-list --bisect: Bisection "distance" clean up.
  rev-list --bisect: Move some bisection code into best_bisection.
  rev-list --bisect: Move finding bisection into do_find_bisection.
  Document ls-files --with-tree=<tree-ish>
  git-commit: partial commit of paths only removed from the index
  git-commit: Allow partial commit of file removal.
  send-email: make message-id generation a bit more robust
  git-apply: fix whitespace stripping
  git-gui: Disable native platform text selection in "lists"
  apply --index-info: fall back to current index for mode changes
  ...
  • Loading branch information
Junio C Hamano committed Sep 19, 2007
2 parents 68d3025 + 89df580 commit 39bd2eb
Show file tree
Hide file tree
Showing 71 changed files with 2,677 additions and 1,424 deletions.
2 changes: 1 addition & 1 deletion Documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ cmd-list.made: cmd-list.perl $(MAN1_TXT)
perl ./cmd-list.perl
date >$@

git.7 git.html: git.txt core-intro.txt
git.7 git.html: git.txt

clean:
$(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7 *.texi *.texi+ howto-index.txt howto/*.html doc.dep
Expand Down
10 changes: 9 additions & 1 deletion Documentation/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,17 @@ pack.deltaCacheSize::
A value of 0 means no limit. Defaults to 0.

pack.deltaCacheLimit::
The maxium size of a delta, that is cached in
The maximum size of a delta, that is cached in
gitlink:git-pack-objects[1]. Defaults to 1000.

pack.threads::
Specifies the number of threads to spawn when searching for best
delta matches. This requires that gitlink:git-pack-objects[1]
be compiled with pthreads otherwise this option is ignored with a
warning. This is meant to reduce packing time on multiprocessor
machines. The required amount of memory for the delta search window
is however multiplied by the number of threads.

pull.octopus::
The default merge strategy to use when pulling multiple branches
at once.
Expand Down
592 changes: 0 additions & 592 deletions Documentation/core-intro.txt

This file was deleted.

32 changes: 10 additions & 22 deletions Documentation/core-tutorial.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,24 @@ A git core tutorial for developers
Introduction
------------

This is trying to be a short tutorial on setting up and using a git
repository, mainly because being hands-on and using explicit examples is
often the best way of explaining what is going on.
This tutorial explains how to use the "core" git programs to set up and
work with a git repository.

In normal life, most people wouldn't use the "core" git programs
directly, but rather script around them to make them more palatable.
Understanding the core git stuff may help some people get those scripts
done, though, and it may also be instructive in helping people
understand what it is that the higher-level helper scripts are actually
doing.
If you just need to use git as a revision control system you may prefer
to start with link:tutorial.html[a tutorial introduction to git] or
link:user-manual.html[the git user manual].

However, an understanding of these low-level tools can be helpful if
you want to understand git's internals.

The core git is often called "plumbing", with the prettier user
interfaces on top of it called "porcelain". You may not want to use the
plumbing directly very often, but it can be good to know what the
plumbing does for when the porcelain isn't flushing.

The material presented here often goes deep describing how things
work internally. If you are mostly interested in using git as a
SCM, you can skip them during your first pass.

[NOTE]
And those "too deep" descriptions are often marked as Note.

[NOTE]
If you are already familiar with another version control system,
like CVS, you may want to take a look at
link:everyday.html[Everyday GIT in 20 commands or so] first
before reading this.
Deeper technical details are often marked as Notes, which you can
skip on your first reading.


Creating a git repository
Expand Down Expand Up @@ -1686,5 +1676,3 @@ merge two at a time, documenting how you resolved the conflicts,
and the reason why you preferred changes made in one side over
the other. Otherwise it would make the project history harder
to follow, not easier.

[ to be continued.. cvsimports ]
5 changes: 3 additions & 2 deletions Documentation/git-archive.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ SYNOPSIS
DESCRIPTION
-----------
Creates an archive of the specified format containing the tree
structure for the named tree. If <prefix> is specified it is
structure for the named tree, and writes it out to the standard
output. If <prefix> is specified it is
prepended to the filenames in the archive.

'git-archive' behaves differently when given a tree ID versus when
Expand All @@ -31,7 +32,7 @@ OPTIONS
-------

--format=<fmt>::
Format of the resulting archive: 'tar', 'zip'... The default
Format of the resulting archive: 'tar' or 'zip'. The default
is 'tar'.

--list, -l::
Expand Down
2 changes: 1 addition & 1 deletion Documentation/git-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ FILES
If not set explicitly with '--file', there are three files where
git-config will search for configuration options:

.git/config::
$GIT_DIR/config::
Repository specific configuration file. (The filename is
of course relative to the repository root, not the working
directory.)
Expand Down
5 changes: 0 additions & 5 deletions Documentation/git-filter-branch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,6 @@ git filter-branch --commit-filter '
fi' HEAD
------------------------------------------------------------------------------

Note that the changes introduced by the commits, and not reverted by
subsequent commits, will still be in the rewritten branch. If you want
to throw out _changes_ together with the commits, you should use the
interactive mode of gitlink:git-rebase[1].

The function 'skip_commits' is defined as follows:

--------------------------
Expand Down
9 changes: 8 additions & 1 deletion Documentation/git-ls-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SYNOPSIS
[-x <pattern>|--exclude=<pattern>]
[-X <file>|--exclude-from=<file>]
[--exclude-per-directory=<file>]
[--error-unmatch]
[--error-unmatch] [--with-tree=<tree-ish>]
[--full-name] [--abbrev] [--] [<file>]\*

DESCRIPTION
Expand Down Expand Up @@ -81,6 +81,13 @@ OPTIONS
If any <file> does not appear in the index, treat this as an
error (return 1).

--with-tree=<tree-ish>::
When using --error-unmatch to expand the user supplied
<file> (i.e. path pattern) arguments to paths, pretend
that paths which were removed in the index since the
named <tree-ish> are still present. Using this option
with `-s` or `-u` options does not make any sense.

-t::
Identify the file status with the following tags (followed by
a space) at the start of each line:
Expand Down
8 changes: 8 additions & 0 deletions Documentation/git-pack-objects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ base-name::
length, this option typically shrinks the resulting
packfile by 3-5 per-cent.

--threads=<n>::
Specifies the number of threads to spawn when searching for best
delta matches. This requires that pack-objects be compiled with
pthreads otherwise this option is ignored with a warning.
This is meant to reduce packing time on multiprocessor machines.
The required amount of memory for the delta search window is
however multiplied by the number of threads.

--index-version=<version>[,<offset>]::
This is intended to be used by the test suite only. It allows
to force the version for the generated pack index, and to force
Expand Down
4 changes: 2 additions & 2 deletions Documentation/git-push.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ even if it does not result in a fast forward update.
Note: If no explicit refspec is found, (that is neither
on the command line nor in any Push line of the
corresponding remotes file---see below), then all the
refs that exist both on the local side and on the remote
heads that exist both on the local side and on the remote
side are updated.
+
`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.
Expand All @@ -61,7 +61,7 @@ the remote repository.

\--all::
Instead of naming each ref to push, specifies that all
refs be pushed.
refs under `$GIT_DIR/refs/heads/` be pushed.

\--tags::
All refs under `$GIT_DIR/refs/tags` are pushed, in
Expand Down
6 changes: 5 additions & 1 deletion Documentation/git-remote.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SYNOPSIS
--------
[verse]
'git-remote'
'git-remote' add [-t <branch>] [-m <branch>] [-f] <name> <url>
'git-remote' add [-t <branch>] [-m <branch>] [-f] [--mirror] <name> <url>
'git-remote' show <name>
'git-remote' prune <name>
'git-remote' update [group]
Expand Down Expand Up @@ -45,6 +45,10 @@ multiple branches without grabbing all branches.
With `-m <master>` option, `$GIT_DIR/remotes/<name>/HEAD` is set
up to point at remote's `<master>` branch instead of whatever
branch the `HEAD` at the remote repository actually points at.
+
In mirror mode, enabled with `--mirror`, the refs will not be stored
in the 'refs/remotes/' namespace, but in 'refs/heads/'. This option
only makes sense in bare repositories.

'show'::

Expand Down
4 changes: 2 additions & 2 deletions Documentation/git-send-pack.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ OPTIONS

\--all::
Instead of explicitly specifying which refs to update,
update all refs that locally exist.
update all heads that locally exist.

\--force::
Usually, the command refuses to update a remote ref that
Expand Down Expand Up @@ -70,7 +70,7 @@ With '--all' flag, all refs that exist locally are transferred to
the remote side. You cannot specify any '<ref>' if you use
this flag.

Without '--all' and without any '<ref>', the refs that exist
Without '--all' and without any '<ref>', the heads that exist
both on the local side and on the remote side are updated.

When one or more '<ref>' are specified explicitly, it can be either a
Expand Down
11 changes: 6 additions & 5 deletions Documentation/git-svn.txt
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,12 @@ previous commits in SVN.
DESIGN PHILOSOPHY
-----------------
Merge tracking in Subversion is lacking and doing branched development
with Subversion is cumbersome as a result. git-svn does not do
automated merge/branch tracking by default and leaves it entirely up to
the user on the git side. git-svn does however follow copy
history of the directory that it is tracking, however (much like
how 'svn log' works).
with Subversion can be cumbersome as a result. While git-svn can track
copy history (including branches and tags) for repositories adopting a
standard layout, it cannot yet represent merge history that happened
inside git back upstream to SVN users. Therefore it is advised that
users keep history as linear as possible inside git to ease
compatibility with SVN (see the CAVEATS section below).

CAVEATS
-------
Expand Down
57 changes: 53 additions & 4 deletions Documentation/git.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ FURTHER DOCUMENTATION
See the references above to get started using git. The following is
probably more detail than necessary for a first-time user.

The <<Discussion,Discussion>> section below and the
link:core-tutorial.html[Core tutorial] both provide introductions to the
underlying git architecture.
The link:user-manual.html#git-concepts[git concepts chapter of the
user-manual] and the link:core-tutorial.html[Core tutorial] both provide
introductions to the underlying git architecture.

See also the link:howto-index.html[howto] documents for some useful
examples.
Expand Down Expand Up @@ -474,7 +474,56 @@ for further details.

Discussion[[Discussion]]
------------------------
include::core-intro.txt[]

More detail on the following is available from the
link:user-manual.html#git-concepts[git concepts chapter of the
user-manual] and the link:core-tutorial.html[Core tutorial].

A git project normally consists of a working directory with a ".git"
subdirectory at the top level. The .git directory contains, among other
things, a compressed object database representing the complete history
of the project, an "index" file which links that history to the current
contents of the working tree, and named pointers into that history such
as tags and branch heads.

The object database contains objects of three main types: blobs, which
hold file data; trees, which point to blobs and other trees to build up
directory heirarchies; and commits, which each reference a single tree
and some number of parent commits.

The commit, equivalent to what other systems call a "changeset" or
"version", represents a step in the project's history, and each parent
represents an immediately preceding step. Commits with more than one
parent represent merges of independent lines of development.

All objects are named by the SHA1 hash of their contents, normally
written as a string of 40 hex digits. Such names are globally unique.
The entire history leading up to a commit can be vouched for by signing
just that commit. A fourth object type, the tag, is provided for this
purpose.

When first created, objects are stored in individual files, but for
efficiency may later be compressed together into "pack files".

Named pointers called refs mark interesting points in history. A ref
may contain the SHA1 name of an object or the name of another ref. Refs
with names beginning `ref/head/` contain the SHA1 name of the most
recent commit (or "head") of a branch under developement. SHA1 names of
tags of interest are stored under `ref/tags/`. A special ref named
`HEAD` contains the name of the currently checked-out branch.

The index file is initialized with a list of all paths and, for each
path, a blob object and a set of attributes. The blob object represents
the contents of the file as of the head of the current branch. The
attributes (last modified time, size, etc.) are taken from the
corresponding file in the working tree. Subsequent changes to the
working tree can be found by comparing these attributes. The index may
be updated with new content, and new commits may be created from the
content stored in the index.

The index is also capable of storing multiple entries (called "stages")
for a given pathname. These stages are used to hold the various
unmerged version of a file when a merge is in progress.

Authors
-------
Expand Down
8 changes: 4 additions & 4 deletions Documentation/howto/update-hook-example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ This uses two files, $GIT_DIR/info/allowed-users and
allowed-groups, to describe which heads can be pushed into by
whom. The format of each file would look like this:

refs/heads/master junio
refs/heads/master junio
refs/heads/cogito$ pasky
refs/heads/bw/ linus
refs/heads/tmp/ *
refs/tags/v[0-9]* junio
refs/heads/bw/.* linus
refs/heads/tmp/.* .*
refs/tags/v[0-9].* junio

With this, Linus can push or create "bw/penguin" or "bw/zebra"
or "bw/panda" branches, Pasky can do only "cogito", and JC can
Expand Down
Loading

0 comments on commit 39bd2eb

Please sign in to comment.