Commit graph

1559 commits

Author SHA1 Message Date
Eric Wong 07a1c95045 git-svn: get rid of additional fetch-arguments
It's not really useful anymore now that we have a better
--follow-parent for the valid cases.  Any other use
of it is not valid.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-02-23 00:57:09 -08:00
Johannes Schindelin 2e0afafebd Add git-bundle: move objects and references by archive
Some workflows require use of repositories on machines that cannot be
connected, preventing use of git-fetch / git-push to transport objects and
references between the repositories.

git-bundle provides an alternate transport mechanism, effectively allowing
git-fetch and git-pull to operate using sneakernet transport. `git-bundle
create` allows the user to create a bundle containing one or more branches
or tags, but with specified basis assumed to exist on the target
repository. At the receiving end, git-bundle acts like git-fetch-pack,
allowing the user to invoke git-fetch or git-pull using the bundle file as
the URL. git-fetch and git-ls-remote determine they have a bundle URL by
checking that the URL points to a file, but are otherwise unchanged in
operation with bundles.

The original patch was done by Mark Levedahl <mdl123@verizon.net>.

It was updated to make git-bundle a builtin, and get rid of the tar
format: now, the first line is supposed to say "# v2 git bundle", the next
lines either contain a prerequisite ("-" followed by the hash of the
needed commit), or a ref (the hash of a commit, followed by the name of
the ref), and finally the pack. As a result, the bundle argument can be
"-" now.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-22 22:30:33 -08:00
Junio C Hamano e79cbbea9e Merge branch 'maint'
* maint:
  git-diff: fix combined diff
  Fix 'git commit -a' in a newly initialized repository
  Include git-gui credits file in dist.
  Document the new core.bare configuration option.
2007-02-22 21:27:37 -08:00
Johannes Schindelin e52a5de45a pretty-formats: add 'format:<string>'
With this patch,

$ git show -s \
	--pretty=format:'  Ze komit %h woss%n  dunn buy ze great %an'

shows something like

  Ze komit 04c5c88 woss
  dunn buy ze great Junio C Hamano

The supported placeholders are:

	'%H': commit hash
	'%h': abbreviated commit hash
	'%T': tree hash
	'%t': abbreviated tree hash
	'%P': parent hashes
	'%p': abbreviated parent hashes
	'%an': author name
	'%ae': author email
	'%ad': author date
	'%aD': author date, RFC2822 style
	'%ar': author date, relative
	'%at': author date, UNIX timestamp
	'%cn': committer name
	'%ce': committer email
	'%cd': committer date
	'%cD': committer date, RFC2822 style
	'%cr': committer date, relative
	'%ct': committer date, UNIX timestamp
	'%e': encoding
	'%s': subject
	'%b': body
	'%Cred': switch color to red
	'%Cgreen': switch color to green
	'%Cblue': switch color to blue
	'%Creset': reset color
	'%n': newline

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-22 21:03:41 -08:00
Johannes Schindelin d516c2d119 Teach git-diff-files the new option --no-index
With this flag and given two paths, git-diff-files behaves as a GNU diff
lookalike (plus the git goodies like --check, colour, etc.).  This flag
is also available in git-diff.  It also works outside of a git repository.

In addition, if git-diff{,-files} is called without revision or stage
parameter, and with exactly two paths at least one of which is not tracked,
the default is --no-index.

So, you can now say

	git diff /etc/inittab /etc/fstab

and it actually works!

This also unifies the duplicated argument parsing between cmd_diff_files()
and builtin_diff_files().

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-22 20:59:55 -08:00
Shawn O. Pearce e4a15f40bc Document the new core.bare configuration option.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-21 16:39:09 -08:00
Theodore Ts'o 1918278ea1 Allow git-remote to update named groups of remotes
In response to a feature request from Shawn Pearce, this patch allows
a user to update a named group of remotes by using "git remote update
<group>", where the group is defined in the config file by
remotes.<group>.  The default if the named group is not specified is
now fetched group remotes.default, instead of remote.fetch, which is
what had been previously used.

In addition, if remotes.default is not defined, all remotes defined in
the config file will be used, as before, but there is now also
possible to request that a particular repository to be skipped by
default by using the boolean configuration parameter
remote.<name>.skipDefaultUpdate.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20 23:58:39 -08:00
Simon 'corecode' Schubert 4a6b9bb60a Allow passing of an alternative CVSROOT via -d.
This is necessary if using CVS in an asymmetric fashion, i.e. when the
CVSROOT you are checking out from differs from the CVSROOT you have to
commit to.

Signed-off-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20 23:58:27 -08:00
Junio C Hamano a53b12c3a2 Link 1.5.0.1 documentation from the main page.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20 00:44:35 -08:00
Johannes Schindelin 32043c9f8c config: read system-wide defaults from /etc/gitconfig
The settings in /etc/gitconfig can be overridden in ~/.gitconfig,
which in turn can be overridden in .git/config.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-19 23:05:16 -08:00
Johannes Schindelin 83a5ad6126 fetch & clone: do not output progress when not on a tty
This adds the option "--no-progress" to fetch-pack and upload-pack,
and makes fetch and clone pass this option when stdout is not a tty.

While at documenting that option, also document --strict and --timeout
options for upload-pack.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-19 19:20:05 -08:00
Theodore Ts'o 1e592d65b5 Teach git-remote to update existing remotes by fetching from them
This allows users to use the command "git remote update" to update all
remotes that are being tracked in the repository.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-19 18:34:33 -08:00
Junio C Hamano 2b2b892e36 Merge branch 'maint'
* maint:
  Obey NO_C99_FORMAT in fast-import.c.
  Add a compat/strtoumax.c for Solaris 8.
  git-clone: Sync documentation to usage note.
2007-02-19 18:29:41 -08:00
Christian Schlotter f496454e0f git-clone: Sync documentation to usage note.
Documentation advertises the new `--depth <n>' parameter with an equal
sign, while the usage notes (shown after `git-clone --help') do not.  If I
understood git-clone's source code correctly, the version without the
equal sign is correct, which is why this patch syncs documentation to the
usage note.

Signed-off-by: Christian Schlotter <schlotter@users.sourceforge.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-19 18:14:29 -08:00
Junio C Hamano f5a9264769 Merge branch 'maint'
* maint:
  GIT 1.5.0.1
  Documentation/i18n.txt: it is i18n.commitencoding not core.commitencoding
  Read the config in rev-list

Conflicts:

	RelNotes
2007-02-18 18:45:52 -08:00
Junio C Hamano 4bc94d2892 GIT 1.5.0.1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-18 16:18:43 -08:00
Fredrik Kuivinen 38eb9329ba Documentation/i18n.txt: it is i18n.commitencoding not core.commitencoding
Similarly for i18n.logoutputencoding.

Signed-off-by: Fredrik Kuivinen <frekui@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-18 15:58:20 -08:00
Junio C Hamano b758120144 Update draft release notes for 1.5.1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-17 16:18:14 -08:00
Junio C Hamano 69bc0e22d3 Merge branch 'maint'
* maint:
  Update draft release notes for 1.5.0.1
  Convert update-index references in docs to add.
  Attempt to improve git-rebase lead-in description.
  Do not take mode bits from index after type change.
  git-blame: prevent argument parsing segfault
  Make gitk save and restore window pane position on Linux and Cygwin.
  Make gitk save and restore the user set window position.
  [PATCH] gitk: Use show-ref instead of ls-remote
  [PATCH] Make gitk work reasonably well on Cygwin.
  [PATCH] gitk - remove trailing whitespace from a few lines.
  Change git repo-config to git config
2007-02-17 16:16:48 -08:00
Junio C Hamano 21b4875a51 Update draft release notes for 1.5.0.1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-17 16:15:22 -08:00
Johannes Schindelin 2afc29aa84 name-rev: introduce the --refs=<pattern> option
Instead of (or, in addition to) --tags, to use only tags for naming,
you can now use --refs=<pattern> to specify a shell glob pattern
which the refs must match to be used for naming.

Example:

	$ git name-rev --refs=*v1* 33db5f4d
	33db5f4d tags/v1.0rc1^0~1593

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-17 11:26:49 -08:00
Shawn O. Pearce d7f078b8b9 Convert update-index references in docs to add.
Since `git add` is the approved porcelain for an end-user to invoke
when they want to manipulate the index, porcelain documentation
should steer the user to this command rather than the pure plumbing
update-index.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-17 10:20:27 -08:00
Shawn O. Pearce 5ca2db5376 Attempt to improve git-rebase lead-in description.
It was mentioned on #git this morning that the lead-in description
of git-rebase is very confusing.  Too many branch this and branch
that in a very short run of text.

This new description attempts to walk the user through the command
syntax, while also describing exactly what git-rebase is doing to
their repository.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-17 10:08:21 -08:00
Junio C Hamano 78e90f89e3 Merge branch 'maint'
* maint:
  GIT-VERSION-FILE: check ./version first.
  sha1_file.c: Round the mmap offset to half the window size.
  Make sure packedgitwindowsize is multiple of (pagesize * 2)
  Add RelNotes 1.5.0.1
  Still updating 1.5.0 release notes.
  git-daemon: Avoid leaking the listening sockets into child processes.
  Clarify two backward incompatible repository options.
2007-02-14 15:25:53 -08:00
Junio C Hamano bd07326dcd Add RelNotes 1.5.0.1
In the same spirit as commit 6fc66686, let's keep notes as we fix
things.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 11:05:11 -08:00
Junio C Hamano 37b73cf97c Still updating 1.5.0 release notes.
In cruft removal section we had a cruft we needed to remove.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 10:55:24 -08:00
Junio C Hamano 958545c5a1 Clarify two backward incompatible repository options.
It was unclear if the backward compatible features were disabled
or the configuration variables that controls them were set to
false by default from the description.  Obviously we meant the
former, but the problem was made worse by the fact that one
configuration variable breaks compatibility when set to true and
the other one breaks it when set to false.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 01:50:28 -08:00
Junio C Hamano 6fc6668625 Add RelNotes 1.5.1
Instead of running around listing the changes near the release,
let's keep things nicely organized by summarizing the changes as
we merge things to the 'master' branch.

I haven't decided how well this will go with people's patch
submission procedure yet --- we'll play it by the ear and see
what happens.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 00:46:52 -08:00
Junio C Hamano a44a0c9966 Document --ignore-space-at-eol option.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 00:41:32 -08:00
Junio C Hamano ddfff26651 Merge branch 'maint'
* maint:
  Makefile: update check-docs target
  cmd-list: add git-remote
  Documentation: Drop full-stop from git-fast-import title.
  Minor corrections to release notes
2007-02-13 22:48:32 -08:00
Junio C Hamano 727d38d757 cmd-list: add git-remote
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 22:42:51 -08:00
Junio C Hamano 7a33631f78 Documentation: Drop full-stop from git-fast-import title.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 22:32:36 -08:00
Nicolas Pitre a989a5ef2c Minor corrections to release notes
Update section about warning when leaving a detached head.

Also fix a few indentations that weren't like the rest of the file.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 20:58:56 -08:00
Junio C Hamano c230390b47 Merge branch 'js/reverse'
* js/reverse:
  Teach revision machinery about --reverse
2007-02-13 19:20:06 -08:00
Junio C Hamano f8f2aaa172 Merge branch 'jc/deprecate'
As previously announced, diff-stages and resolve are now gone.
2007-02-13 16:45:40 -08:00
Junio C Hamano 6132bd5cac Add link to v1.5.0 documentation.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 16:43:24 -08:00
Junio C Hamano 26cfcfbff4 Add release notes to the distribution.
This also adds a hook in the Makefile I can use to automatically
include pointers to documentation for older releases when updating
the pages at http://kernel.org/pub/software/scm/git/docs/.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 15:15:05 -08:00
Junio C Hamano cec8d146fc Documentation: Moving out of detached HEAD does not warn anymore.
The documentation still talked about the unnecessary 'safety'
in git-checkout.

Pointed out by Matthias Lederhofer.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 10:12:37 -08:00
Johannes Schindelin c2120e5e4b git-gc: run pack-refs by default unless the repo is bare
The config variable gc.packrefs is tristate now: "true", "false"
and "notbare", where "notbare" is the default.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 09:19:34 -08:00
Pavel Roskin ccf5aa8dd3 Clarify that git-update-server-info should be run for every git-push
The old text suggested that git-update-server-info only needs to be run
if new tags or branches are created, but not for new commits.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-12 22:00:45 -08:00
Junio C Hamano 4cc41a16c1 Remove git-diff-stages.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-12 19:33:03 -08:00
Junio C Hamano 207dfa0791 Remove git-resolve.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-12 19:33:03 -08:00
Matthias Lederhofer 1e8b0d486e git merge documentation: -m is optional
Changed -m=<msg> to -m <msg> too.

Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-12 19:19:45 -08:00
Shawn O. Pearce ea5e370aa9 fast-import: Support reusing 'from' and brown paper bag fix reset.
It was suggested on the mailing list that being able to use `from`
in any commit to reset the current branch is useful in some types of
importers, such as a darcs importer.

We originally did not permit resetting an existing branch with a
new `from` command during a `commit` command, but this restriction
was only to help debug the hacked up cvs2svn that Jon Smirl was
developing in parallel with git-fast-import.  It is probably more
of a problem to disallow it than to allow it.  So now we permit a
`from` during any `commit`.

While making the changes required to permit multiple `from`
commands on the same branch, I discovered we no longer needed the
last_commit field to be set to 0 during a reset, so that was removed.
(Reset was originally setting the field to 0 to signal cmd_from()
that it was OK to execute on the branch.)

While poking around in this section of fast-import I also realized
the `reset` command was not working as intended if the corresponding
`from` command was omitted (as allowed by the BNF grammar and the
code).  If `from` was omitted we cleared out the tree but we left
the tree SHA-1 and parent commit SHA-1 intact.  This is not what
the user intended in this case.  Instead they would be trying to
reset the branch to have no parent and to have no tree, making the
branch look new-born during the next commit.  We now clear these
SHA-1 values during `reset`, ensuring the branch looks new-born if
`from` does not get supplied.

New test cases for these were also added.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-12 12:17:31 -05:00
Junio C Hamano 4853534e18 Add discussion section to git-tag documentation.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-11 22:29:12 -08:00
Junio C Hamano 2092a1fefd Teach git-am to pass -p option down to git-apply
This is originally from Andy Parkins whose patch used --patchdepth; let's
use -p which is more in line with the underlying git-apply.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-11 22:05:36 -08:00
Junio C Hamano c5c3fc9851 Documentation: git-rebase -C<n>
Replace -CNUM in Synopsis section with -C<n> to make it consistent with
the description text.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-11 22:03:55 -08:00
Junio C Hamano b578e509d3 Merge branch 'master' of git://repo.or.cz/git/fastimport
* 'master' of git://repo.or.cz/git/fastimport:
  bash: Hide git-fast-import.
  fast-import: Add tip about importing renames.
  fast-import: Hide the pack boundary commits by default.
2007-02-11 20:34:57 -08:00
Shawn O. Pearce c73461567e fast-import: Add tip about importing renames.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-11 19:50:50 -05:00
Shawn O. Pearce bdf1c06dc1 fast-import: Hide the pack boundary commits by default.
Most users don't need the pack boundary information that fast-import
was printing to standard output, especially if they were calling
it with --quiet.

Those users who do want this information probably want it captured
so they can go back and use it to repack the imported repository.
So dumping the boundary commits to a log file makes more sense then
printing them to standard output.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-11 19:45:56 -05:00
Michael S. Tsirkin d414461295 Document that git-am can read standard input.
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-11 14:07:47 -08:00
Dotan Barak 1187d7564d Make it easier to override path to asciidoc command
Allow setting the path of asciidoc in only one place when creating
the documentation.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-11 12:44:09 -08:00
Mukund b4f020c5d0 Fixed some typos in git-repack docs
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-10 22:48:57 -08:00
Theodore Ts'o dfd42a3c62 Allow aliases to expand to shell commands
If the alias expansion is prefixed with an exclamation point, treat
it as a shell command which is run using system(3).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-10 22:46:34 -08:00
Junio C Hamano 02f571c73b git-fetch: document automatic tag following.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09 15:41:35 -08:00
Junio C Hamano 9e2586ff2f Documentation/git-pull: describe default behaviour and config interactions
The way 'git pull' without explicit parameters work were not
explained well in any existing documentation.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-08 23:35:43 -08:00
Junio C Hamano 05b07ab963 Merge branch 'master' of git://repo.or.cz/git/fastimport
* 'master' of git://repo.or.cz/git/fastimport:
  tar archive frontend for fast-import.
  Correct spelling of fast-import in docs.
  Correct some language in fast-import documentation.
  Correct ^0 asciidoc syntax in fast-import docs.
2007-02-08 15:47:08 -08:00
Linus Torvalds cf39f54efc git reflog show
It makes "git reflog [show]" act as

	git log -g --pretty=oneline --abbrev-cmit

and is fairly straightforward. So you can just write

	git reflog

or

	git reflog show

and it will show you the reflog in a nice format.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-08 15:35:24 -08:00
Michael S. Tsirkin 67dad687ad add -C[NUM] to git-am
Add -C[NUM] to git-am and git-rebase so that patches can be applied even
if context has changed a bit.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-08 15:23:52 -08:00
Michael S. Tsirkin 66e788bc7f Update git-log and git-show documentation
Point at where the options not so frequently used are found.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-08 15:22:21 -08:00
Shawn O. Pearce 882227f117 Correct spelling of fast-import in docs.
Its spelled 'fast-import', not 'gfi'.  Linus and Dscho have both
recently pointed this out to me on the mailing list.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-08 13:49:06 -05:00
Shawn O. Pearce f842fdb01d Correct some language in fast-import documentation.
Minor documentation improvements, as suggested on the Git mailing
list by Horst H. von Brand and Karl Hasselström.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-08 01:54:42 -05:00
Shawn O. Pearce 209f129857 Correct ^0 asciidoc syntax in fast-import docs.
I wrote this documentation with asciidoc 7.1.2, but apparently
asciidoc 8 assumes ^ means superscript.  The solution was already
documented in rev-parse's manpage and is to use {caret} instead.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-08 01:35:37 -05:00
Junio C Hamano 81f915e7f1 Documentation: Add gfi to the main command list.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-07 14:30:47 -08:00
Junio C Hamano 302da67472 Merge branch 'master' of git://repo.or.cz/git/fastimport
* 'master' of git://repo.or.cz/git/fastimport:
  Add a Tips and Tricks section to fast-import's manual.
  Don't crash fast-import if the marks cannot be exported.
  Dump all refs and marks during a checkpoint in fast-import.
  Teach fast-import how to sit quietly in the corner.
  Teach fast-import how to clear the internal branch content.
  Minor timestamp related documentation corrections for fast-import.
2007-02-07 08:39:16 -08:00
Shawn O. Pearce bdd9f4240f Add a Tips and Tricks section to fast-import's manual.
There has been some informative lessons learned in the gfi user
community, and these really should be written down and documented
for future generations of frontend developers.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-07 03:49:08 -05:00
Michael 451fd65a8e Documentation: add KMail in SubmittingPatches
Signed-off-by: Michael <barra_cuda@katamail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-07 00:33:38 -08:00
Shawn O. Pearce 820b931012 Dump all refs and marks during a checkpoint in fast-import.
If the frontend asks us to checkpoint (via the explicit checkpoint
command) its probably because they are afraid the current import
will crash/fail/whatever and want to make sure they can pickup from
the last checkpoint.  To do that sort of recovery, we will need the
current tip of every branch and tag available at the next startup.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-07 02:42:44 -05:00
Shawn O. Pearce c499d76849 Teach fast-import how to sit quietly in the corner.
Often users will be running fast-import from within a larger frontend
process, and this may be a frequent periodic tool such as a future
edition of `git-svn fetch`.  We don't want to bombard users with our
large stats output if they won't be interested in it, so `--quiet`
is now an option to make gfi be more silent.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-07 02:19:31 -05:00
Shawn O. Pearce 825769a8fe Teach fast-import how to clear the internal branch content.
Some frontends may not be able to (easily) keep track of which files
are included in the branch, and which aren't.  Performing this
tracking can be tedious and error prone for the frontend to do,
especially if its foreign data source cannot supply the changed
path list on a per-commit basis.

fast-import now allows a frontend to request that a branch's tree
be wiped clean (reset to the empty tree) at the start of a commit,
allowing the frontend to feed in all paths which belong on the branch.

This is ideal for a tar-file importer frontend, for example, as
the frontend just needs to reformat the tar data stream into a gfi
data stream, which may be something a few Perl regexps can take
care of. :)

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-07 02:03:03 -05:00
Shawn O. Pearce 9b92c82fde Minor timestamp related documentation corrections for fast-import.
As discussed on the mailing list, the documentation used here was
not quite accurate.  Improve upon it.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-07 00:51:58 -05:00
Junio C Hamano 740afd9613 Add deprecation notices.
Schedule git-diff-stages and git-resolve to be removed by 1.5.1

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-06 21:25:33 -08:00
Junio C Hamano 41dc7e0044 Merge branch 'master' of git://repo.or.cz/git/fastimport
* 'master' of git://repo.or.cz/git/fastimport: (81 commits)
  S_IFLNK != 0140000
  Don't do non-fastforward updates in fast-import.
  Support RFC 2822 date parsing in fast-import.
  Minor fast-import documentation corrections.
  Remove unnecessary null pointer checks in fast-import.
  Correct fast-import timezone documentation.
  Correct minor style issue in fast-import.
  Correct compiler warnings in fast-import.
  Remove --branch-log from fast-import.
  Initial draft of fast-import documentation.
  Don't support shell-quoted refnames in fast-import.
  Reduce memory usage of fast-import.
  Include checkpoint command in the BNF.
  Accept 'inline' file data in fast-import commit structure.
  Reduce value duplication in t9300-fast-import.
  Create test case for fast-import.
  Support delimited data regions in fast-import.
  Remove unnecessary options from fast-import.
  Use fixed-size integers when writing out the index in fast-import.
  Always use struct pack_header for pack header in fast-import.
  ...
2007-02-06 19:33:22 -08:00
Junio C Hamano 9981b6d915 S_IFLNK != 0140000
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-06 16:08:30 -05:00
Shawn O. Pearce 7073e69e38 Don't do non-fastforward updates in fast-import.
If fast-import is being used to update an existing branch of
a repository, the user may not want to lose commits if another
process updates the same ref at the same time.  For example, the
user might be using fast-import to make just one or two commits
against a live branch.

We now perform a fast-forward check during the ref updating process.
If updating a branch would cause commits in that branch to be lost,
we skip over it and display the new SHA1 to standard error.

This new default behavior can be overridden with `--force`, like
git-push and git-fetch.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-06 16:08:06 -05:00
Shawn O. Pearce 63e0c8b364 Support RFC 2822 date parsing in fast-import.
Since some frontends may be working with source material where
the dates are only readily available as RFC 2822 strings, it is
more friendly if fast-import exposes Git's parse_date() function
to handle the conversion.  This way the frontend doesn't need
to perform the parsing itself.

The new --date-format option to fast-import can be used by a
frontend to select which format it will supply date strings in.
The default is the standard `raw` Git format, which fast-import
has always supported.  Format rfc2822 can be used to activate the
parse_date() function instead.

Because fast-import could also be useful for creating new, current
commits, the format `now` is also supported to generate the current
system timestamp.  The implementation of `now` is a trivial call
to datestamp(), but is actually a whole whopping 3 lines so that
fast-import can verify the frontend really meant `now`.

As part of this change I have added validation of the `raw` date
format.  Prior to this change fast-import would accept anything
in a `committer` command, even if it was seriously malformed.
Now fast-import requires the '> ' near the end of the string and
verifies the timestamp is formatted properly.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-06 14:58:30 -05:00
Shawn O. Pearce ef94edb53c Minor fast-import documentation corrections.
Corrected a couple of header markup lines which were shorter than the
actual header, and made the `data` commands two formats into a named
list, which matches how we document the two formats of the `M` command
within a commit.

Also tried to simplify the language about our decimal integer format;
Linus pointed out I was probably being too specific at the cost of
reduced readability.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-06 12:35:02 -05:00
Shawn O. Pearce c74ba3d344 Correct fast-import timezone documentation.
Andy Parkins and Linus Torvalds both noticed that the description
of the timezone was incorrect.  Its not expressed in minutes.
Its more like "hhmm", where "hh" is the number of hours and "mm"
is the number of minutes shifted from GMT/UTC.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-06 11:59:11 -05:00
Shawn O. Pearce 0b868e0240 Remove --branch-log from fast-import.
The --branch-log option and its associated code hasn't been used in
several months, as its not really very useful for debugging fast-import
or a frontend.  I don't plan on supporting it in this state long-term,
so I'm killing it now before it gets distributed to a wider audience.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-06 00:15:37 -05:00
Shawn O. Pearce 6e411d2044 Initial draft of fast-import documentation.
This is a first pass at the manpage for git-fast-import.

I have tried to cover the input format in extreme detail, creating a
reference which is more detailed than the BNF grammar appearing in
the header of fast-import.c.  I have also covered some details about
gfi's performance and memory utilization, as well as the average
learning curve required to create a gfi frontend application (as it
is far lower than it might appear on first glance).

The documentation still lacks real example input streams, which may
turn out to be difficult to format in asciidoc due to the blank lines
which carry meaning within the format.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-05 21:09:25 -05:00
Junio C Hamano 06e75a7237 blame: document --contents option
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-05 15:04:01 -08:00
Simon 'corecode' Schubert ca28370a35 Allow forcing of a parent commit, even if the parent is not a direct one.
This can be used to compress multiple changesets into one, for example
like

	git cvsexportcommit -P cvshead mybranch

without having to do so in git first.

Signed-off-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-05 14:10:01 -08:00
Stelian Pop 98d47d4ccf Add hg-to-git conversion utility.
hg-to-git.py  is able to convert a Mercurial repository into a git one,
and preserves the branches in the process (unlike tailor)

hg-to-git.py can probably be greatly improved (it's a rather crude
combination of shell and python) but it does already work quite well for
me. Features:
	- supports incremental conversion
	  (for keeping a git repo in sync with a hg one)
	- supports hg branches
	- converts hg tags

Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-05 13:52:45 -08:00
Shawn O. Pearce ea81fcc576 Show an example of deleting commits with git-rebase.
This particular use of git-rebase to remove a single commit or a
range of commits from the history of a branch recently came up on
the mailing list.  Documenting the example should help other users
arrive at the same solution on their own.

It also was not obvious to the newcomer that git-rebase is able to
accept any commit for --onto <newbase> and <upstream>.  We should
at least minimally document this, as much of the language in
git-rebase's manpage refers to 'branch' rather than 'committish'.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-05 13:48:59 -08:00
Andy Parkins 69057cf39f git-for-each-ref doesn't return "the bit after $GIT_DIR/refs"
The documentation for git-for-each-ref said that the refname variable
would return "the part after $GIT_DIR/refs/", which isn't true.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-05 13:48:59 -08:00
Junio C Hamano d1f289c5aa Merge branch 'np/dreflog'
* np/dreflog:
  show-branch -g: default to the current branch.
  Let git-checkout always drop any detached head
  Enable HEAD@{...} and make it independent from the current branch
  scan reflogs independently from refs
  add reflog when moving HEAD to a new branch
  create_symref(): do not assume pathname from git_path() persists long enough
  add logref support to git-symbolic-ref
  move create_symref() past log_ref_write()
  add reflog entries for HEAD when detached
  enable separate reflog for HEAD
  lock_ref_sha1_basic(): remember the original name of a ref when resolving it
  make reflog filename independent from struct ref_lock
2007-02-04 16:54:47 -08:00
Robin Rosenberg 6e2e1cfb81 Why is it bad to rewind a branch that has already been pushed out?
Mention git-revert as an alternative to git-reset to revert changes.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-04 11:43:45 -08:00
Junio C Hamano 632ac9fd12 show-branch -g: default to the current branch.
Now we have a separate reflog on HEAD, show-branch -g without an explicit
parameter defaults to the current branch, or HEAD when it is detached
from branches.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-03 23:34:22 -08:00
Junio C Hamano d77ee72662 Merge branch 'master' into np/dreflog
This is to resolve conflicts early in preparation for possible
inclusion of "reflog on detached HEAD" series by Nico, as having
it in 1.5.0 would really help us remove confusion between
detached and attached states.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-03 23:05:34 -08:00
Pavel Roskin 3dff5379bf Assorted typo fixes
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-03 21:49:54 -08:00
Shawn O. Pearce 0f39087589 Cleanup subcommand documentation for git-remote.
Jakub Narebski pointed out the positional notation in git-remote's
documentation was very confusing, especially now that we have 3
supported subcommands.  Instead of referring to subcommands by
position, refer to them by name.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-03 21:49:49 -08:00
Junio C Hamano a9d1836b10 Why is it bad to rewind a branch that has already been pushed out?
I was reading the tutorial and noticed that we say this:

    Also, don't use "git reset" on a publicly-visible branch that
    other developers pull from, as git will be confused by history
    that disappears in this way.

I do not think this is a good explanation.  For example, if we
do this:

(1) I build a series and push it out.

	---o---o---o---j

(2) Alice clones from me, and builds two commits on top of it.

	---o---o---o---j---a---a

(3) I rewind one and build a few, and push them out.

	---o---o---o...j
                    \
                     h---h---h---h

(4) Alice pulls from me again:

	---o---o---o---j---a---a---*
                    \             /
                     h---h---h---h

Contrary to the description, git will happily have Alice merge
between the two branches, and never gets confused.

Maybe I did not want to have 'j' because it was an incomplete
solution to some problem, and Alice may have fixed it up with
her changes, while I abandoned that approach I started with 'j',
and worked on something completely unrelated in the four 'h'
commits.  In such a case, the merge Alice would make would be
very sensible, and after she makes the merge if I pull from her,
the world will be perfect.  I started something with 'j' and
dropped the ball, Alice picked it up and perfected it while I
went on to work on something else with 'h'.  This would be a
perfect example of distributed parallel collaboration.  There is
nothing confused about it.

The case the rewinding becomes problematic is if the work done
in 'h' tries to solve the same problem as 'j' tried to solve in
a different way.  Then the merge forced on Alice would make her
pick between my previous attempt with her fixups (j+a) and my
second attempt (h).  If 'a' commits were to fix up what 'j'
started, presumably Alice already studied and knows enough about
the problem so she should be able to make an informed decision
to pick between what 'j+a' and 'h' do.

A lot worse case is if Alice's work is not at all related to
what 'j' wanted to do (she did not mean to pick up from where I
left off -- she just wanted to work on something different).
Then she would not be familiar enough with what 'j' and 'h'
tried to achieve, and I'd be forcing her to pick between the
two.  Of course if she can make the right decision, then again
that is a perfect example of distributed collaboration, but that
does not change the fact that I'd be forcing her to clean up my
mess.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-03 16:30:52 -08:00
Junio C Hamano 505739f6c0 core-tutorial: http reference link fix
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-02 23:17:34 -08:00
Junio C Hamano bf3478de97 Tutorial-2: Adjust git-status output to recent reality.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-02 22:55:07 -08:00
Junio C Hamano 953202a3fd Tutorial: fix asciidoc formatting of "git add" section.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-02 22:19:17 -08:00
Andy Parkins 0d18e41e00 doc: hooks.txt said post-commit default sends an email, it doesn't
The default post-commit hook is actually empty; it is the update hook
that sends an email.  This patch corrects hooks.txt to reflect that.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-02 21:18:59 -08:00
Mike Coleman aacd404e77 Fix some documentation typos and grammar
Also suggest user manual mention .gitignore.

Signed-off-by: Michael Coleman <tutufan@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-01 22:45:04 -08:00
Shawn O. Pearce 859607dfe0 Teach 'git remote' how to cleanup stale tracking branches.
Since it can be annoying to manually cleanup 40 tracking branches
which were removed by the remote system, 'git remote prune <n>'
can now be used to delete any tracking branches under <n> which
are no longer available on the remote system.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-01 22:06:36 -08:00
Johannes Schindelin 1e5db3075a Update the documentation for the new '@{...}' syntax
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-01 21:50:46 -08:00
Nicolas Pitre 6124aee5d9 add a quiet option to git-checkout
Those new messages are certainly nice, but there might be cases where
they are simply unwelcome, like when git-commit is used within scripts.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-01 21:36:47 -08:00
Junio C Hamano bfcd4ca3da Do not use hardcoded path to xhmtl.xsl to generate user's manual
It does not seem to need it either and gives an error on FC5 I use
at kernel.org to cut documentation tarballs, so remove it in the
meantime.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-31 15:41:45 -08:00
Junio C Hamano c0b4a003e4 git main documentation: point at the user's manual.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-31 14:53:51 -08:00
Junio C Hamano 9299c4f147 Merge branch 'master' of git://linux-nfs.org/~bfields/git
This is in the hope of giving JBF's user-manual wider exposure.
I am not very happy with trailing whitespaces in the new
document, but let's not worry too much about the formatting
issues for now, but concentrate more on the structure and the
contents.
2007-01-31 14:43:30 -08:00
Aneesh Kumar K.V 8933364da1 Update git-cat-file documentation
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-31 13:32:38 -08:00
Junio C Hamano 84a978f118 Documentation: "git-checkout <tree> <path>" takes any tree-ish
Especially, it is not limited to branch.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-31 13:30:54 -08:00
J. Bruce Fields 0b375ab0a5 user-manual: todo's
Update todo's.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-30 12:48:48 -05:00
J. Bruce Fields a8cd1402f0 user-manual: point to README for gitweb information
I'd like complete gitweb setup instructions some day, but for now just
refer to the gitweb README.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-30 12:43:36 -05:00
Junio C Hamano 036be17e0a Two small typofixes.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-29 02:18:53 -05:00
J. Bruce Fields d55ae921ce user-manual: SHA1 -> object name
Prefer "object name" to SHA1, at least in higher level documentation.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-29 02:16:45 -05:00
J. Bruce Fields 4a7979ca82 user-manual: document git-show-branch example
Document Junio's show-branch trick for finding out which tags are
descendents of a given comit.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-29 02:00:35 -05:00
J. Bruce Fields 9a241220fd user-manual: minor "TODO" updates
I still really want a section on interoperability with CVS, subversion,
etc., but I'm not getting around to it very fast, so just add this to
the TODO section for now.  And a few other minor todo updates.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-29 01:43:33 -05:00
J. Bruce Fields 1191ee1824 user-manual: rewrap a few long lines
Rewrap some long lines.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-29 01:33:55 -05:00
J. Bruce Fields 559e4d7a0d user-manual: reflogs, other recovery
Add a brief discussion of reflogs.  Also recovery of dangling commits
seems to fit in here, so move some of the discussion out of Linus's
email to here.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-29 01:31:35 -05:00
J. Bruce Fields 61b41790c4 user-manual: fix a header level
Oops.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-29 00:45:33 -05:00
J. Bruce Fields 988b27d3f5 user-manual: typo fix
Oops

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-29 00:33:57 -05:00
J. Bruce Fields fc90c536dc user-manual: add references to git-config man page
Direct editing of config files may be more natural for users than using
the git-config commandline; but we should still reference the
git-config man page when we describe such editing, so people know where
to go for details on the config file syntax and meanings of the
variables.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-29 00:17:51 -05:00
J. Bruce Fields 9d13bda3ff user-manual: repo-config -> config
Looks like we're going to allow git-config as the preferred alias to
git-repo-config, so let's document that instead.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-28 23:50:22 -05:00
J. Bruce Fields 04e50e9457 user-manual: fsck-objects -> fsck
There seems to be an agreement to rename fsck-objects to fsck.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-28 23:31:47 -05:00
J. Bruce Fields 21dcb3b7ab user-manual: git-fsck, dangling objects
Initial import of fsck and dangling objects discussion, mostly lifted from
an email from Linus.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-28 23:29:19 -05:00
Junio C Hamano df391b192d git-fsck-objects is now synonym to git-fsck
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-28 16:33:58 -08:00
Tom Prince e0d10e1c63 [PATCH] Rename git-repo-config to git-config.
Signed-off-by: Tom Prince <tom.prince@ualberta.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-28 16:16:53 -08:00
Shawn O. Pearce 5558e55c06 Teach for-each-ref about a little language called Tcl.
Love it or hate it, some people actually still program in Tcl.  Some
of those programs are meant for interfacing with Git.  Programs such as
gitk and git-gui.  It may be useful to have Tcl-safe output available
from for-each-ref, just like shell, Perl and Python already enjoy.

Thanks to Sergey Vlasov for pointing out the horrible flaws in the
first and second version of this patch, and steering me in the right
direction for Tcl value quoting.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-28 13:00:26 -08:00
Junio C Hamano 57e7a0a494 Document 'git-blame --incremental'
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-28 12:26:21 -08:00
Mark Wooding 4f193f20a3 Documentation/config.txt: Fix documentation of colour config tweaks.
* The description of valid colour specifications was rather
    incomplete, so fix it so that it actually describes colour specs as
    accepted by color_parse().

  * The list of colour items allowed in color.diff.BLAH was missing the
    `commit' and `whitespace' entries.

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-28 11:06:59 -08:00
Nicolas Pitre 8b5157e407 add logref support to git-symbolic-ref
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-28 02:16:46 -08:00
Junio C Hamano 1891261ed3 Update describe documentation.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-28 02:08:51 -08:00
Bill Lear 16507fcf0a Document --check option to git diff.
Signed-off-by: Bill Lear <rael@zopyra.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-27 13:46:59 -08:00
Andy Parkins d67778eccd Allow the tag signing key to be specified in the config file
I did this:

  $ git tag -s test-sign
  gpg: skipped "Andy Parkins <andyparkins@gmail.com>": secret key not available
  gpg: signing failed: secret key not available
  failed to sign the tag with GPG.

The problem is that I have used the comment field in my key's UID
definition.

  $ gpg --list-keys andy
  pub   1024D/4F712F6D 2003-08-14
  uid                  Andy Parkins (Google) <andyparkins@gmail.com>

So when git-tag looks for "Andy Parkins <andyparkins@gmail.com>";
obviously it's not going to be found.

There shouldn't be a requirement that I use the same form of my name in
my git repository and my gpg key - I might want to be formal (Andrew) in
my gpg key and informal (Andy) in the repository.  Further I might have
multiple keys in my keyring, and might want to use one that doesn't
match up with the address I use in commit messages.

This patch adds a configuration entry "user.signingkey" which, if
present, will be passed to the "-u" switch for gpg, allowing the tag
signing key to be overridden.  If the entry is not present, the fallback
is the original method, which means existing behaviour will continue
untouched.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-27 13:46:59 -08:00
J. Bruce Fields b181d57ff4 user-manual: reorganize fetch discussion, add internals, etc.
Keep git remote discussion in the first chapter, but postpone
lower-level git fetch usage (to fetch individual branches) till later.

Import a bunch of slightly modified text from the readme to give an
architectural overview at the end.

Add more discussion of history rewriting.

And a bunch of other miscellaneous changes....

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-27 01:12:19 -05:00
Junio C Hamano af67e91c39 Documentation: pack-refs --all vs default behaviour
Document the recommended way to prime a repository with tons of
references with 'pack-refs --all -prune'.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-26 00:02:51 -08:00
Linus Torvalds a9eefb3bfc Add dangling objects tips.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-25 22:03:37 -08:00
J. Bruce Fields 11e016a32c user-manual: stub discussion of fsck and reflog
Have some sort of recovery/reliability section that deals with reflog
and fsck.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-26 00:17:12 -05:00
Uwe Kleine-König 5dee29ac0f make --upload-pack option to git-fetch configurable
This introduces the config item remote.<name>.uploadpack to override the
default value (which is "git-upload-pack").

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 23:06:30 -08:00
Junio C Hamano e28714c527 Consolidate {receive,fetch}.unpackLimit
This allows transfer.unpackLimit to specify what these two
configuration variables want to set.

We would probably want to deprecate the two separate variables,
as I do not see much point in specifying them independently.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 18:08:02 -08:00
Junio C Hamano af7cf268f0 fetch-pack: remove --keep-auto and make it the default.
This makes git-fetch over git native protocol to automatically
decide to keep the downloaded pack if the fetch results in more
than 100 objects, just like receive-pack invoked by git-push
does.  This logic is disabled when --keep is explicitly given
from the command line, so that a very small clone still keeps
the downloaded pack as before.

The 100 threshold can be adjusted with fetch.unpacklimit
configuration.  We might want to introduce transfer.unpacklimit
to consolidate the two unpacklimit variables, which will be a
topic for the next patch.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 18:08:02 -08:00
Uwe Kleine-König 27dca07fb7 rename --exec to --upload-pack for fetch-pack and peek-remote
Just some option name disambiguation.  This is the counter part to
commit d23842fd which made a similar change for push and send-pack.

--exec continues to work.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 16:12:15 -08:00
Peter Eriksen 497171e765 Documentation: --amend cannot be combined with -c/-C/-F.
We used to get the following confusing error message:

    $ git commit --amend -a -m foo
    Option -m cannot be combined with -c/-C/-F

This is because --amend cannot be combined with -c/-C/-F, which makes
sense, because they try to handle the same log message in different ways.
So update the documentation to reflect this.

Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 15:32:52 -08:00
Jakub Narebski 191453f664 Documentation/config.txt: Correct info about subsection name
Contrary to variable values, in subsection names parsing character
escape codes (besides literal escaping of " as \", and \ as \\)
is not performed; subsection name cannot contain newlines.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 15:30:37 -08:00
Junio C Hamano eda95d9969 git-daemon documentation on enabling services.
Noticed by Franck Bui-Huu.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 15:29:07 -08:00
Johannes Schindelin 084ae0a7bd reflog inspection: introduce shortcut "-g"
A short-hand "-g" for "git log --walk-reflogs" and "git
show-branch --reflog" makes it easier to access the reflog
info.

[jc: added -g to show-branch for symmetry]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 15:13:47 -08:00
Jakub Narebski e136f33b5f Documentation/config.txt: Document config file syntax better
Separate part of Documentation/config.txt which deals with git config file
syntax into "Syntax" subsection, and expand it.  Add information about
subsections, boolean values, escaping and escape sequences in string
values, and continuing variable value on the next line.

Add also proxy settings to config file example to show example of
partially enclosed in double quotes string value.

Parts based on comments by Junio C Hamano, Johannes Schindelin,
config.c, and the smb.conf(5) man page.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22 12:54:02 -08:00
Junio C Hamano e3ff4b2447 git-gc: do not run git-prune by default.
git-prune is not safe when run uncontrolled in parallel while
other git operations are creating new objects.  To avoid
mistakes, do not run git-prune by default from git-gc.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-21 23:28:28 -08:00
Junio C Hamano 026aa93818 Revert "prune: --grace=time"
This reverts commit 9b088c4e39.

Protecting 'mature' objects does not make it any safer.  We should
admit that git-prune is inherently unsafe when run in parallel with
other operations without involving unwarranted locking overhead,
and with the latest git, even rebase and reset would not immediately
create crufts anyway.
2007-01-21 21:29:57 -08:00
Junio C Hamano 1bb914603a Documentation/tutorial-2: Fix interesting typo in an example.
Marco Candrian noticed that one cat-file example refers to a
blob object that is never used in the example sequence.

The bug is interesting in that the output from the botched
sample command is consistent with the incorrect blob object
name ;-).

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-21 21:24:49 -08:00
J. Bruce Fields 17217090cf user-manual: update git-gc discussion
It appears git-gc will no longer prune automatically, so we don't
need to tell people not to do other stuff while running it.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-21 23:03:36 -05:00
J. Bruce Fields f60b964249 user-manual: update references discussion
Since references may be packed, it's no longer as helpful to
introduce references as paths relative to .git.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-21 22:31:07 -05:00
J. Bruce Fields fe4b3e591b user-manual: clarify difference between tag and branch
Explain the difference (well, one of the differences) between a tag
and a branch.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-21 22:14:39 -05:00
J. Bruce Fields e4add70cd4 user-manual: minor quickstart reorganization
Move around some stuff in the quickstart, add "push" examples.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-21 22:02:34 -05:00
Johannes Schindelin 9c5e66e97d Teach revision machinery about --reverse
The option --reverse reverses the order of the commits.

[jc: with comments on rev_info.reverse from Simon 'corecode' Schubert.]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20 23:46:53 -08:00
Matthias Lederhofer 9b088c4e39 prune: --grace=time
This option gives grace period to objects that are unreachable
from the refs from getting pruned.

The default value is 24 hours and may be changed using
gc.prunegrace.

Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20 23:29:49 -08:00
Junio C Hamano 4d12a47123 Fix --walk-reflog with --pretty=oneline
Now, "git log --abbrev-commit --pretty=o --walk-reflogs HEAD" is
reasonably pleasant to use.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20 21:32:31 -08:00
Junio C Hamano 911cedc95c log --walk-reflog: documentation
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20 21:32:31 -08:00
Junio C Hamano 453c1e8575 git-tag -d: allow deleting multiple tags at once.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20 19:19:12 -08:00
Junio C Hamano 06f6228a90 Stop ignoring Documentation/README
We do not copy this file from elsewhere anymore.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20 19:10:26 -08:00
J. Bruce Fields ef89f701a0 user-manual: add "quick start" as chapter 1
Add a "quick start" guide, modelled after Mercurial's, as the
first chapter.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-20 21:41:48 -05:00
Junio C Hamano 76a44c5c0b show-branch --reflog: show the reflog message at the top.
This changes the output so the list at the top shows the reflog
message, along with their relative timestamps.

You can use --reflog=<n> to show <n> most recent log entries, or
use --reflog=<n>,<b> to show <n> entries going back from the
entry <b>.  <b> can be either a number (so --reflog=4,20 shows 4
records starting from @{20}) or a timestamp (e.g. --reflog='4,1 day').

Here is a sample output (with --list option):

  $ git show-branch --reflog=10 --list jc/show-reflog
    [jc/show-reflog@{0}] (3 minutes ago) commit (amend): show-branch --ref
    [jc/show-reflog@{1}] (5 minutes ago) reset HEAD^
    [jc/show-reflog@{2}] (14 minutes ago) commit: show-branch --reflog: sho
    [jc/show-reflog@{3}] (14 minutes ago) commit: show-branch --reflog: sho
    [jc/show-reflog@{4}] (18 minutes ago) commit (amend): Extend read_ref_a
    [jc/show-reflog@{5}] (18 minutes ago) commit (amend): Extend read_ref_a
    [jc/show-reflog@{6}] (18 minutes ago) commit (amend): Extend read_ref_a
    [jc/show-reflog@{7}] (18 minutes ago) am: read_ref_at(): allow retrievi
    [jc/show-reflog@{8}] (18 minutes ago) reset --hard HEAD~4
    [jc/show-reflog@{9}] (61 minutes ago) commit: show-branch --reflog: use

This shows what I did more cleanly:

  $ git show-branch --reflog=10 jc/show-reflog
  ! [jc/show-reflog@{0}] (3 minutes ago) commit (amend): show-branch --ref
   ! [jc/show-reflog@{1}] (5 minutes ago) reset HEAD^
    ! [jc/show-reflog@{2}] (14 minutes ago) commit: show-branch --reflog:
     ! [jc/show-reflog@{3}] (14 minutes ago) commit: show-branch --reflog:
      ! [jc/show-reflog@{4}] (18 minutes ago) commit (amend): Extend read_
       ! [jc/show-reflog@{5}] (18 minutes ago) commit (amend): Extend read
        ! [jc/show-reflog@{6}] (18 minutes ago) commit (amend): Extend rea
         ! [jc/show-reflog@{7}] (18 minutes ago) am: read_ref_at(): allow
          ! [jc/show-reflog@{8}] (18 minutes ago) reset --hard HEAD~4
           ! [jc/show-reflog@{9}] (61 minutes ago) commit: show-branch --r
  ----------
  +          [jc/show-reflog@{0}] show-branch --reflog: show the reflog
    +        [jc/show-reflog@{2}] show-branch --reflog: show the reflog
   +++       [jc/show-reflog@{1}] show-branch --reflog: show the reflog
  +++++      [jc/show-reflog@{4}] Extend read_ref_at() to be usable fro
       +     [jc/show-reflog@{5}] Extend read_ref_at() to be usable fro
        +    [jc/show-reflog@{6}] Extend read_ref_at() to be usable fro
         +   [jc/show-reflog@{7}] read_ref_at(): allow retrieving the r
           + [jc/show-reflog@{9}] show-branch --reflog: use updated rea
           + [jc/show-reflog@{9}^] read_ref_at(): allow reporting the c
           + [jc/show-reflog@{9}~2] show-branch --reflog: show the refl
           + [jc/show-reflog@{9}~3] read_ref_at(): allow retrieving the
  ++++++++++ [jc/show-reflog@{8}] dwim_ref(): Separate name-to-ref DWIM

At @{9}, I had a commit to complete 5 patch series, but I wanted
to consolidate two commits that enhances read_ref_at() into one
(they were @{9}^ and @{9}~3), and another two that touch show-branch
into one (@{9} and @{9}~2).

I first saved them with "format-patch -4", and then did a reset
at @{8}.  At @{7}, I applied one of them with "am", and then
used "git-apply" on the other one, and amended the commit at
@{6} (so @{6} and @{7} has the same parent).  I did not like the
log message, so I amended again at @{5}.

Then I cherry-picked @{9}~2 to create @{3} (the log message
shows that it needs to learn to set GIT_REFLOG_ACTION -- it uses
"git-commit" and the log entry is attributed for it).  Another
cherry-pick built @{2} out of @{9}, but what I wanted to do was
to squash these two into one, so I did a "reset HEAD^" at @{1}
and then made the final commit by amending what was at the top.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-19 17:57:53 -08:00
Uwe Kleine-König d23842fd53 rename --exec to --receive-pack for push and send-pack
For now it's just to get a more descriptive name.  Later we might update the
push protocol to run more than one program on the other end.  Moreover this
matches better the corresponding config option remote.<name>. receivepack.

--exec continues to work

Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-19 17:54:33 -08:00
Uwe Kleine-König 060aafc11f make --exec=... option to git-push configurable
Having to specify git push --exec=... is annoying if you cannot have
git-receivepack in your PATH on the remote side (or don't want to).

This introduces the config item remote.<name>.receivepack to override
the default value (which is "git-receive-pack").

Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-19 17:54:33 -08:00
Uwe Kleine-König 18bd8821ca Update documentation of fetch-pack, push and send-pack
add all supported options to Documentation/git-....txt and the usage strings.

Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-19 17:54:32 -08:00
Junio C Hamano 89bf207758 Documentation/git.txt: command re-classification
This adds two new classes (pure-helpers and "Interacting with
Others") to the command list in the main manual page.  The
latter class is primarily about foreign SCM interface and is
placed before low-level (plumbing) commands.

Also it promotes a handful commands to mainporcelain category
while demoting some others.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-19 17:53:39 -08:00
Junio C Hamano be93fc088f Documentation: generated cmds-*.txt does not depend on git.txt
Pointed out by Santi.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-19 11:33:27 -08:00
Junio C Hamano 72fe6a5989 Documentation: Generate command lists.
This moves the source of the list of commands and categorization
to the end of Documentation/cmd-list.perl, so that re-categorization
and re-ordering would become easier to manage.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-18 16:18:29 -08:00
Junio C Hamano c3f0baacad Documentation: sync git.txt command list and manual page title
Also reorders a handful entries to make each list sorted
alphabetically.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-18 15:53:37 -08:00
Junio C Hamano 377e81392f Documentation: move command list in git.txt into separate files.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-18 15:03:13 -08:00
David Kågedal cc75ad6762 Document --ignore-if-in-upstream in git-format-patch
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-18 14:29:42 -08:00
Junio C Hamano 917a8f891f git-format-patch: the default suffix is now .patch, not .txt
Editors often give easier handling of patch files if the
filename ends with .patch, so use it instead of .txt.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 23:48:20 -08:00
Junio C Hamano 7c49628010 git-format-patch -3
This teaches "git-format-patch" to honor the --max-count
parameter revision traversal machinery takes, so that you can
say "git-format-patch -3" to process the three topmost commits
from the current HEAD (or "git-format-patch -2 topic" to name a
specific branch).

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 23:48:20 -08:00
Shawn O. Pearce 41a5564e05 Refer users to git-rev-parse for revision specification syntax.
The revision specification syntax (sometimes referred to as
SHA1-expressions) is accepted almost everywhere in Git by
almost every tool.  Unfortunately it is only documented in
git-rev-parse.txt, and most users don't know to look there.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 20:45:41 -08:00
Shawn O. Pearce ee53aff486 Document the master@{n} reflog query syntax.
In ab2a1a32 Junio improved the reflog query logic to support
obtaining the n-th prior value of a ref, but this was never
documented in git-rev-parse.  Now it is.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 20:45:15 -08:00
Junio C Hamano de3820f5e4 Documentation/git-parse-remote.txt: we deal with config vars as well
... but we never documented it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 13:06:32 -08:00
Junio C Hamano 42f62db905 Documentation: m can be relative in "git-blame -Ln,m"
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 13:04:15 -08:00
Junio C Hamano 5cb545fa22 Documentation: suggest corresponding Porcelain-level in plumbing docs.
Instead of keeping the confused end user reading low-level
documentation, suggest the higher level commands that implement
what the user may want to do using them upfront.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 13:03:29 -08:00
Junio C Hamano 475abf1b63 Documentation/git-resolve: deprecated.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 13:00:23 -08:00
Nicolas Pitre 556b6600b2 sanitize content of README file
Current README content is way too esoteric for someone looking at GIT
for the first time. Instead it should provide a quick summary of what
GIT is with a few pointers to other resources.

The bulk of the previous README content is moved to
Documentation/core-intro.txt.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 12:03:50 -08:00
Junio C Hamano 03eeaeaea5 Introduce 'git-format-patch --suffix=.patch'
The default can also be changed with "format.suffix" configuration.
Leaving it empty would not add any suffix.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 12:03:26 -08:00
Junio C Hamano 2aa73a8fa2 Documentation/glossary.txt: describe remotes/ tracking and packed-refs
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 10:54:58 -08:00
Junio C Hamano 24a0fd02c9 Documentation/glossary.txt: unpacked objects are loose.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 10:54:18 -08:00
Junio C Hamano 428ddc5de6 Documentation: describe shallow repository
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 10:53:31 -08:00
Junio C Hamano df59afe3eb Make a short-and-sweet "git-add -i" synonym for "git-add --interactive"
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 10:52:36 -08:00
Junio C Hamano 5e1a2e8c61 Documentation: detached HEAD
Add discussion section to git-checkout documentation and mention
detached HEAD in repository-layout document.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 10:43:50 -08:00
René Scharfe 23bfbb815d Documentation: a few spelling fixes
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 08:44:32 -08:00
Junio C Hamano 850844e28f Documentation/git-sh-setup.txt: programmer's docs
Clarify that this is not meant for end users, and list what
shell functions are defined.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 01:13:05 -08:00
Junio C Hamano 7055172667 Documentation/git-whatchanged.txt: show -<n> instead of --max-count.
... to match the change we did earlier to git-log documentation.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 01:11:56 -08:00
Junio C Hamano 31fcd63c4a Documentation/git-status.txt: mention color configuration
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 01:11:01 -08:00
Junio C Hamano 0f2ba25d54 Documentation/git-tar-tree.txt: default umask is now 002
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 01:10:26 -08:00
Junio C Hamano e541557508 Documentation/git-tools.txt: mention tig and refer to wiki
In general list at Wiki seems to be maintained a lot better than
this list.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 01:09:41 -08:00
Junio C Hamano 79d5b81fee Documentation/git-tag: the command can be used to also verify a tag.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 01:08:30 -08:00
Junio C Hamano e30b217ba4 Documentation/SubmittingPatches: Gnus tips
Also warn about format=flowed (aka 'flawed').

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 01:07:27 -08:00
Junio C Hamano 936f32d3de git-commit: document log message formatting convention
Take it from the tutorial, since not everybody necessarily reads it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-16 22:53:28 -08:00
Junio C Hamano 5ea5621f89 Document where configuration files are in config.txt
Talking about what the files contain without talking about where
they are does not help new users.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-16 22:45:35 -08:00
Junio C Hamano 7905ba626e git-commit documentation: remove comment on unfixed git-rm
... which was fixed since then.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-16 16:36:54 -08:00
Junio C Hamano c1ff284a70 tutorial: shorthand for remotes but show distributed nature of git
* Promiscous pull shows the distributed nature of git better.
* Add a new step after that to teach "remote add".
* Highlight that with the shorthand defined you will get
  remote tracking branches for free.
* Fix Alice's workflow.

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-16 16:23:58 -08:00
Santi Béjar 8b616f24ea tutorial: Use only separate layout
Then the newbies only have to understand one layout.

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-16 16:23:31 -08:00
Junio C Hamano a9877f83e0 git-rm documentation: remove broken behaviour from the example.
The example section were talking about the old broken default
behaviour.  Correct it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-16 11:50:29 -08:00
Junio C Hamano dc36f26525 git-push documentation: remaining bits
Mention --thin, --no-thin, --repo and -v.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-16 11:46:03 -08:00
Uwe Kleine-K,Av(Bnig 5214f77044 document --exec for git-push
The text is just copied from git-send-pack.txt.

Signed-off-by: Uwe Kleine-K,Av(Bnig <zeisberg@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-16 11:33:38 -08:00
Jeff King a74b1706c8 git-pull: disallow implicit merging to detached HEAD
Instead, we complain to the user and suggest that they explicitly
specify the remote and branch. We depend on the exit status of
git-symbolic-ref, so let's go ahead and document that.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-15 15:37:22 -08:00
Junio C Hamano a0f4280f9e Fix git-fetch while on detached HEAD not to give needlessly alarming errors
When we are on a detached HEAD, there is no current branch.
There is no reason to leak the error messages to the end user
since this is a situation we expect to see.

This adds -q option to git-symbolic-ref to exit without issuing
an error message if the given name is not a symbolic ref.

By the way, with or without this patch, there currently is no
good way to tell failure modes between "git symbolic-ref HAED"
and "git symbolic-ref HEAD".  Both says "is not a symbolic ref".

We may want to do something about it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-15 15:35:07 -08:00
Junio C Hamano 15261e3b33 git reflog expire: document --stale-fix option.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-15 14:43:03 -08:00
Junio C Hamano 5fe3acc43d Documentation: merge-output is not too verbose now.
We've squelched output from merge-recursive, and git-merge when
used with recursive does not attempt the trivial one first
anymore, so there won't be "Trying ... Nope." messages now.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-14 21:31:30 -08:00
Shawn O. Pearce 8713ab3079 Improve git-describe performance by reducing revision listing.
My prior version of git-describe ran very slowly on even reasonably
sized projects like git.git and linux.git as it tended to identify
a large number of possible tags and then needed to generate the
revision list for each of those tags to sort them and select the
best tag to describe the input commit.

All we really need is the number of commits in the input revision
which are not in the tag.  We can generate these counts during
the revision walking and tag matching loop by assigning a color to
each tag and coloring the commits as we walk them.  This limits us
to identifying no more than 26 possible tags, as there is limited
space available within the flags field of struct commit.

The limitation of 26 possible tags is hopefully not going to be a
problem in real usage, as most projects won't create 26 maintenance
releases and merge them back into a development trunk after the
development trunk was tagged with a release candidate tag.  If that
does occur git-describe will start to revert to its old behavior of
using the newer maintenance release tag to describe the development
trunk, rather than the development trunk's own tag.  The suggested
workaround would be to retag the development trunk's tip.

However since even 26 possible tags can take a while to generate a
description for on some projects I'm defaulting the limit to 10 but
offering the user --candidates to increase the number of possible
matches if they need a more accurate result.  I specifically chose
10 for the default as it seems unlikely projects will have more
than 10 maintenance releases merged into a development trunk before
retagging the development trunk, and it seems to perform about the
same on linux.git as v1.4.4.4 git-describe.

A large amount of debugging information was also added during
the development of this change, so I've left it in to be toggled
on with --debug.  It may be useful to the end user to help them
understand why git-describe took one particular tag over another.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-14 21:17:27 -08:00
Nicolas Pitre c14261eaa2 some doc updates
1) talk about "git merge" instead of "git pull ."

2) suggest "git repo-config" instead of directly editing config files

3) echo "URL: blah" > .git/remotes/foo is obsolete and should be
   "git repo-config remote.foo.url blah"

4) support for partial URL prefix has been removed (see commit
   ea560e6d64) so drop mention of it.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-14 21:12:14 -08:00
J. Bruce Fields 2f99710cfe user-manual: rewrap, fix heading levels
Fix some heading levels that prevented compile; rewrap some stuff.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-14 22:43:47 -05:00
Junio C Hamano adb7ba6b11 git log documentation: teach -<n> form.
We say "this shows only the most often used ones"; so instead of
teaching --max-number=<n> form, list -<n> form which is much
easier to type.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-14 18:23:22 -08:00
J. Bruce Fields 67583917e9 Merge branch 'master' of git://git.kernel.org/pub/scm/git/git 2007-01-14 19:27:28 -05:00
J. Bruce Fields 69f7ad730a user-manual: reindent
Just some minor reindenting

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-14 16:29:40 -05:00
Shawn O. Pearce 8c3275abca Allow the user to control the verbosity of merge-recursive.
Junio C Hamano <junkio@cox.net> writes:
>
> I think the output from merge-recursive can be categorized into 5
> verbosity levels:
>
> 1. "CONFLICT", "Rename", "Adding here instead due to D/F conflict"
> (outermost)
>
> 2. "Auto-merged successfully" (outermost)
>
> 3. The first "Merging X with Y".
>
> 4. outermost "Merging:\ntitle1\ntitle2".
>
> 5. outermost "found N common ancestors\nancestor1\nancestor2\n..."
> and anything from inner merge.
>
> I would prefer the default verbosity level to be 2 (that is, show
> both 1 and 2).

and this change makes it so.  I think level 3 is probably pointless
as its only one line of output above level 2, but I can see how some
users may want to view it but not view the slightly more verbose
output of level 4.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-14 12:20:39 -08:00
Junio C Hamano 696b1b507f git-commit documentation: -a adds and also removes
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-13 12:26:13 -08:00
Junio C Hamano b60daf0515 Make git-prune-packed a bit more chatty.
Steven Grimm noticed that git-repack's verbosity is inconsistent
because pack-objects is chatty and prune-packed is not.  This
makes the latter a bit more chatty and gives -q option to
squelch it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-12 15:10:29 -08:00
Junio C Hamano f215f27013 glossary typofix
Pointed out by Paul Witt <paul.witt@oxix.org>

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-12 14:13:53 -08:00
Nicolas Pitre 5c94f87e6b use 'init' instead of 'init-db' for shipped docs and tools
While 'init-db' still is and probably will always remain a valid git
command for obvious backward compatibility reasons, it would be a good
idea to move shipped tools and docs to using 'init' instead.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-12 13:36:16 -08:00
Michael S. Tsirkin fc41be3b2e fix documentation for git-commit --no-verify
Despite what the documentation claims, git-commit does not check commit
for suspicious lines: all hooks are disabled by default,
and the pre-comit hook could be changed to do something else.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-12 00:09:07 -08:00
Junio C Hamano d145144c3b Document git-init
These days, the command does a lot more than just initialise the
object database (such as setting default config-variables,
installing template hooks...), and "git init" is actually a more
sensible name nowadays.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-11 12:58:10 -08:00
J. Bruce Fields f1d2b47794 user-manual: replace init-db by init
Replace mentions of init-db by mentions of init.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-01-11 12:44:08 -05:00
J. Bruce Fields 01997b4a25 user manual: answer some comments from Junio
Junio left a few comments in his previous patch; deal with
each of them.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-01-10 23:23:37 -05:00
Junio C Hamano eb6ae7f4ad User manual: fix typos in examples
Correct command line examples of repo-config, format-patch and am.

A full object name is 40-hexdigit; it may be 20-byte but
20-digit is misleading.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-10 23:18:08 -05:00
J. Bruce Fields aec053bb0a Documentation: rev-list -> rev-parse, other typos, start examples
Fix some typos, start adding some more simple examples.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-01-10 23:17:00 -05:00
Nicolas Pitre c2cb959fe7 Add git-init documentation.
Oops. Commit 515377ea9e missed one
file, git-init documentation.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-10 13:38:03 -08:00
Junio C Hamano bb1091a475 -u is now default for 'git-mailinfo'.
Originally from David Woodhouse, but also adjusts the callers of
mailinfo to the new default.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 21:32:49 -08:00
Junio C Hamano 62c89c662f -u is now default for 'git-applymbox'
It has '-n' to disable it just in case, but do not even bother
documenting it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 21:20:39 -08:00
Steven Grimm cec21ca7cf Update git-svn manpage to remove the implication that SVN::* is optional.
Now that git-svn requires the SVN::* Perl library, the manpage doesn't need
to describe what happens when you don't have it.

Signed-off-by: Steven Grimm <koreth@midwinter.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 17:08:09 -08:00
J. Bruce Fields 041e69c998 Documentation: add git-remote man page
Add a preliminary man page for git-remote.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 21:42:37 -08:00
J. Bruce Fields d5cd5de495 Documentation: begin discussion of git-remote in user manual
Start discussion of git-remote.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-09 00:18:09 -05:00
J. Bruce Fields b684f830cc Documentation: reorder development section, todo's
Update todo's.  Split out "sharing development" section into a separate
chapter, reorder.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-08 23:42:36 -05:00
J. Bruce Fields e9c0390a92 Documentation: more user-manual todo's
Add some more todo's for the user manual.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-08 21:59:42 -05:00
Junio C Hamano 0f018baba6 --prune is now default for 'pack-refs'
There is no reason not to, really.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 14:46:00 -08:00
Junio C Hamano d84029b673 --utf8 is now default for 'git-am'
Since we are talking about allowing potentially incompatible UI
changes in v1.5.0 iff the change improves the general situation,
I would say why not.

There is --no-utf8 flag to avoid re-coding from botching the log
message just in case, but we may not even need it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 14:45:59 -08:00
Martin Langhoff eec8496210 cvsimport: document -S and -L options
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 03:01:32 -08:00
Martin Langhoff ded9f40059 cvsimport: skip commits that are too recent (option and documentation)
This makes the earlier "wait for 10 minutes before importing" safety
overridable with "-a(ll)" flag, and adds necessary documentation.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 03:01:16 -08:00
Eric Wong ae41098714 git-svn: add --prefix= option to multi-init
Also, document --{trunk,branches,tags} options while we're
documenting multi-init options.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-07 21:32:49 -08:00
J. Bruce Fields 59b5f52047 Documentation: clarify definition of "reachable"
Clarify definition of "reachable" (what chain?)

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-07 21:32:49 -08:00
J. Bruce Fields 4c63ff452f Documentation: git-rebase discussion, miscellaneous user-manual updates
Add discussion of git-rebase, patch series, history rewriting.

Mention "pull ." as a synonym for "merge".

Remind myself of another case I want to cover in the other-vcs's chapter.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-07 23:57:41 -05:00
J. Bruce Fields 6bd9b6822f Documentation: expand preface and todo's
Add a brief description of the organization to the preface, expand the
final notes/todo's section, in hopes maybe some others will want to
contribute.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-07 22:58:14 -05:00
Nicolas Pitre 515377ea9e "init-db" can really be just "init"
Make "init" the equivalent of "init-db". This should make first GIT
impression a little more friendly.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-07 18:03:07 -08:00
J. Bruce Fields d19fbc3c17 Documentation: add git user's manual
The goals are:

	- Readable from beginning to end in order without having read
	  any other git documentation beforehand.
	- Helpful section names and cross-references, so it's not too
	  hard to skip around some if you need to.
	- Organized to allow it to grow much larger (unlike the
	  tutorials)

It's more liesurely than tutorial.txt, but tries to stay focused on
practical how-to stuff.  It adds a discussion of how to resolve merge
conflicts, and partial instructions on setting up and dealing with a
public repository.

I've lifted a little bit from "branching and merging" (e.g., some of the
discussion of history diagrams), and could probably steal more if that's
OK.  (Similarly anyone should of course feel free to reuse bits of this
if any parts seem more useful than the whole.)

There's a lot of detail on managing branches and using git-fetch, just
because those are essential even to people needing read-only access
(e.g., kernel testers).  I think those sections will be much shorter
once the new "git remote" command and the disconnected checkouts are
taken into account.

I do feel bad about adding yet another piece of documentation, but I we
need something that goes through all the basics in a logical order, and
I wasn't seeing how to grow the tutorials into that.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-07 20:33:06 -05:00
Junio C Hamano cf2999eb4c Merge branch 'sp/mmap'
* sp/mmap: (27 commits)
  Spell default packedgitlimit slightly differently
  Increase packedGit{Limit,WindowSize} on 64 bit systems.
  Update packedGit config option documentation.
  mmap: set FD_CLOEXEC for file descriptors we keep open for mmap()
  pack-objects: fix use of use_pack().
  Fix random segfaults in pack-objects.
  Cleanup read_cache_from error handling.
  Replace mmap with xmmap, better handling MAP_FAILED.
  Release pack windows before reporting out of memory.
  Default core.packdGitWindowSize to 1 MiB if NO_MMAP.
  Test suite for sliding window mmap implementation.
  Create pack_report() as a debugging aid.
  Support unmapping windows on 'temporary' packfiles.
  Improve error message when packfile mmap fails.
  Ensure core.packedGitWindowSize cannot be less than 2 pages.
  Load core configuration in git-verify-pack.
  Fully activate the sliding window pack access.
  Unmap individual windows rather than entire files.
  Document why header parsing won't exceed a window.
  Loop over pack_windows when inflating/accessing data.
  ...

Conflicts:

	cache.h
	pack-check.c
2007-01-07 00:12:47 -08:00
J. Bruce Fields 84dee6bbc9 Documentation: tutorial editing
Edit for conciseness.

Add a "Making changes" section header.

When possible, make sure that stuff in text boxes could be entered literally.
(Don't use "..." unless we want a user to type that.)

Move 'commit -a' example into a literal code section, clarify that it finds
modified files automatically.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-06 22:48:41 -08:00
Eric Wong 2eff14259e Documentation/git-svn: clarify dcommit, rebase vs pull/merge
Clarify that dcommit creates a revision in SVN for every commit
in git.  Also, add 'merge' to the rebase vs pull section because
git-merge is now a first-class UI.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-06 22:48:21 -08:00
Sasha Khapyorsky 40006ea039 git-svnimport: support for incremental import
This adds ability to do import "in chunks" (default 1000 revisions),
after each chunk git repo will be repacked. The option -R is used to
change default value of chunk size (or how often repository will
repacked).

Signed-off-by: Sasha Khapyorsky <sashak@voltaire.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-06 22:47:58 -08:00
Steven Grimm 1170e8026a Describe git-clone's actual behavior in the summary
If a branch other than "master" is checked out in the origin repository,
git-clone makes a local copy of that branch rather than the origin's
"master"
branch. This patch describes the actual behavior.

Signed-off-by: Steven Grimm <koreth@midwinter.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-06 10:40:54 -08:00
Shawn O. Pearce 22bac0ea52 Increase packedGit{Limit,WindowSize} on 64 bit systems.
If we have a 64 bit address space we can easily afford to commit
a larger amount of virtual address space to pack file access.
So on these platforms we should increase the default settings of
core.packedGit{Limit,WindowSize} to something that will better
handle very large projects.

Thanks to Andy Whitcroft for pointing out that we can safely
increase these defaults on such systems.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-06 10:34:56 -08:00
Eric Wong 0d313b2b7b git-svn: update documentation for multi-{init|fetch}
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-04 22:28:46 -08:00
Santi Béjar 0bc72abdb0 git-tag: add flag to verify a tag
This way "git tag -v $tag" is the UI for git-verify-tag.

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-03 12:31:43 -08:00
Santi Béjar 9c9410e115 Documentation/tutorial: misc updates
- Teach how to delete a branch with "git branch -d name".
 - Usually a commit has one parent; merge has more.
 - Teach "git show" instead of "git cat-file -p".

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-03 12:19:20 -08:00
Junio C Hamano c1d179f88a tutorial: misc updates.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-03 08:38:01 -08:00
Brian Gernhardt f3673988ec Add documentation for git-branch's color configuration.
Added color.branch and color.branch.<slot> to configuration list.
Style copied from color.status and meanings derived from the code.

Moved the color meanings from color.diff.<slot> to color.branch.<slot>
since the latter comes first alphabetically.

Added --color and --no-color to git-branch's usage and documentation.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-03 08:16:02 -08:00
Junio C Hamano f4bf2184ae Update clone/fetch documentation with --depth (shallow clone) option
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-01 15:08:06 -08:00
Junio C Hamano a597fb0e71 Strongly discourage --update-head-ok in fetch-options documentation.
"Use it with care" is a wrong wording to say "this is purely internal
and you are supposed to know what you are doing if you use this".

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-01 15:07:35 -08:00
J. Bruce Fields 6f0b4ac0d7 Documentation: remove master:origin example from pull-fetch-param.txt
This is no longer a useful example.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-01 14:38:08 -08:00
J. Bruce Fields 33a59fd07d Documentation: update git-pull.txt for new clone behavior
Update examples, stop using branch named "origin" as an example.
Remove large example of use of remotes; that particular case is
nicely automated by default, so it's not so pressing to explain, and
we can refer to git-repo-config for the details.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-01 14:36:36 -08:00