Commit graph

1559 commits

Author SHA1 Message Date
Junio C Hamano 5e7f56ac33 git-read-tree --index-output=<file>
This corrects the interface mistake of the previous one, and
gives a command line parameter to the only plumbing command that
currently needs it: "git-read-tree".

We can add the calls to set_alternate_index_output() to other
plumbing commands that update the index if/when needed.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-03 23:44:32 -07:00
Junio C Hamano 30ca07a249 _GIT_INDEX_OUTPUT: allow plumbing to output to an alternative index file.
When defined, this allows plumbing commands that update the
index (add, apply, checkout-index, merge-recursive, mv,
read-tree, rm, update-index, and write-tree) to write their
resulting index to an alternative index file while holding a
lock to the original index file.  With this, git-commit that
jumps the index does not have to make an extra copy of the index
file, and more importantly, it can do the update while holding
the lock on the index.

However, I think the interface to let an environment variable
specify the output is a mistake, as shown in the documentation.
If a curious user has the environment variable set to something
other than the file GIT_INDEX_FILE points at, almost everything
will break.  This should instead be a command line parameter to
tell these plumbing commands to write the result in the named
file, to prevent stupid mistakes.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-03 23:44:32 -07:00
Junio C Hamano 89815cab95 GIT 1.5.1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-03 22:47:01 -07:00
Junio C Hamano 045f5759c9 Merge 1.5.0.7 in
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-03 21:52:14 -07:00
Junio C Hamano 9694ec4533 GIT 1.5.0.7
Not that this release really matters, as we will be doing
1.5.1 tomorrow.  This commit is to tie the loose ends and
merge all of "maint" branch into "master" in preparation.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-03 19:27:41 -07:00
Jakub Narebski 04483524ec Documentation: A few minor fixes to Git User's Manual
Mainly consistent usage of "git command" and not "git-command" syntax

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-03 19:04:56 -07:00
Junio C Hamano a8f4ef727a Hopefully final update to the draft Release Notes, preparing for 1.5.1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-02 13:29:38 -07:00
Frank Lichtenheld d8b6a1a10b cvsserver: Don't lie about binary mode in asciidoc documentation
The git-cvsserver documentation claims that the server will set
-k modes if appropriate which is not really the case. On the other
hand the available gitcvs.allbinary variable is not documented at
all. Fix both these issues by rewording the related paragraph.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-31 16:00:27 -07:00
Junio C Hamano a208362fad Update draft release notes for 1.5.1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-30 00:56:36 -07:00
Junio C Hamano e881192934 Merge branch 'maint'
* maint:
  git-upload-pack: make sure we close unused pipe ends
  Documentation/git-rev-parse.txt: fix example in SPECIFYING RANGES.
  Documentation/git-svnimport.txt: fix typo.
2007-03-29 23:44:30 -07:00
Junio C Hamano 18acb3e6c7 Merge branch 'master' of git://repo.or.cz/git/mergetool.git
* 'master' of git://repo.or.cz/git/mergetool.git:
  mergetool: Clean up description of files and prompts for merge resolutions
  mergetool: Make git-rm quiet when resolving a deleted file conflict
  mergetool: Add support for Apple Mac OS X's opendiff command
  mergetool: Fix abort command when resolving symlinks and deleted files
  mergetool: Remove spurious error message if merge.tool config option not set
  mergetool: factor out common code
  mergetool: portability fix: don't use reserved word function
  mergetool: portability fix: don't assume true is in /bin
  mergetool: Don't error out in the merge case where the local file is deleted
  mergetool: Replace use of "echo -n" with printf(1) to be more portable
  Fix minor formatting issue in man page for git-mergetool
2007-03-29 23:09:40 -07:00
Theodore Ts'o e15b484f6a Fix minor formatting issue in man page for git-mergetool
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-29 10:06:28 -04:00
Gerrit Pape c2c6d9302a Documentation/git-rev-parse.txt: fix example in SPECIFYING RANGES.
Please see http://bugs.debian.org/404795:

 In git-rev-parse(1), there is an example commit tree, which is used twice.
 The explanation for this tree is very clear: B and C are commit *parents* to
 A.

 However, when the tree is reused as an example in the SPECIFYING RANGES, the
 manpage author screws up and uses A as a commit *parent* to B and C!  I.e.,
 he inverts the tree.

 And the fact that for this example you need to read the tree backwards is
 not explained anywhere (and it would be confusing even if it was).

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-29 01:38:28 -07:00
Gerrit Pape 3e63e0df4f Documentation/git-svnimport.txt: fix typo.
This was noticed by Frederik Schwarzer.  SVN's repository by default has
trunk, tags/, and branch_es_/.

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-29 01:38:11 -07:00
Junio C Hamano d3d4fa8631 Documentation: unbreak user-manual.
The previous one broke generated xml files for anything but manpages,
as it took the header for manpage unconditionally.  This fixes it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-28 16:48:50 -07:00
Frank Lichtenheld 7ef195ba3e Documentation: Add version information to man pages
Override the [header] macro of asciidoc's docbook
backend to add version information to the generated
man pages.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-28 16:48:50 -07:00
Frank Lichtenheld 7b8a74f39c Documentation: Replace @@GIT_VERSION@@ in documentation
Include GIT-VERSION-FILE and replace @@GIT_VERSION@@ in
the HTML and XML asciidoc output. The documentation
doesn't depend on GIT-VERSION-FILE so it will not be
automatically rebuild if nothing else changed.

[jc: fixing the case for interrupted build]

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-28 16:48:50 -07:00
Junio C Hamano 43a8e4fe8e Update main git.html page to point at 1.5.0.6 documentation
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-28 15:40:17 -07:00
Junio C Hamano 0a98f9d138 Merge branch 'maint' to synchronize with 1.5.0.6 2007-03-28 15:39:57 -07:00
Junio C Hamano 9529a2524a GIT 1.5.0.6 2007-03-28 15:28:14 -07:00
Junio C Hamano 89d5892389 Document git-log --first-parent
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27 12:51:13 -07:00
Junio C Hamano b6da18b1d1 GIT 1.5.1-rc2
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-25 18:01:50 -07:00
Junio C Hamano 2603fa5fb3 Merge branch 'maint'
* maint:
  user-manual: introduce "branch" and "branch head" differently
  glossary: clean up cross-references
  glossary: stop generating automatically
  user-manual: Use def_ instead of ref_ for glossary references.
  user-manual.txt: fix a tiny typo.
  user-manual: run xsltproc without --nonet option
2007-03-25 15:08:11 -07:00
Junio C Hamano fd2a75972e Merge branch 'maint' of git://linux-nfs.org/~bfields/git into maint
* 'maint' of git://linux-nfs.org/~bfields/git:
  user-manual: introduce "branch" and "branch head" differently
  glossary: clean up cross-references
  glossary: stop generating automatically
  user-manual: Use def_ instead of ref_ for glossary references.
  user-manual.txt: fix a tiny typo.
  user-manual: run xsltproc without --nonet option
2007-03-25 15:07:27 -07:00
Alex Riesen 2a18c266d0 Document --quiet option to git-diff
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-24 22:32:55 -07:00
Junio C Hamano 2499857b0b git-am documentation: describe what is taken from where.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-24 03:08:54 -07:00
Junio C Hamano 1c2c6112a4 Merge branch 'master' into jc/bisect
This is to merge in the fix for path-limited bisection
from the 'master' branch.
2007-03-23 23:38:04 -07:00
Christian Couder 6cea055547 Documentation: bisect: make a comment fit better in the man page.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-23 23:29:29 -07:00
Christian Couder 1207f9e705 Documentation: bisect: add some titles to some paragraphs.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-23 23:29:09 -07:00
Christian Couder fed820ad56 Documentation: bisect: reformat more paragraphs.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-23 23:26:11 -07:00
Christian Couder cc070d1f79 Documentation: bisect: reword one paragraph.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-23 23:26:02 -07:00
Christian Couder 7891a2811d Documentation: bisect: reformat some paragraphs.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-23 23:25:54 -07:00
Christian Couder a17c410100 Bisect: implement "git bisect run <cmd>..." to automatically bisect.
This idea was suggested by Bill Lear
(Message-ID: <17920.38942.364466.642979@lisa.zopyra.com>)
and I think it is a very good one.

This patch adds a new test file for "git bisect run", but there
is currently only one basic test.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-23 01:54:47 -07:00
Junio C Hamano aa576e6b47 Merge branch 'maint'
* maint:
  Documentation/pack-format.txt: Clear up description of types.
  fix typo in git-am manpage
2007-03-22 03:05:25 -07:00
Peter Eriksen 979ea5856c Documentation/pack-format.txt: Clear up description of types.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-22 03:05:19 -07:00
Junio C Hamano 457f08a030 git-rev-list: add --bisect-vars option.
This adds --bisect-vars option to rev-list.  The output is suitable
for `eval` in shell and defines five variables:

 - bisect_rev is the next revision to test.
 - bisect_nr is the expected number of commits to test after
   bisect_rev is tested.
 - bisect_good is the expected number of commits to test
   if bisect_rev turns out to be good.
 - bisect_bad is the expected number of commits to test
   if bisect_rev turns out to be bad.
 - bisect_all is the number of commits we are bisecting right now.

The documentation text was partly stolen from Johannes
Schindelin's patch.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-22 01:32:31 -07:00
Michael S. Tsirkin a947ab79d4 fix typo in git-am manpage
Fix typo in git-am manpage

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-21 02:22:28 -07:00
Johannes Schindelin 1b89ef1731 Provide some technical documentation for shallow clones
There has not been any work on the shallow stuff lately, so it is hard
to find out what it does, and how. This document describes the ideas
as well as the current problems, and can serve as a starting point for
shallow people.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-19 22:19:29 -07:00
Johannes Schindelin e29b96d5aa Add a HOWTO for setting up a standalone git daemon
Setting up a git-daemon came up the other day on IRC, and it is slightly
non trivial for the uninitiated.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-19 22:17:38 -07:00
Junio C Hamano ceb8442af7 GIT 1.5.1-rc1
I think we can start to slow down, as we now have covered
everything I listed earlier in the short-term release plan.

The last release 1.5.0 took painfully too long.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-19 02:56:29 -07:00
Shawn O. Pearce 18bdec1118 Limit the size of the new delta_base_cache
The new configuration variable core.deltaBaseCacheLimit allows the
user to control how much memory they are willing to give to Git for
caching base objects of deltas.  This is not normally meant to be
a user tweakable knob; the "out of the box" settings are meant to
be suitable for almost all workloads.

We default to 16 MiB under the assumption that the cache is not
meant to consume all of the user's available memory, and that the
cache's main purpose was to cache trees, for faster path limiters
during revision traversal.  Since trees tend to be relatively small
objects, this relatively small limit should still allow a large
number of objects.

On the other hand we don't want the cache to start storing 200
different versions of a 200 MiB blob, as this could easily blow
the entire address space of a 32 bit process.

We evict OBJ_BLOB from the cache first (credit goes to Junio) as
we want to favor OBJ_TREE within the cache.  These are the objects
that have the highest inflate() startup penalty, as they tend to
be small and thus don't have that much of a chance to ammortize
that penalty over the entire data.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-18 22:43:37 -07:00
J. Bruce Fields abec100c33 Make git-send-email aware of Cc: lines.
In the Linux kernel, for example, it's common to include Cc: lines
for cases when you want to remember to cc someone on a patch without
necessarily claiming they signed off on it.  Make git-send-email
aware of these.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-18 21:10:03 -07:00
J. Bruce Fields 81b6c950de user-manual: introduce "branch" and "branch head" differently
I was using "branch" to mean "head", but that's perhaps a little
sloppy; so instead start by using the terms "branch head" and "head",
while still quickly falling back on "branch", since that's what
people actually say more frequently.

Also include glossary references on the first uses of "head" and "tag".

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-18 23:06:00 -04:00
J. Bruce Fields cbd919221f glossary: clean up cross-references
Manual clean-up of cross-references, and also clean up a few definitions (e.g.
git-rebase).

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-18 23:06:00 -04:00
J. Bruce Fields f562e6f316 glossary: stop generating automatically
The sort_glossary.pl script sorts the glossary, checks for duplicates,
and automatically adds cross-references.

But it's not so hard to do all that by hand, and sometimes the automatic
cross-references are a little wrong; so let's run the script one last
time and check in its output.

Note: to make the output fit better into the user manual I also deleted
the acknowledgements at the end, which was maybe a little rude; feel
free to object and I can find a different solution.

Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-18 23:06:00 -04:00
James Bowes 9cec65399d mergetool: Add support for vimdiff.
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-18 22:13:48 -04:00
J. Bruce Fields 06e7ea3787 user-manual: Use def_ instead of ref_ for glossary references.
I'd like to start using references to the glossary in the user manual.
The "ref_" prefix for these references seems a little generic; so
replace with "def_".

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-18 21:53:50 -04:00
Jim Meyering 21f13ee203 user-manual.txt: fix a tiny typo.
"file patch" was doubtless intended to be "file path",
but "directory name" is clearer.

Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-18 21:53:29 -04:00
J. Bruce Fields 0a3985dcfb user-manual: run xsltproc without --nonet option
The --nonet option prevents xsltproc from going to the network to find
anything.  But it always tries to find them locally first, so for a
user with the necessary docbook stylesheets installed the build will
work just fine without xsltproc attempting to use the network; all
--nonet does is make it fail rather than falling back on that.  That
doesn't seem particularly helpful.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-18 21:53:19 -04:00
Junio C Hamano 7976ce1b90 Update main git.html page to point at 1.5.0.5 documentation
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-18 15:58:07 -07:00
Junio C Hamano d54fe394ac Merge branch 'ar/diff'
* ar/diff:
  Add tests for --quiet option of diff programs
  try-to-simplify-commit: use diff-tree --quiet machinery.
  revision.c: explain what tree_difference does
  Teach --quiet to diff backends.
  diff --quiet
  Remove unused diffcore_std_no_resolve
  Allow git-diff exit with codes similar to diff(1)
2007-03-18 15:48:06 -07:00
Junio C Hamano 5bb44a5103 Merge 1.5.0.5 in from 'maint' 2007-03-18 15:36:44 -07:00
Junio C Hamano 6bf035f278 GIT 1.5.0.5
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-18 14:43:29 -07:00
Paolo Bonzini 9debc3241b git-fetch, git-branch: Support local --track via a special remote '.'
This patch adds support for a dummy remote '.' to avoid having
to declare a fake remote like

        [remote "local"]
                url = .
                fetch = refs/heads/*:refs/heads/*

Such a builtin remote simplifies the operation of "git-fetch",
which will populate FETCH_HEAD but will not pretend that two
repositories are in use, will not create a thin pack, and will
not perform any useless remapping of names.  The speed
improvement is around 20%, and it should improve more if
"git-fetch" is converted to a builtin.

To this end, git-parse-remote is grown with a new kind of
remote, 'builtin'.  In git-fetch.sh, we treat the builtin remote
specially in that it needs no pack/store operations.  In fact,
doing git-fetch on a builtin remote will simply populate
FETCH_HEAD appropriately.

The patch also improves of the --track/--no-track support,
extending it so that branch.<name>.remote items referring '.'
can be created.  Finally, it fixes a typo in git-checkout.sh.

Signed-off-by: Paolo Bonzini  <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-16 02:10:12 -07:00
Alex Riesen 41bbf9d585 Allow git-diff exit with codes similar to diff(1)
This introduces a new command-line option: --exit-code. The diff
programs will return 1 for differences, return 0 for equality, and
something else for errors.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-14 16:21:19 -07:00
Junio C Hamano 803527f1d9 Merge GIT 1.5.0.4 2007-03-14 15:59:04 -07:00
Junio C Hamano 3d4e1932f2 GIT 1.5.0.4
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-14 15:56:49 -07:00
Yann Dirson 9debca9aac Clarify doc for git-config --unset-all.
Previous formulation could make it appear as removing all lines
matching a regexp (at least, I was looking for such a flag, and
confused this flag for what I was looking for).

Signed-off-by: Yann Dirson <ydirson@altern.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-14 14:38:38 -07:00
Junio C Hamano c379c4b176 Merge branch 'maint'
* maint:
  cvsserver: asciidoc formatting changes
2007-03-14 01:38:39 -07:00
Junio C Hamano 36db2399e0 Merge branch 'pb/branch-track'
* pb/branch-track:
  Fix broken create_branch() in builtin-branch.
  git-branch, git-checkout: autosetup for remote branch tracking
2007-03-14 01:38:28 -07:00
Junio C Hamano 86952cdabd Documentation: add git-mergetool to the command list.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-14 01:29:26 -07:00
Junio C Hamano 4739cea566 Merge branch 'master' of git://repo.or.cz/git/mergetool
* 'master' of git://repo.or.cz/git/mergetool:
  Add git-mergetool to run an appropriate merge conflict resolution program
2007-03-14 01:13:39 -07:00
Eric Wong dee41f3e55 git-svn: add -l/--local command to "git svn rebase"
This avoids fetching new revisions remotely, and is usefuly
versus plain "git rebase" because the user does not have to
specify which remote head to rebase against.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-13 21:18:37 -07:00
Frank Lichtenheld ad0f8c9ea7 cvsserver: asciidoc formatting changes
Format some lists really as lists. Improves both html and man
output.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-13 21:16:05 -07:00
Theodore Ts'o c4b4a5af16 Add git-mergetool to run an appropriate merge conflict resolution program
The git-mergetool program can be used to automatically run an appropriate
merge resolution program to resolve merge conflicts.  It will automatically
run one of kdiff3, tkdiff, meld, xxdiff, or emacs emerge programs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-13 20:14:05 -04:00
Avi Kivity 4a62d3f5b2 git-send-email: configurable bcc and chain-reply-to
Chain-reply-to is a personal perference, and is unlikely to change from
patchset to patchset.  Similarly, bcc is likely to have the same values
every invocation is one likes to bcc oneself.

So, allow both to be set via configuration variables.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-11 23:53:57 -07:00
Junio C Hamano 240c77c714 Merge branch 'maint'
* maint:
  git-send-email: Document configuration options
  git-merge: warn when -m provided on a fast forward
2007-03-11 23:53:52 -07:00
Avi Kivity fc095242b1 git-send-email: Document configuration options
Wishing to implement an email aliases file, I found that they were already
implmented.  Document them for the next user.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-11 23:52:03 -07:00
Shawn O. Pearce f43cd49fb8 Change {pre,post}-receive hooks to use stdin
Sergey Vlasov, Andy Parkins and Alex Riesen all pointed out that it
is possible for a single invocation of receive-pack to be given more
refs than the OS might allow us to pass as command line parameters
to a single hook invocation.

We don't want to break these up into multiple invocations (like
xargs might do) as that makes it impossible for the pre-receive
hook to verify multiple related ref updates occur at the same time,
and it makes it harder for post-receive to send out a single batch
notification.

Instead we pass the reference data on a pipe connected to the
hook's stdin, supplying one ref per line to the hook.  This way a
single hook invocation can obtain an infinite amount of ref data,
without bumping into any operating system limits.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-11 22:56:03 -07:00
Paolo Bonzini 0746d19a82 git-branch, git-checkout: autosetup for remote branch tracking
In order to track and build on top of a branch 'topic' you track from
your upstream repository, you often would end up doing this sequence:

  git checkout -b mytopic origin/topic
  git config --add branch.mytopic.remote origin
  git config --add branch.mytopic.merge refs/heads/topic

This would first fork your own 'mytopic' branch from the 'topic'
branch you track from the 'origin' repository; then it would set up two
configuration variables so that 'git pull' without parameters does the
right thing while you are on your own 'mytopic' branch.

This commit adds a --track option to git-branch, so that "git
branch --track mytopic origin/topic" performs the latter two actions
when creating your 'mytopic' branch.

If the configuration variable branch.autosetupmerge is set to true, you
do not have to pass the --track option explicitly; further patches in
this series allow setting the variable with a "git remote add" option.
The configuration variable is off by default, and there is a --no-track
option to countermand it even if the variable is set.

Signed-off-by: Paolo Bonzini  <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-10 23:41:58 -08:00
Junio C Hamano 8a3fbdd9e6 Merge branch 'js/attach'
* js/attach:
  format-patch --attach: not folding some long headers.
  format-patch: add --inline option and make --attach a true attachment
2007-03-10 23:38:18 -08:00
Junio C Hamano ce4474b65d Merge branch 'pb/commit-i'
* pb/commit-i:
  git-commit: add a --interactive option
2007-03-10 23:00:38 -08:00
Junio C Hamano ed287ab7fa Merge branch 'maint'
* maint:
  git.el: Retrieve commit log information from .dotest directory.
  git.el: Avoid appending a signoff line that is already present.
  setup_git_directory_gently: fix off-by-one error
  user-manual: install user manual stylesheet with other web documents
  user-manual: fix rendering of history diagrams
  user-manual: fix missing colon in git-show example
  user-manual: fix inconsistent use of pull and merge
  user-manual: fix inconsistent example
  glossary: fix overoptimistic automatic linking of defined terms
  Documentation: s/seperator/separator/
  Adjust reflog filemode in shared repository
2007-03-10 22:07:26 -08:00
Junio C Hamano 8bb2b516d5 Merge branch 'maint' of git://linux-nfs.org/~bfields/git into maint
* 'maint' of git://linux-nfs.org/~bfields/git:
  user-manual: install user manual stylesheet with other web documents
  user-manual: fix rendering of history diagrams
  user-manual: fix missing colon in git-show example
  user-manual: fix inconsistent use of pull and merge
  user-manual: fix inconsistent example
  glossary: fix overoptimistic automatic linking of defined terms
2007-03-10 21:47:01 -08:00
J. Bruce Fields 8ce9d83b78 user-manual: install user manual stylesheet with other web documents
Install the stylesheet needed for the user manual.  This should solve
the problem of, e.g.,

	http://www.kernel.org/pub/software/scm/git/docs/user-manual.html

lacking a lot of formatting.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-10 23:05:02 -05:00
J. Bruce Fields 1dc71a9155 user-manual: fix rendering of history diagrams
Asciidoc appears to interpret a backslash at the end of a line as
escaping the end-of-line character, which screws up the display of
history diagrams like

 o--o--o
	\
	 o--...

The obvious fix (replacing "\" by "\\") doesn't work.  The only
workaround I've found is to include all such diagrams in a LiteralBlock.
Asciidoc claims that should be equivalent to a literal paragraph, so I
don't understand why the difference--perhaps it's an asciidoc bug.

Cc: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-10 23:05:01 -05:00
J. Bruce Fields ed4eb0d8f3 user-manual: fix missing colon in git-show example
There should be a colon in this git-show example.

Cc: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-10 23:05:01 -05:00
J. Bruce Fields fabbd8f6ca user-manual: fix inconsistent use of pull and merge
I used "git pull ." instead of "git merge" here without any explanation.
Stick instead to "git merge" for now (the equivalent pull syntax is
still covered in a later chapter).

Cc: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-10 23:05:01 -05:00
J. Bruce Fields 923642fe1b user-manual: fix inconsistent example
The configuration file fragment here is inconsistent with the text
above.  Thanks to Ramsay Jones for the correction.

Cc: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-10 23:05:01 -05:00
J. Bruce Fields c816eb1784 glossary: fix overoptimistic automatic linking of defined terms
The script sort_glossary.pl turns each use of "term" into a link to the
definition of "term".  To avoid mangling links like

	gitlink:git-term[1]

it doesn't replace any occurence of "term" preceded by "link:git-".
This fails for gitlink:git-symbolic-ref[1] when substituting for "ref".

So instead just refuse to replace anything preceded by a "-".
That could result in missing some opportunities, but that's a less
annoying error.

Actually I find the automatic substitution a little distracting; some
day maybe we should just run it once and commit the result, so it can
be hand-tuned.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-10 23:05:01 -05:00
Jeff King c4431d380c Documentation: s/seperator/separator/
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-09 17:27:43 -08:00
Paolo Bonzini 6cbf07efc5 git-commit: add a --interactive option
The --interactive option behaves like "git commit", except that
"git add --interactive" is executed before committing.  It is
incompatible with -a and -i.

Signed-off-by: Paolo Bonzini  <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-09 00:05:23 -08:00
Junio C Hamano bd1fc628b8 Merge branch 'js/config-rename'
* js/config-rename:
  git-config: document --rename-section, provide --remove-section
2007-03-08 00:53:38 -08:00
Junio C Hamano f45fa2a073 Merge branch 'master' of git://repo.or.cz/git/fastimport
* 'master' of git://repo.or.cz/git/fastimport:
  Allow fast-import frontends to reload the marks table
  Use atomic updates to the fast-import mark file
  Preallocate memory earlier in fast-import
2007-03-07 23:10:05 -08:00
Shawn O. Pearce e8438420bb Allow fast-import frontends to reload the marks table
I'm giving fast-import a lesson on how to reload the marks table
using the same format it outputs with --export-marks.  This way
a frontend can reload the marks table from a prior import, making
incremental imports less painful.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-03-07 18:07:26 -05:00
Shawn O. Pearce 05ef58ec1f Teach receive-pack to run pre-receive/post-receive hooks
Bill Lear pointed out that it is easy to send out notifications of
changes with the update hook, but successful execution of the update
hook does not necessarily mean that the ref was actually updated.
Lock contention on the ref or being unable to append to the reflog
may prevent the ref from being changed.  Sending out notifications
prior to the ref actually changing is very misleading.

To help this situation I am introducing two new hooks to the
receive-pack flow: pre-receive and post-receive.  These new hooks
are invoked only once per receive-pack execution and are passed
three arguments per ref (refname, old-sha1, new-sha1).

The new post-receive hook is ideal for sending out notifications,
as it has the complete list of all refnames that were successfully
updated as well as the old and new SHA-1 values.  This allows more
interesting notifications to be sent.  Multiple ref updates could
be easily summarized into one email, for example.

The new pre-receive hook is ideal for logging update attempts, as it
is run only once for the entire receive-pack operation.  It can also
be used to verify multiple updates happen at once, e.g. an update
to the `maint` head must also be accompained by a new annotated tag.

Lots of documentation improvements for receive-pack are included
in this change, as we want to make sure the new hooks are clearly
explained.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-07 15:03:33 -08:00
Paolo Bonzini d9cb5399ee git-archimport: allow remapping branch names
This patch adds support to archimport for remapping the branch
names to match those used in git more closely.  This is useful
for projects that migrate to git (as opposed to users that want
to use git on Arch-based projects).  For example, one can choose
an Arch branch name and call it "master".

The new command-line syntax works even if there is a colon in
a branch name, since only the part after the last colon is taken
to be the git name (git does not allow colons in branch names).

The new feature is implemented so that archives rotated every
year can also be remapped into a single git archive.

Signed-off-by: Paolo Bonzini  <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-07 10:30:22 -08:00
Junio C Hamano 99e6ac503b Merge branch 'master-for-junio' of git://repo.or.cz/git/fastimport; branch 'maint'
* 'master-for-junio' of git://repo.or.cz/git/fastimport:
  fast-import: Fail if a non-existant commit is used for merge
  fast-import: Avoid infinite loop after reset

* maint:
  Fix diff-options references in git-diff and git-format-patch
  Add definition of <commit-ish> to the main git man page.
  Begin SubmittingPatches with a check list
  fast-import: Fail if a non-existant commit is used for merge
  fast-import: Avoid infinite loop after reset
2007-03-05 21:23:46 -08:00
Brian Gernhardt b8105375ab Fix diff-options references in git-diff and git-format-patch
Most of the git-diff-* documentation used [<common diff options>]
instead of [--diff-options], so make that change in git-diff and
git-format-patch.

In addition, git-format-patch didn't include the meanings of the diff
options.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-05 21:21:39 -08:00
Theodore Ts'o 043d76050d Add definition of <commit-ish> to the main git man page.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-05 21:21:09 -08:00
Johannes Schindelin 56333bac66 Begin SubmittingPatches with a check list
It seems that some people prefer a short list to a long text. But even for
the latter group, a quick reminder list is useful. So, add a check list to
Documentation/SubmittingPatches of what to do to get your patch accepted.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-05 14:49:22 -08:00
Junio C Hamano 46d49472f4 Post 1.5.0.3 cleanup
Update the main git.html page to point at 1.5.0.3 documentation.
Update draft 1.5.1 release notes with what we have so far.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-04 22:49:10 -08:00
Johannes Schindelin c112f689c2 format-patch: add --inline option and make --attach a true attachment
The existing --attach option did not create a true "attachment"
but multipart/mixed with Content-Disposition: inline.  It should
have been with Content-Disposition: attachment.

Introduce --inline to add multipart/mixed that is inlined, and
make --attach to create an attachement.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-04 17:31:29 -08:00
Junio C Hamano 3ddad98b74 Merge branch 'js/fetch-progress' (early part)
* 'js/fetch-progress' (early part):
  Fixup no-progress for fetch & clone
  fetch & clone: do not output progress when not on a tty

Conflicts:

	git-fetch.sh
2007-03-04 17:31:21 -08:00
Junio C Hamano e6f9511343 Merge branch 'js/symlink'
* js/symlink:
  Tell multi-parent diff about core.symlinks.
  Handle core.symlinks=false case in merge-recursive.
  Add core.symlinks to mark filesystems that do not support symbolic links.
2007-03-04 17:31:09 -08:00
Junio C Hamano 784b11cd05 Merge branch 'maint'
* maint:
  GIT 1.5.0.3
  glossary: Add definitions for dangling and unreachable objects
  user-manual: more detailed merge discussion
  user-manual: how to replace commits older than most recent
  user-manual: insert earlier of mention content-addressable architecture
  user-manual: ensure generated manual references stylesheet
  user-manual: reset to ORIG_HEAD not HEAD to undo merge
  Documentation: mention module option to git-cvsimport
2007-03-04 17:24:49 -08:00
Junio C Hamano 7193db3685 GIT 1.5.0.3
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-04 17:20:38 -08:00
Yasushi SHOJI 2aa54fa872 glossary: Add definitions for dangling and unreachable objects
Define "dangling" and "unreachable" objects.  Modified from original
text proposed by Yasushi Shoji.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-04 16:47:33 -08:00
J. Bruce Fields ef561ac738 user-manual: more detailed merge discussion
Add more details on conflict, including brief discussion of file stages.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-04 16:47:32 -08:00
J. Bruce Fields 365aa19919 user-manual: how to replace commits older than most recent
"Modifying" an old commit by checking it out, --amend'ing it, then
rebasing on top of it, is a slightly cumbersome technique, but I've
found it useful frequently enough to make it seem worth documenting.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-04 16:47:32 -08:00