Commit graph

1447 commits

Author SHA1 Message Date
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
Junio C Hamano 9d0524d42f Update send-pack pipeline documentation.
The pipeline was much more complex and needed documentation, but
now it is trivial and straightforward.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-01 14:35:16 -08:00
Theodore Tso 63c97ce228 Fix formatting for urls section of fetch, pull, and push manpages
Updated to make the nroff'ed man pages look nicer.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-31 18:40:17 -08:00
J. Bruce Fields d66409f068 Documentation: update tutorial's discussion of origin
Update tutorial's discussion of origin branch to reflect new defaults,
and include a brief mention of git-repo-config.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-31 16:44:41 -08:00
J. Bruce Fields f65bb2c66f Documentation: update glossary entry for "origin"
Update glossary entry for "origin" to reflect fact that it normally now refers
to a remote repository, not a branch.

Also, warning not to work on remote-tracking branches is no longer necessary
since git doesn't allow that.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-31 16:37:20 -08:00
J. Bruce Fields 36566cc0bc Documentation: update git-clone.txt for clone's new default behavior
Fix a couple remaining references to the origin branch.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-31 16:16:10 -08:00
J. Bruce Fields c04197ee1e Docs: update cvs-migration.txt to reflect clone's new default behavior
I couldn't think of a really quick way to give all the details, so just refer
readers to the git-repo-config man page instead.

I haven't tested recent cvs import behavior--some time presumably it should be
updated to do something more similar to clone.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-31 16:15:12 -08:00
Junio C Hamano 87a3d29f46 Update documentation for update hook.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-31 00:52:25 -08:00
Junio C Hamano cc06c87068 Merge branch 'jc/send-pack-pipeline'
* jc/send-pack-pipeline:
  Documentation: illustrate send-pack pipeline.
  send-pack: fix pipeline.
2006-12-31 00:31:26 -08:00
Shawn O. Pearce eb92242f19 Update packedGit config option documentation.
Corrected minor typos and documented the new k/m/g suffix for
core.packedGitWindowSize and core.packedGitLimit.

[jc: with a minor markup fix.]

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-30 22:45:00 -08:00
Junio C Hamano 76d4e079ad Merge branch 'master' into sp/mmap
* master:
  Documentation/config.txt (and repo-config manpage): mark-up fix.
  Teach Git how to parse standard power of 2 suffixes.
  Use /dev/null for update hook stdin.
  Redirect update hook stdout to stderr.
  Remove unnecessary argc parameter from run_command_v.
  Automatically detect a bare git repository.
  Replace "GIT_DIR" with GIT_DIR_ENVIRONMENT.
  Use PATH_MAX constant for --bare.
  Force core.filemode to false on Cygwin.
  Fix formatting for urls section of fetch, pull, and push manpages
  Fix yet another subtle xdl_merge() bug
  i18n: drop "encoding" header in the output after re-coding.
  commit-tree: cope with different ways "utf-8" can be spelled.
  Move commit reencoding parameter parsing to revision.c
  Documentation: minor rewording for git-log and git-show pages.
  Documentation: i18n commit log message notes.
  t3900: test log --encoding=none
  commit re-encoding: fix confusion between no and default conversion.
2006-12-30 22:42:43 -08:00
Junio C Hamano a862f97e98 Documentation/config.txt (and repo-config manpage): mark-up fix.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-30 22:39:24 -08:00
Shawn O. Pearce d77a64d353 Teach Git how to parse standard power of 2 suffixes.
Sometimes its necessary to supply a value as a power of two in a
configuration parameter.  In this case the user may want to use the
standard suffixes such as K, M, or G to indicate that the numerical
value should be multiplied by a constant base before being used.

Shell scripts/etc. can also benefit from this automatic option
parsing with `git repo-config --int`.

[jc: with a couple of test and a slight input tightening]

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-30 22:22:14 -08:00
Theodore Ts'o 400e74df98 Fix formatting for urls section of fetch, pull, and push manpages
The line:

[remote "<remote>"]

was getting swallowed up by asciidoc, causing a critical line in the
explanation for how to store the .git/remotes information in .git/config
to go missing from the git-fetch, git-pull, and git-push manpages.

Put all of the examples into delimited blocks to fix this problem and to
make them look nicer.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-30 18:19:19 -08:00
Junio C Hamano 7cbcf4d557 Move commit reencoding parameter parsing to revision.c
This way, git-rev-list and git-diff-tree with --pretty can use
it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-30 15:58:32 -08:00
Junio C Hamano 99e09cce8d Documentation: minor rewording for git-log and git-show pages.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-30 02:36:13 -08:00
Junio C Hamano 5dc7bcc245 Documentation: i18n commit log message notes.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-30 02:36:08 -08:00
Junio C Hamano b5ffa5ceef Documentation: illustrate send-pack pipeline.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-29 12:14:30 -08:00
Shawn O. Pearce 60bb8b1453 Fully activate the sliding window pack access.
This finally turns on the sliding window behavior for packfile data
access by mapping limited size windows and chaining them under the
packed_git->windows list.

We consider a given byte offset to be within the window only if there
would be at least 20 bytes (one hash worth of data) accessible after
the requested offset.  This range selection relates to the contract
that use_pack() makes with its callers, allowing them to access
one hash or one object header without needing to call use_pack()
for every byte of data obtained.

In the worst case scenario we will map the same page of data twice
into memory: once at the end of one window and once again at the
start of the next window.  This duplicate page mapping will happen
only when an object header or a delta base reference is spanned
over the end of a window and is always limited to just one page of
duplication, as no sane operating system will ever have a page size
smaller than a hash.

I am assuming that the possible wasted page of virtual address
space is going to perform faster than the alternatives, which
would be to copy the object header or ref delta into a temporary
buffer prior to parsing, or to check the window range on every byte
during header parsing.  We may decide to revisit this decision in
the future since this is just a gut instinct decision and has not
actually been proven out by experimental testing.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-29 11:36:45 -08:00
Shawn O. Pearce 77ccc5bbd1 Introduce new config option for mmap limit.
Rather than hardcoding the maximum number of bytes which can be
mmapped from pack files we should make this value configurable,
allowing the end user to increase or decrease this limit on a
per-repository basis depending on the size of the repository
and the capabilities of their operating system.

In general users should not need to manually tune such a low-level
setting within the core code, but being able to artifically limit
the number of bytes which we can mmap at once from pack files will
make it easier to craft test cases for the new mmap sliding window
implementation.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-29 11:36:44 -08:00
Junio C Hamano eff73751bb Merge branch 'jc/utf8'
* jc/utf8:
  t3900: test conversion to non UTF-8 as well
  Rename t3900 test vector file
  UTF-8: introduce i18n.logoutputencoding.
  Teach log family --encoding
  i18n.logToUTF8: convert commit log message to UTF-8
  Move encoding conversion routine out of mailinfo to utf8.c

Conflicts:

	commit.c
2006-12-28 19:03:02 -08:00
Shawn O. Pearce f94741324e Use GIT_REFLOG_ACTION environment variable instead.
Junio rightly pointed out that the --reflog-action parameter
was starting to get out of control, as most porcelain code
needed to hand it to other porcelain and plumbing alike to
ensure the reflog contained the top-level user action and
not the lower-level actions it invoked.

At Junio's suggestion we are introducing the new set_reflog_action
function to all shell scripts, allowing them to declare early on
what their default reflog name should be, but this setting only
takes effect if the caller has not already set the GIT_REFLOG_ACTION
environment variable.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-28 01:05:15 -08:00
Junio C Hamano d2c11a38c4 UTF-8: introduce i18n.logoutputencoding.
It is plausible for somebody to want to view the commit log in a
different encoding from i18n.commitencoding -- the project's
policy may be UTF-8 and the user may be using a commit message
hook to run iconv to conform to that policy (and either not have
i18n.commitencoding to default to UTF-8 or have it explicitly
set to UTF-8).  Even then, Latin-1 may be more convenient for
the usual pager and the terminal the user uses.

The new variable i18n.logoutputencoding is used in preference to
i18n.commitencoding to decide what encoding to recode the log
output in when git-log and friends formats the commit log message.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-27 16:41:33 -08:00
Junio C Hamano 8f57b0a0fb everyday: replace a few 'prune' and 'repack' with 'gc'
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-27 02:00:30 -08:00
Shawn O. Pearce 30f610b7b0 Create 'git gc' to perform common maintenance operations.
Junio asked for a 'git gc' utility which users can execute on a
regular basis to perform basic repository actions such as:

 * pack-refs --prune
 * reflog expire
 * repack -a -d
 * prune
 * rerere gc

So here is a command which does exactly that.  The parameters fed
to reflog's expire subcommand can be chosen by the user by setting
configuration options in .git/config (or ~/.gitconfig), as users may
want different expiration windows for each repository but shouldn't
be bothered to remember what they are all of the time.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-27 01:53:03 -08:00
Junio C Hamano 4aec56d12b git-reflog: gc.* configuration and documentation.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-27 01:47:57 -08:00
Junio C Hamano 48c3242450 rerere gc: honor configuration and document it
Two configuration to control the expiration of rerere records
are introduced and documented.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-27 01:33:24 -08:00
Junio C Hamano ae72f68541 count-objects -v: show number of packs as well.
Recent "git push" keeps transferred objects packed much more aggressively
than before.  Monitoring output from git-count-objects -v for number of
loose objects is not enough to decide when to repack -- having too many
small packs is also a good cue for repacking.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-27 01:05:00 -08:00
Junio C Hamano 268b827d98 everyday: update for v1.5.0
Fix minor mark-up mistakes and adjust to v1.5.0 BCP, namely:

 - use "git add" instead of "git update-index";
 - use "git merge" instead of "git pull .";
 - use separate remote layout;
 - use config instead of remotes/origin file;

Also updates "My typical git day" example since now I have
'next' branch these days.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-26 23:47:33 -08:00
Junio C Hamano 6934dec895 Document git-reset <commit> -- <paths>... 2006-12-26 00:21:01 -08:00
Junio C Hamano 2f89543eaf Document --numstat in git-apply and git-diff
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-26 00:15:26 -08:00
Junio C Hamano abc8ab19ae show-branch --reflog: add documentation.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-26 00:11:50 -08:00
Junio C Hamano 6a1ad32519 git-add -f: allow adding otherwise ignored files.
Instead of just warning, refuse to add otherwise ignored files
by default, and allow it with an -f option.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-25 17:46:38 -08:00
Junio C Hamano e23ca9e1f9 git-add: add ignored files when asked explicitly.
One thing many people found confusing about git-add was that a
file whose name matches an ignored pattern could not be added to
the index.  With this, such a file can be added by explicitly
spelling its name to git-add.

Fileglobs and recursive behaviour do not add ignored files to
the index.  That is, if a pattern '*.o' is in .gitignore, and
two files foo.o, bar/baz.o are in the working tree:

    $ git add foo.o
    $ git add '*.o'
    $ git add bar

Only the first form adds foo.o to the index.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-25 03:29:08 -08:00
Junio C Hamano 08d22488a6 git-rm: Documentation
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-25 03:29:08 -08:00
Junio C Hamano d4ada4876d Merge branch 'jc/skip-count'
* jc/skip-count:
  revision: --skip=<n>
2006-12-25 03:27:41 -08:00
Junio C Hamano 6f38e03722 Merge branch 'jc/git-add--interactive'
* jc/git-add--interactive:
  git-add --interactive: add documentation
  git-add --interactive: hunk splitting
  git-add --interactive
2006-12-25 01:31:17 -08:00
Junio C Hamano 6a5ad23de6 git-add --interactive: add documentation
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-25 01:30:55 -08:00
Eric Wong 6538d1ef31 Makefile: add quick-install-doc for installing pre-built manpages
This adds and uses the install-doc-quick.sh file to
Documentation/, which is usable for people who track either the
'html' or 'man' heads in Junio's repository (prefixed with
'origin/' if cloned locally).  You may override this by
specifying DOC_REF in the make environment or in config.mak.

GZ may also be set in the environment (or config.mak) if you
wish to gzip the documentation after installing it.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-23 09:22:30 -08:00
Brian Gernhardt f49006b0c7 Make git-show-branch options similar to git-branch.
Branch has "-r" for remote branches and "-a" for local and remote.
It seems logical to mirror that in show-branch.  Also removes the
dubiously useful "--tags" option (as part of changing the meaning
for "--all").

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22 23:18:07 -08:00
Johannes Schindelin f79c73ce9c git-tag: support -F <file> option
This imitates the behaviour of git-commit.

Noticed by Han-Wen Nienhuys.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21 22:44:04 -08:00
Quy Tonthat 7dda22e317 Documentation/git-branch: new -r to delete remote-tracking branches.
Signed-off-by: Quy Tonthat <qtonthat@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20 20:36:42 -08:00
Junio C Hamano 5b85143ba5 Merge branch 'ew/svn-pm'
* ew/svn-pm:
  git-svn: rename 'commit' command to 'set-tree'
  git-svn: remove support for the svn command-line client
  git-svn: convert to using Git.pm
2006-12-20 17:20:45 -08:00
Junio C Hamano ce0545455a diff documentation: mostly talk about <commit>
This corrects minor remaining bits that still talked about <tree-ish>;
the Porcelain users (as opposed to plumbers) are mostly interested in
commits so use <commit> consistently and keep a sentence that mentions
that <tree-ish> can be used in place of them.
2006-12-20 14:41:54 -08:00
Junio C Hamano d5db6c9ee7 revision: --skip=<n>
This adds --skip=<n> option to revision traversal machinery.
Documentation and test were added by Robert Fitzsimons.

Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20 11:26:11 -08:00
Junio C Hamano 5fed466815 Merge branch 'jc/test-clone' into jc/clone
* jc/test-clone: (35 commits)
  Introduce GIT_TEMPLATE_DIR
  Revert "fix testsuite: make sure they use templates freshly built from the source"
  fix testsuite: make sure they use templates freshly built from the source
  rerere: fix breakage of resolving.
  Add config example with respect to branch
  Add documentation for show-branch --topics
  make git a bit less cryptic on fetch errors
  make patch_delta() error cases a bit more verbose
  racy-git: documentation updates.
  show-ref: fix --exclude-existing
  parse-remote::expand_refs_wildcard()
  vim syntax: follow recent changes to commit template
  show-ref: fix --verify --hash=length
  show-ref: fix --quiet --verify
  avoid accessing _all_ loose refs in git-show-ref --verify
  git-fetch: Avoid reading packed refs over and over again
  Teach show-branch how to show ref-log data.
  markup fix in svnimport documentation.
  Documentation: new option -P for git-svnimport
  Fix mis-mark-up in git-merge-file.txt documentation
  ...
2006-12-19 01:38:18 -08:00
Aneesh Kumar K.V 910c00c8ca Add config example with respect to branch
Update config.txt with example with respect to branch
config variable. This give a better idea regarding
how branch names are expected.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-18 16:05:08 -08:00
Brian Gernhardt 38c594d330 Add documentation for show-branch --topics
Add a quick paragraph explaining the --topics option for show-branch.
The explanation is an abbreviated version of the commit message from
d320a5437f.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-18 16:03:39 -08:00
Junio C Hamano e1bb1d31ea racy-git: documentation updates.
We've removed the workaround for runtime penalty that did not
exist in practice some time ago, but the technical paper that
proposed that change still said "we probably should do so".

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-18 14:18:54 -08:00
Junio C Hamano ee6002aa42 markup fix in svnimport documentation.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-17 10:33:24 -08:00
Quy Tonthat c0e9232e43 Documentation: new option -P for git-svnimport
Documentation: new option -P for git-svnimport.

Signed-off-by: Quy Tonthat <qtonthat@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-17 10:31:11 -08:00
Junio C Hamano 38477d9e60 Fix mis-mark-up in git-merge-file.txt documentation
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-17 01:14:44 -08:00
Junio C Hamano 63085fabbd git-clone: lose the traditional 'no-separate-remote' layout
Finally.

The separate-remote layout is so much more organized than
traditional and easier to work with especially when you need to
deal with remote repositories with multiple branches and/or you
need to deal with more than one remote repositories, and using
traditional layout for new repositories simply does not make
much sense.

Internally we still have code for 1:1 mappings to create a bare
clone; that is a good thing and will not go away.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-16 13:01:41 -08:00
Eric Wong 3289e86e1e git-svn: rename 'commit' command to 'set-tree'
'set-tree' probably accurately describes what the command
formerly known as 'commit' does.

I'm not entirely sure that 'dcommit' should be renamed to 'commit'
just yet...  Perhaps 'push' or 'push-changes'?

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-16 05:17:56 -08:00
Johannes Schindelin 9abaa7f033 Document git-merge-file
Most of this is derived from the documentation of RCS merge.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-16 05:15:28 -08:00
Quy Tonthat a2e88b3580 git-clone documentation
When --use-separate-remote is used on git-clone, the remote
heads are saved under $GIT_DIR/refs/remotes/origin/, not
"$GIT_DIR/remotes/origin/"

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-15 23:51:22 -08:00
Shawn O. Pearce 82dca84871 Align section headers of 'git status' to new 'git add'.
Now that 'git add' is considered a first-class UI for 'update-index'
and that the 'git add' documentation states "Even modified files
must be added to the set of changes about to be committed" we should
make the output of 'git status' align with that documentation and
common usage.

So now we see a status output such as:

  # Added but not yet committed:
  #   (will commit)
  #
  #       new file: x
  #
  # Changed but not added:
  #   (use "git add file1 file2" to include for commit)
  #
  #       modified:   x
  #
  # Untracked files:
  #   (use "git add" on files to include for commit)
  #
  #       y

which just reads better in the context of using 'git add' to
manipulate a commit (and not a checkin, whatever the heck that is).

We also now support 'color.status.added' as an alias for the existing
'color.status.updated', as this alias more closely aligns with the
current output and documentation.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-15 22:31:01 -08:00
Brian Gernhardt e697e4cd1f Make git-diff documentation use [--] when it should.
Two of the cases has "[--] [<path>...]" and two had "-- [<path>...]".
Not terribly consistent and potentially confusing.  Also add "[--]" to
the synopsis so that it's obvious you can use it from the very
beginning.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-15 22:31:01 -08:00
Brian Gernhardt 89c4afe0d0 Add --add option to git-repo-config
For multivars, the "git-repo-config name value ^$" is useful but
nonintuitive and troublesome to do repeatedly (since the value is not
at the end of the command line).  This commit simply adds an --add
option that adds a new value to a multivar.  Particularly useful for
tracking a new branch on a remote:

git-repo-config --add remote.origin.fetch +next:origin/next

Includes documentation and test.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-15 22:31:01 -08:00
Shawn O. Pearce 0bee591869 Enable reflogs by default in any repository with a working directory.
New and experienced Git users alike are finding out too late that
they forgot to enable reflogs in the current repository, and cannot
use the information stored within it to recover from an incorrectly
entered command such as `git reset --hard HEAD^^^` when they really
meant HEAD^^ (aka HEAD~2).

So enable reflogs by default in all future versions of Git, unless
the user specifically disables it with:

  [core]
    logAllRefUpdates = false

in their .git/config or ~/.gitconfig.

We only enable reflogs in repositories that have a working directory
associated with them, as shared/bare repositories do not have
an easy means to prune away old log entries, or may fail logging
entirely if the user's gecos information is not valid during a push.
This heuristic was suggested on the mailing list by Junio.

Documentation was also updated to indicate the new default behavior.
We probably should start to teach usuing the reflog to recover
from mistakes in some of the tutorial material, as new users are
likely to make a few along the way and will feel better knowing
they can recover from them quickly and easily, without fsck-objects'
lost+found features.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-15 22:31:01 -08:00
Shawn O. Pearce ef0a89a604 Provide more meaningful output from 'git init-db'.
Back in the old days of Git when people messed around with their
GIT_DIR environment variable more often it was nice to know whether
or not git-init-db created a .git directory or used GIT_DIR.
As most users at that time were rather technical UNIXy folk the
message "defaulting to local storage area" made sense to some and
seemed reasonable.

But it doesn't really convey any meaning to the new Git user,
as they don't know what a 'local storage area is' nor do they
know enough about Git to care.  It also really doesn't tell the
experienced Git user a whole lot about the command they just ran,
especially if they might be reinitializing an existing repository
(e.g. to update hooks).

So now we print out what we did ("Initialized empty" or
"Reinitialized existing"), what type of repository ("" or "shared"),
and what location the repository will be in ("$GIT_DIR").

Suggested in part by Andy Parkins in his Git 'niggles' list
(<200612132237.10051.andyparkins@gmail.com>).

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-15 22:31:00 -08:00
Nicolas Pitre ebd124c678 make commit message a little more consistent and conforting
It is nicer to let the user know when a commit succeeded all the time,
not only the first time.  Also the commit sha1 is much more useful than
the tree sha1 in this case.

This patch also introduces a -q switch to supress this message as well
as the summary of created/deleted files.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-15 22:29:54 -08:00
Johannes Schindelin 5d7eeee2ac git-show: grok blobs, trees and tags, too
Since git-show is pure Porcelain, it is the ideal candidate to
pretty print other things than commits, too.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-14 02:56:24 -08:00
Junio C Hamano f5e6b89b3a Update git-diff documentation
Porcelain documentation should talk in terms of end-user workflow, not
in terms of implementation details.  Do not suggest update-index, but
git-add instead.  Explain differences among 0-, 1- and 2-tree cases
not as differences of number of trees given to the command, but say
why user would want to give these number of trees to the command in
what situation.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-14 01:51:44 -08:00
Junio C Hamano 67bed724f2 Merge branch 'jc/diff--cached'
* jc/diff--cached:
  Revert "git-diff: Introduce --index and deprecate --cached."
2006-12-13 23:55:42 -08:00
Junio C Hamano 1d77043b00 config documentation: group color items together.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-13 12:11:03 -08:00
Junio C Hamano f388cec3d7 Merge branch 'jc/read-tree-ignore'
* jc/read-tree-ignore:
  read-tree: document --exclude-per-directory
  Loosen "working file will be lost" check in Porcelain-ish
  read-tree: further loosen "working file will be lost" check.
2006-12-13 11:10:24 -08:00
Junio C Hamano d0085ade95 Merge branch 'ew/rerere'
* ew/rerere:
  rerere: record (or avoid misrecording) resolved, skipped or aborted rebase/am
  git-rerere: add 'gc' command.
  rerere: add clear, diff, and status commands
2006-12-13 11:08:35 -08:00
Junio C Hamano 78ba00407c Merge branch 'np/addcommit'
* np/addcommit:
  git-commit: allow --only to lose what was staged earlier.
  Documentation/git-commit: rewrite to make it more end-user friendly.
  make 'git add' a first class user friendly interface to the index
2006-12-13 11:08:20 -08:00
Junio C Hamano abcb49cb56 Merge branch 'lh/branch-rename'
* lh/branch-rename:
  git-branch: let caller specify logmsg
  rename_ref: use lstat(2) when testing for symlink
  git-branch: add options and tests for branch renaming

Conflicts:

	builtin-branch.c
2006-12-13 11:07:51 -08:00
Junio C Hamano 490e092def Merge branch 'jc/commit-careful'
* jc/commit-careful:
  git-commit: show --summary after successful commit.
2006-12-13 11:03:46 -08:00
Junio C Hamano e4d45dd3bb Merge branch 'js/merge'
* js/merge:
  merge-recursive: add/add really is modify/modify with an empty base
  Get rid of the dependency on RCS' merge program
  merge-file: support -p and -q; fix compile warnings
  Add builtin merge-file, a minimal replacement for RCS merge
  xdl_merge(): fix and simplify conflict handling
  xdl_merge(): fix thinko
  xdl_merge(): fix an off-by-one bug
  merge-recursive: use xdl_merge().
  xmerge: make return value from xdl_merge() more usable.
  xdiff: add xdl_merge()
2006-12-13 10:46:23 -08:00
Junio C Hamano 7ef0435088 spurious .sp in manpages
This is just a random hack to work around problems people seem
to be seeing in manpage backend of xmlto (it appears we are
getting ".sp" at the end of line without line break).

Could people test this out?

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-13 09:41:18 -08:00
Junio C Hamano f2dd1c9adf Revert "git-diff: Introduce --index and deprecate --cached."
This reverts commit 4c81c213a4.

Although --cached and --index are confusing wording, the use of
word --cached for git-diff is consistent with git-apply.  It means
"work with index without looking at the working tree".

We should probably come up with better wording for --cached, if
somebody wants to deprecate it.  But making --index and --cached
synonyms for diff while leaving them mean different things for
apply is no good.
2006-12-13 02:03:11 -08:00
Andy Parkins a159ca0cb7 Allow subcommand.color and color.subcommand color configuration
While adding colour to the branch command it was pointed out that a
config option like "branch.color" conflicts with the pre-existing
"branch.something" namespace used for specifying default merge urls and
branches.  The suggested solution was to flip the order of the
components to "color.branch", which I did for colourising branch.

This patch does the same thing for
  - git-log (color.diff)
  - git-status (color.status)
  - git-diff (color.diff)
  - pager (color.pager)

I haven't removed the old config options; but they should probably be
deprecated and eventually removed to prevent future namespace
collisions.  I've done this deprecation by changing the documentation
for the config file to match the new names; and adding the "color.XXX"
options to contrib/completion/git-completion.bash.

Unfortunately git-svn reads "diff.color" and "pager.color"; which I
don't like to change unilaterally.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-13 01:47:36 -08:00
Junio C Hamano 25fb629058 git-push: document removal of remote ref with :<dst> pathspec
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-13 01:11:05 -08:00
Junio C Hamano 8042ed1ceb Merge branch 'master' into js/merge
* master: (42 commits)
  git-svn: correctly handle packed-refs in refs/remotes/
  add test case for recursive merge
  git-svn: correctly display fatal() error messages
  git-svn: allow dcommit to take an alternate head
  git-svn: enable logging of information not supported by git
  Clarify fetch error for missing objects.
  Move Fink and Ports check to after config file
  shortlog: fix segfault on empty authorname
  shortlog: remove "[PATCH]" prefix from shortlog output
  Make sure the empty tree exists when needed in merge-recursive.
  Don't use memcpy when source and dest. buffers may overlap
  no need to install manpages as executable
  Documentation: simpler shared repository creation
  shortlog: fix segfault on empty authorname
  Add branch.*.merge warning and documentation update
  Fix perl/ build.
  git-svn: use do_switch for --follow-parent if the SVN library supports it
  Fix documentation copy&paste typo
  git-svn: extra error check to ensure we open a file correctly
  Documentation: update git-clone man page with new behavior
  ...
2006-12-12 21:52:19 -08:00
Johannes Schindelin e2b7008752 Get rid of the dependency on RCS' merge program
Now that we have git-merge-file, an RCS merge lookalike, we no longer
need it. So long, merge, and thanks for all the fish!

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-12 21:47:29 -08:00
Eric Wong dd31da2fdc git-svn: allow dcommit to take an alternate head
Previously dcommit would unconditionally commit all patches
up-to and including the current HEAD.  Now if an optional
command-line argument is specified, it will only commit
up to the specified revision.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-12 17:07:05 -08:00
Junio C Hamano 73c7f5ec05 Merge branch 'maint'
* maint:
  Make sure the empty tree exists when needed in merge-recursive.
  Don't use memcpy when source and dest. buffers may overlap
  no need to install manpages as executable
2006-12-11 14:12:12 -08:00
Chris Wright d44c92d6ab no need to install manpages as executable
No need to install manpages as executable.  Noticed by Ville Skytt,Ad(B.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-11 11:32:50 -08:00
Junio C Hamano 6c96753df9 Documentation/git-commit: rewrite to make it more end-user friendly.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-09 16:56:34 -08:00
Junio C Hamano cda2d3c112 git-rerere: add 'gc' command.
Over time, unresolved rr-cache entries are accumulated and they
tend to get less and less likely to be useful as the tips of
branches advance.

Reorder documentation page to show the subcommand section earlier
than the discussion section.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-09 11:13:17 -08:00
Eric Wong d9671b75ad rerere: add clear, diff, and status commands
git-am and git-rebase will be updated to use 'clear', and
diff/status can be used to aid the user in tracking progress in
the resolution process.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-09 11:09:27 -08:00
J. Bruce Fields 4cfeccc75d Documentation: simpler shared repository creation
Take Johannes Schindelin's suggestions for a further simplification of
the shared repository creation using git --bare init-db --shared, and
for a simplified cvsimport using an existing CVS working directory.

Also insert more man page references.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

 cvs-migration.txt |   27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-08 20:11:39 -08:00
Josef Weidendorfer 62b339a544 Add branch.*.merge warning and documentation update
This patch clarifies the meaning of the branch.*.merge option.
Previously, if branch.*.merge was specified but did not match any
ref, the message "No changes." was not really helpful regarding
the misconfiguration. This patch adds a warning for this.

Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-08 18:13:31 -08:00
J. Bruce Fields db9819a40a Documentation: update git-clone man page with new behavior
Update git-clone man page to reflect recent changes
(--use-separate-remote default and use of .git/config instead of
remotes files), and rewrite introduction.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-07 23:10:05 -08:00
J. Bruce Fields cd976f5c52 Documentation: reorganize cvs-migration.txt
Modify cvs-migration.txt so it explains first how to develop against a
shared repository, then how to set up a shared repository, then how to
import a repository from cvs.  Though this seems chronologically
backwards, it's still readable in this order, and it puts the more
commonly needed material closer to the front.

Remove the annotate/pickaxe section; perhaps it can find a place elsewhere
in the future.  Remove most of the "why git is better than cvs" stuff from
the introduction.

Add some minor clarifications, including two that have come up several
times on the mailing list:

	1. Recommend committing any changes before running pull.
	2. Note that changes must be commited before they can be pushed.

Update the clone discussion to reflect the new --use-separate-remotes
default, and add a brief mention of git-cvsserver.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06 21:35:53 -08:00
J. Bruce Fields 4003a58e41 cvs-migration: improved section titles, better push/commit explanation
Rename the section titles to make the "how-to" content of the section
obvious.  Also clarify that changes have to be commited before they can
be pushed.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06 09:53:33 -08:00
Johannes Schindelin 3a9f1a55ee cvs-migration document: make the need for "push" more obvious
It really is an important concept to grasp for people coming
from CVS. Even if it is briefly mentioned, it is not obvious
enough to sink in.

[jc: with wording updates from J. Bruce Fields]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06 09:52:57 -08:00
Lars Hjemli c976d415e5 git-branch: add options and tests for branch renaming
Extend git-branch with the following options:

  git-branch -m|-M [<oldbranch>] newbranch

The -M variation is required to force renaming over an exsisting
branchname.

This also indroduces $GIT_DIR/RENAME_REF which is a "metabranch"
used when renaming branches. It will always hold the original sha1
for the latest renamed branch.

Additionally, if $GIT_DIR/logs/RENAME_REF exists, all branch rename
events are logged there.

Finally, some testcases are added to verify the new options.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-05 23:50:57 -08:00
Junio C Hamano 22f741dab7 read-tree: document --exclude-per-directory
This documents the new option to read-tree that is used for the
improved "branch switching" code.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-05 23:44:23 -08:00
Nicolas Pitre 366bfcb68f make 'git add' a first class user friendly interface to the index
This brings the power of the index up front using a proper mental model
without talking about the index at all. See for example how all the
technical discussion has been evacuated from the git-add man page.

   Any content to be committed must be added together.  Whether that
   content comes from new files or modified files doesn't matter.  You
   just need to "add" it, either with git-add, or by providing
   git-commit with -a (for already known files only of course).

No need for a separate command to distinguish new vs modified files
please. That would only screw the mental model everybody should have
when using GIT.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-04 16:33:51 -08:00
Jakub Narebski 8ebe185bbf Document git-diff whitespace flags -b and -w
Document git diff options -b / --ignore-space-change and
-w / --ignore-all-space, introduced by Johannes Schindelin
in commit 0d21efa5, "Teach diff about -b and -w flags".

The description of options is taken from GNU diff man page and
GNU Diffutils info documentation.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-04 16:30:54 -08:00
Jakub Narebski b360cca0b1 git-clone: Rename --use-immingled-remote option to --no-separate-remote
With making --use-separate-remote default when creating non-bare
clone, there was need for the flag which would turn off this behavior.
It was called --use-immingled-remote.

Immingle means to blend, to combine into one, to intermingle, but it
is a bit obscure word. I think it would be better to use simply
--no-separate-remote as the opposite to --use-separate-remote
option to git clone.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-04 13:49:08 -08:00
Andy Parkins 22b1c7ee01 De-emphasise the symbolic link documentation.
The fact that git has previously used symbolic links for representing
symbolic refs doesn't seem relevant to the current function of
git-symbolic-ref.  This patch makes less of a big deal about the
symbolic link history and instead focuses on what git does now.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-01 21:57:47 -08:00
Andreas Ericsson 4c81c213a4 git-diff: Introduce --index and deprecate --cached.
'git diff --cached' still works, but its use is discouraged
in the documentation. 'git diff --index' does the same thing
and is consistent with how 'git apply --index' works.

Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-01 21:57:04 -08:00
Junio C Hamano aed4509251 Merge branch 'maint'
* branch 'maint':
  Document git-repo-config --bool/--int options.
  tutorial: talk about user.name early and don't start with commit -a
  git-blame: fix rev parameter handling.
2006-11-29 12:16:55 -08:00
Andy Parkins eb07fd59ac Document git-repo-config --bool/--int options.
Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-29 10:34:20 -08:00
Junio C Hamano 6658923070 tutorial: talk about user.name early and don't start with commit -a
Introducing yourself to git early would be a good idea; otherwise
the user may not find the mistake until much later when "git log"
is learned.

Teaching "commit -a" without saying that it is a shortcut for
listing the paths to commit leaves the user puzzled.  Teach the
form with explicit paths first.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-29 10:34:18 -08:00
Eric Wong 4511c899e6 git-svn: documentation updates
Eliminate 'commit' from some places and plug 'dcommit' more.
Also update the section --id (GIT_SVN_ID) usage since we
have multi-init/multi-fetch now.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-28 20:59:41 -08:00
Sean fde97d8ac6 Update documentation to remove incorrect GIT_DIFF_OPTS example.
Git no longer calls an external diff program to generate patches.
Remove the documentation which suggests that you can pass
arbitrary diff options via the GIT_DIFF_OPTS environment variable.

Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-27 12:08:36 -08:00
Junio C Hamano 3c23bea8ac Merge branch 'js/shortlog'
* js/shortlog:
  git-shortlog: make common repository prefix configurable with .mailmap
  git-shortlog: fix common repository prefix abbreviation.
  builtin git-shortlog is broken
  shortlog: fix "-n"
  shortlog: handle email addresses case-insensitively
  shortlog: read mailmap from ./.mailmap again
  shortlog: do not crash on parsing "[PATCH"
  Build in shortlog
2006-11-26 22:51:38 -08:00
Junio C Hamano 88ffc1f28a Merge branch 'jc/merge'
* branch 'jc/merge':
  git-merge: do not leak rev-parse output used for checking internally.
  git-merge: tighten error checking.
  merge: allow merging into a yet-to-be-born branch.
  git-merge: make it usable as the first class UI
  remove merge-recursive-old
2006-11-26 22:19:56 -08:00
J. Bruce Fields 93ee7823c0 Documentation: clarify tutorial pull/merge discussion
Attempt to clarify somewhat the difference between pull and merge,
and give a little more details on the pull syntax.

I'm still not happy with this section: the explanation of the origin
branch isn't great, but maybe that should be left alone pending the
use-separate-remotes change; and we need to explain how to set up a
public repository and push to it.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-25 22:46:35 -08:00
Junio C Hamano 61f5cb7f0d git-commit: show --summary after successful commit.
Sometimes people accidentally commit files in wrong mode bits.
Show --summary output for the HEAD commit after successful commit
as a final sanity check.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-25 00:20:01 -08:00
Lars Hjemli 75e6e21320 Add -v and --abbrev options to git-branch
The new -v option makes git-branch show the abbreviated sha1 + subjectline
for each branch.

Additionally, minimum abbreviation length can be specified with
--abbrev=<length>

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-24 20:52:54 -08:00
Junio C Hamano c7757948dc Merge branch 'pb/diffroot'
* pb/diffroot:
  config option log.showroot to show the diff of root commits
2006-11-24 03:49:57 -08:00
Junio C Hamano 5b6be4ccb5 Merge branch 'ap/branch-ref-display'
* ap/branch-ref-display:
  Add support to git-branch to show local and remote branches
2006-11-24 03:43:46 -08:00
Peter Baumann 0f03ca9461 config option log.showroot to show the diff of root commits
This allows one to see a root commit as a diff in commands like git-log,
git-show and git-whatchanged.

Signed-off-by: Peter Baumann <Peter.B.Baumannn@stud.informatik.uni-erlangen.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-24 02:35:26 -08:00
Petr Baudis 7182135189 Make git-clone --use-separate-remote the default
We've talked about this for quite some time on the list, and it
is a sane thing to do for a repository with an associcated
working tree.

For somebody who wants to use the traditional layout, there is a
backward compatibility option --use-immingled-remote, but it is
expected to be removed before the next major release.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-23 22:53:06 -08:00
Chris Riddoch 5d1faf8791 Move --pretty options into Documentation/pretty-formats.txt
Asciidoc-include it into the manuals for programs that use the
--pretty command-line option, for consistency among the docs.

This describes all the pretty-formats currently listed in the cmit_fmt
enum in commit.h, and also briefly describes the presence and format
of the 'Merge: ' line in some pretty formats.

There's a hedge that limiting your view of history can affect what
goes in the Merge: line, and that --abbrev/--no-abbrev do nothing to
the 'raw' format.

Signed-off-by: Chris Riddoch <chris@syntacticsugar.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-22 16:06:32 -08:00
Andy Parkins bfcc921430 Add support to git-branch to show local and remote branches
Instead of storing a list of refnames in append_ref, a list of
structures is created.  Each of these stores the refname and a
symbolic constant representing its type.

The creation of the list is filtered based on a command line
switch; no switch means "local branches only", "-r" means "remote
branches only" (as they always did); but now "-a" means "local
branches or remote branches".

As a side effect, the list is now not global, but allocated in
print_ref_list() where it used.

Also a memory leak is plugged, the memory allocated during the
list creation was never freed.

It lays a groundwork to also display tags, but the command being
'git branch' it is not currently used.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-21 21:26:12 -08:00
Junio C Hamano 17bcdad3b7 git-merge: make it usable as the first class UI
This teaches the oft-requested syntax

	git merge $commit

to implement merging the named commit to the current branch.
This hopefully would make "git merge" usable as the first class
UI instead of being a mere backend for "git pull".

Most notably, $commit above can be any committish, so you can
say for example:

	git merge js/shortlog~2

to merge early part of a topic branch without merging the rest
of it.

A custom merge message can be given with the new --message=<msg>
parameter.  The message is prepended in front of the usual
"Merge ..." message autogenerated with fmt-merge-message.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-21 20:55:40 -08:00
Paolo Ciarrocchi 5942706357 Doc: Make comment about merging in tutorial.txt more clear
Rephrased a sentence in order to make more clear the concept of
pull . branch

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-21 19:01:29 -08:00
Paolo Ciarrocchi 69945602f9 Teach SubmittingPatches about git-commit -s
As discussed on git mailing list let's teach the reader about
the possiblity to have automatically signed off the commit running
the git-commit -s command

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-21 11:40:18 -08:00
Johannes Schindelin b8ec59234b Build in shortlog
[jc: with minimum squelching of compiler warning under "-pedantic"
 compilation options.]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-19 22:59:05 -08:00
Petr Baudis 198a4f4ff0 Documentation: Correct alternates documentation, document http-alternates
For one, the documentation invalidly claimed that the paths have to be
absolute when that's not the case and in fact there is a very valid reason
not to use absolute paths (documented the reason as well).

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-18 16:29:46 -08:00
Petr Baudis e3d457fb59 Documentation: Define symref and update HEAD description
HEAD was still described as a symlink instead of a symref.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-18 14:04:51 -08:00
Rene Scharfe fd931411c0 Document git-runstatus
I copied most of the text from git-status.txt.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-18 14:04:45 -08:00
Petr Baudis f847c07b9a git-apply: Documentation typo fix
inacurate -> inaccurate, sorry if it was a pun. ;-)

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-18 11:09:55 -08:00
Junio C Hamano 2a54323ce5 Merge branch 'maint'
* maint:
  Rework cvsexportcommit to handle binary files for all cases.
  Catch errors when writing an index that contains invalid objects.
  test-lib.sh: A command dying due to a signal is an unexpected failure.
  git-update-index(1): fix use of quoting in section title
2006-11-13 14:30:39 -08:00
Jonas Fonseca bae777db33 git-update-index(1): fix use of quoting in section title
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-12 18:50:20 -08:00
Junio C Hamano 368c2ac249 Merge branch 'maint'
* maint:
  git-rebase: Use --ignore-if-in-upstream option when executing git-format-patch.
  git-svn: fix dcommit losing changes when out-of-date from svn
  git-svn: don't die on rebuild when --upgrade is specified
  git-svn: avoid printing filenames of files we're not tracking
2006-11-09 15:08:19 -08:00
Junio C Hamano 18d5453ed3 Documentation: move blame examples
This moves the example to specify a line range with regexps to
a later part of the manual page that has similar examples.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-09 10:44:56 -08:00
Eric Wong 45bf473a7b git-svn: fix dcommit losing changes when out-of-date from svn
There was a bug in dcommit (and commit-diff) which caused deltas
to be generated against the latest version of the changed file
in a repository, and not the revision we are diffing (the tree)
against locally.

This bug can cause recent changes to the svn repository to be
silently clobbered by git-svn if our repository is out-of-date.

Thanks to Steven Grimm for noticing the bug.

The (few) people using the commit-diff command are now required
to use the -r/--revision argument.  dcommit usage is unchanged.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-09 09:34:46 -08:00
Junio C Hamano acca687fa9 git-pickaxe: retire pickaxe
Just make it take over blame's place.  Documentation and command
have all stopped mentioning "git-pickaxe".  The built-in synonym
is left in the command table, so you can still say "git pickaxe",
but it probably is a good idea to retire it as well.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-08 18:49:37 -08:00
Junio C Hamano 24ad8e0ce2 Merge branch 'jc/pickaxe' 2006-11-07 16:33:59 -08:00
Nicolas Pitre 231f240b63 git-pack-objects progress flag documentation and cleanup
This adds documentation for --progress and --all-progress, remove a
duplicate --progress handling and make usage string more readable.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-07 16:05:37 -08:00
Junio C Hamano 66f3b35fde Merge branch 'np/index-pack'
* np/index-pack:
  remove .keep pack lock files when done with refs update
  have index-pack create .keep file more carefully
  improve fetch-pack's handling of kept packs
  git-fetch can use both --thin and --keep with fetch-pack now
  Teach receive-pack how to keep pack files based on object count.
  Allow pack header preprocessing before unpack-objects/index-pack.
  Remove unused variable in receive-pack.
  Revert "send-pack --keep: do not explode into loose objects on the receiving end."
  missing small substitution
  Teach git-index-pack how to keep a pack file.
  Only repack active packs by skipping over kept packs.
  Allow short pack names to git-pack-objects --unpacked=.
  send-pack --keep: do not explode into loose objects on the receiving end.
  index-pack: minor fixes to comment and function name
  enhance clone and fetch -k experience
  mimic unpack-objects when --stdin is used with index-pack
  add progress status to index-pack
  make index-pack able to complete thin packs.
  enable index-pack streaming capability
2006-11-07 15:39:56 -08:00
Junio C Hamano bd45fec839 Merge branch 'maint'
* maint:
  Documentation: Transplanting branch with git-rebase --onto
  merge-recursive implicitely depends on trust_executable_bit
  adjust_shared_perm: chmod() only when needed.
  Fix git-runstatus for repositories containing a file named HEAD
2006-11-06 22:56:07 -08:00
Jakub Narebski e52775f438 Documentation: Transplanting branch with git-rebase --onto
Added example of transplantig feature branch from one development
branch (for example "next") into the other development branch (for
example "master").

[jc: talking Carl's advice this contains both examples sent to
 the list by Jakub in his original message.]

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-06 15:01:14 -08:00
Junio C Hamano d28f7cb935 Document git-pack-refs and link it to git(7).
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-06 08:43:34 -08:00
Junio C Hamano 94d5ca8d0c Merge branch 'np/verbose-push'
* np/verbose-push:
  make git-push a bit more verbose
2006-11-04 17:22:14 -08:00
Nicolas Pitre 576162a45f remove .keep pack lock files when done with refs update
This makes both git-fetch and git-push (fetch-pack and receive-pack)
safe against a possible race with aparallel git-repack -a -d that could
prune the new pack while it is not yet referenced, and remove the .keep
file after refs have been updated.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-03 00:24:07 -08:00
Nicolas Pitre da093d3750 improve fetch-pack's handling of kept packs
Since functions in fetch-clone.c were only used from fetch-pack.c,
its content has been merged with fetch-pack.c.  This allows for better
coupling of features with much simpler implementations.

One new thing is that the (abscence of) --thin also enforce it on
index-pack now, such that index-pack will abort if a thin pack was
_not_ asked for.

The -k or --keep, when provided twice, now causes the fetched pack
to be left as a kept pack just like receive-pack currently does.
Eventually this will be used to close a race against concurrent
repacking.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-03 00:24:07 -08:00
Shawn Pearce fc04c412d8 Teach receive-pack how to keep pack files based on object count.
Since keeping a pushed pack or exploding it into loose objects
should be a local repository decision this teaches receive-pack
to decide if it should call unpack-objects or index-pack --stdin
--fix-thin based on the setting of receive.unpackLimit and the
number of objects contained in the received pack.

If the number of objects (hdr_entries) in the received pack is
below the value of receive.unpackLimit (which is 5000 by default)
then we unpack-objects as we have in the past.

If the hdr_entries >= receive.unpackLimit then we call index-pack and
ask it to include our pid and hostname in the .keep file to make it
easier to identify why a given pack has been kept in the repository.

Currently this leaves every received pack as a kept pack.  We really
don't want that as received packs will tend to be small.  Instead we
want to delete the .keep file automatically after all refs have
been updated.  That is being left as room for future improvement.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-03 00:24:07 -08:00
Junio C Hamano 407e1d6e12 Merge branch 'master' into np/index-pack
* master: (90 commits)
  gitweb: Better support for non-CSS aware web browsers
  gitweb: Output also empty patches in "commitdiff" view
  gitweb: Use git-for-each-ref to generate list of heads and/or tags
  for-each-ref: "creator" and "creatordate" fields
  Add --global option to git-repo-config.
  pack-refs: Store the full name of the ref even when packing only tags.
  git-clone documentation didn't mention --origin as equivalent of -o
  Minor grammar fixes for git-diff-index.txt
  link_temp_to_file: call adjust_shared_perm() only when we created the directory
  Remove uneccessarily similar printf() from print_ref_list() in builtin-branch
  pack-objects doesn't create random pack names
  branch: work in subdirectories.
  gitweb: Use 's' regexp modifier to secure against filenames with LF
  gitweb: Secure against commit-ish/tree-ish with the same name as path
  gitweb: esc_html() author in blame
  git-svnimport: support for partial imports
  link_temp_to_file: don't leave the path truncated on adjust_shared_perm failure
  Move deny_non_fast_forwards handling completely into receive-pack.
  revision traversal: --unpacked does not limit commit list anymore.
  Continue traversal when rev-list --unpacked finds a packed commit.
  ...
2006-11-03 00:23:52 -08:00
Junio C Hamano c954d33da1 Merge branch 'maint'
* maint:
  git-clone documentation didn't mention --origin as equivalent of -o
  Minor grammar fixes for git-diff-index.txt
  link_temp_to_file: call adjust_shared_perm() only when we created the directory
2006-11-02 18:05:33 -08:00
Sean 34eb33407d Add --global option to git-repo-config.
Allow user to set variables in global ~/.gitconfig file
using command line.

Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-02 18:04:40 -08:00
Andy Parkins ba158a32b9 git-clone documentation didn't mention --origin as equivalent of -o
Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-02 18:03:47 -08:00
Andy Parkins 44b27ec960 Minor grammar fixes for git-diff-index.txt
"what you are going to commit is" doesn't need the "is" and does need a comma.

"can trivially see" is an unecessary split infinitive and "easily" is a more
appropriate adverb.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-02 18:03:31 -08:00
Nicolas Pitre fa438a2eb1 make git-push a bit more verbose
Currently git-push displays progress status for the local packing of
objects to send, but nothing once it starts to push it over the
connection.  Having progress status in that later case is especially
nice when pushing lots of objects over a slow network link.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-01 15:13:10 -08:00
Junio C Hamano 7854e526ff Merge branch 'maint'
* maint:
  pack-objects doesn't create random pack names
  link_temp_to_file: don't leave the path truncated on adjust_shared_perm failure
2006-11-01 15:09:55 -08:00
Nicolas Pitre e23ed9a8b4 pack-objects doesn't create random pack names
Documentation for pack-objects seems to be out of date in this regard.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-01 15:09:39 -08:00
Junio C Hamano 58a1e0e83b Merge branch 'lj/refs'
* lj/refs: (63 commits)
  Fix show-ref usagestring
  t3200: git-branch testsuite update
  sha1_name.c: avoid compilation warnings.
  Make git-branch a builtin
  ref-log: fix D/F conflict coming from deleted refs.
  git-revert with conflicts to behave as git-merge with conflicts
  core.logallrefupdates thinko-fix
  git-pack-refs --all
  core.logallrefupdates create new log file only for branch heads.
  Remove bashism from t3210-pack-refs.sh
  ref-log: allow ref@{count} syntax.
  pack-refs: call fflush before fsync.
  pack-refs: use lockfile as everybody else does.
  git-fetch: do not look into $GIT_DIR/refs to see if a tag exists.
  lock_ref_sha1_basic does not remove empty directories on BSD
  Do not create tag leading directories since git update-ref does it.
  Check that a tag exists using show-ref instead of looking for the ref file.
  Use git-update-ref to delete a tag instead of rm()ing the ref file.
  Fix refs.c;:repack_without_ref() clean-up path
  Clean up "git-branch.sh" and add remove recursive dir test cases.
  ...
2006-11-01 08:48:50 -08:00
Junio C Hamano 62476c8e33 Introduce a new revision set operator <rev>^!
This is a shorthand for "<rev> --not <rev>^@", i.e. "include
this commit but exclude any of its parents".

When a new file $F is introduced by revision $R, this notation
can be used to find a copy-and-paste from existing file in the
parents of that revision without annotating the ancestry of the
lines that were copied from:

	git pickaxe -f -C $R^! -- $F

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-31 14:22:34 -08:00
Shawn Pearce b807770924 Teach git-index-pack how to keep a pack file.
To prevent a race condition between `index-pack --stdin` and
`repack -a -d` where the repack deletes the newly created pack
file before any refs are updated to reference objects contained
within it we mark the pack file as one that should be kept.  This
removes it from the list of packs that `repack -a -d` will consider
for removal.

Callers such as `receive-pack` which want to invoke `index-pack`
should use this new --keep option to prevent the newly created pack
and index file pair from being deleted before they have finished any
related ref updates.  Only after all ref updates have been finished
should the associated .keep file be removed.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 13:45:03 -08:00
Junio C Hamano 01cff2d2ca Merge early part of branch 'np/index-pack' into sp/keep-pack 2006-10-29 13:44:54 -08:00
Sergey Vlasov 6dcfa306f2 git-send-email: Read the default SMTP server from the GIT config file
Make the default value for --smtp-server configurable through the
'sendemail.smtpserver' option in .git/config (or $HOME/.gitconfig).

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Acked-by: Ryan Anderson <rda@google.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 12:45:23 -08:00
Sergey Vlasov 9c572b21dd git-send-email: Document support for local sendmail instead of SMTP server
Fix the --smtp-server option description to match reality.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 12:41:38 -08:00
Robin Rosenberg b1f33d6265 Swap the porcelain and plumbing commands in the git man page
This makes the documentation less confusing to newcomers.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 12:36:40 -08:00
Robin Rosenberg ce4231ffa8 Mention that pull can work locally in the synopsis
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 12:36:27 -08:00
Junio C Hamano 1dc5e55f2d Documentation: fix git-format-patch mark-up and link it from git.txt
Two asterisks the SYNOPSIS section were mistaken as emphasis,
and the latter backtick in "`<key>`s" were not recognized as
closing backtick.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-28 14:25:41 -07:00
Jakub Narebski ba7545adab Documentation: Update information about <format> in git-for-each-ref
Update information about value of <format> used when it is left
unspecified.  Add information about `%%` and `%xx` interpolation
(URL encoding).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-28 14:23:34 -07:00
Junio C Hamano 019298015b Merge branch 'maint'
* maint:
  gitweb: Check git base URLs before generating URL from it
  Documentation: add git in /etc/services.
  Documentation: add upload-archive service to git-daemon.
  git-cherry: document limit and add diagram
  diff-format.txt: Correct information about pathnames quoting in patch format
2006-10-27 02:16:18 -07:00
Christian Couder f8a5da6d94 Documentation: add git in /etc/services.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-27 02:10:52 -07:00
Christian Couder e2b1d1ccdd Documentation: add upload-archive service to git-daemon.
This patch minimaly documents the upload-archive service,
hoping that someone with better knowledge will improve upon.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-27 02:10:41 -07:00
Rene Scharfe a8ebdb90f9 git-cherry: document limit and add diagram
This patch adds the diagram from the long usage string of git-cherry to
its documentation, and documents the third option.  I changed some of
the + to - in order to save the reader from wondering where they might
fit into the picture.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 18:53:18 -07:00
Junio C Hamano ac1a1f9927 Merge branch 'jc/combined' into maint
* jc/combined:
  combine-diff: honour --no-commit-id
  combine-diff: fix hunk_comment_line logic.
  combine-diff: a few more finishing touches.
2006-10-26 18:45:52 -07:00
Jakub Narebski fb8e23fae2 diff-format.txt: Correct information about pathnames quoting in patch format
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 18:34:18 -07:00
Junio C Hamano e893f7ad73 Merge branch 'jc/combined'
* jc/combined:
  combine-diff: a few more finishing touches.
  Documentation: clarify refname disambiguation rules.
  diff-format.txt: Combined diff format documentation supplement
  Remove --syslog in git-daemon inetd documentation examples.
  Documentation: updates to "Everyday GIT"
2006-10-26 01:18:55 -07:00
Junio C Hamano d5f6a01af0 combine-diff: a few more finishing touches.
"new file" and "deleted file" were already reported in the
original code, but the logic was not as transparent as it could
have.  This uses a few variables and more comments to clarify
the flow.  The rule is: (1) if a path exists in the merge result
when no parent had it, we report "new" (otherwise it came from
the parents, as opposed to have added by the evil merge). (2) if
the path does not exist in the merge result, it is "deleted".

Since we can say "new" and "deleted", there is no reason not to
follow the /dev/null convention.  This fixes it.

Appending function name after @@@ ... @@@ is trivial, so
implement it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 01:18:49 -07:00
Junio C Hamano 0ac3056850 Documentation: clarify refname disambiguation rules.
Nobody should create ambiguous refs (i.e. have tag "foobar" and branch
"foobar" at the same time) that need to be disambiguated with these
rules to keep sanity, but the rules are there so document them.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 01:15:42 -07:00
Nicolas Pitre 3c9af36646 add progress status to index-pack
This is more interesting to look at when performing a big fetch.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 00:20:13 -07:00
Nicolas Pitre 636171cb80 make index-pack able to complete thin packs.
A new flag, --fix-thin, instructs git-index-pack to append any missing
objects to a thin pack to make it self contained and indexable. Of course
objects missing from the pack must be present elsewhere in the local
repository.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 00:20:07 -07:00
Jakub Narebski 0074aba1c0 diff-format.txt: Combined diff format documentation supplement
Update example combined diff format to the current version
$ git diff-tree -p -c fec9ebf16c
and provide complete first chunk in example.

Document combined diff format headers: how "diff header" look like,
which of "extended diff headers" are used with combined diff and how
they look like, differences in two-line from-file/to-file header from
non-combined diff format, chunk header format.

It should be noted that combined diff format was designed for quick
_content_ inspection and renames would work correctly to pick which
blobs from each tree to compare but otherwise not reflected in the
output (the pathnames are not shown).

[jc: with minimum copyediting]

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 00:15:01 -07:00
Christian Couder d9c04ba3dd Remove --syslog in git-daemon inetd documentation examples.
It is useless because --inetd implies --syslog.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-25 22:35:20 -07:00
J. Bruce Fields 119550af0c Documentation: updates to "Everyday GIT"
Remove the introduction: I think it should be obvious why
we have this.  (And if it isn't obvious then we've got other
problems.)

Replace reference to git whatchanged by git log.

Miscellaneous style and grammar fixes.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-25 20:01:57 -07:00
Nicolas Pitre e42797f5b6 enable index-pack streaming capability
A new flag, --stdin, allows for a pack to be received over a stream.
When this flag is provided, the pack content is written to either
the named pack file or directly to the object repository under the
same name as produced by git-repack.  The pack index is written as
well with the corresponding base name, unless the index name is
overriden with -o.

With this patch, git-index-pack could be used instead of
git-unpack-objects when fetching remote objects but only with
non "thin" packs for now.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-25 14:39:07 -07:00
Junio C Hamano eb153837d8 Merge branch 'maint'
* maint:
  Documentation/SubmittingPatches: 3+1 != 6
2006-10-25 14:38:33 -07:00
Junio C Hamano 84ab7b6fc7 Documentation/SubmittingPatches: 3+1 != 6
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-25 14:38:24 -07:00
Junio C Hamano 9ee93dceb5 Merge for-each-ref to sync gitweb fully with 'next' 2006-10-25 13:29:12 -07:00
Junio C Hamano 8e95026f29 Merge branch 'jc/web-blame'
* jc/web-blame:
  gitweb: spell "blame --porcelain" with -p
  blame: Document and add help text for -f, -n, and -p
  gitweb: blame porcelain: lineno and orig lineno swapped
  Remove git-annotate.perl and create a builtin-alias for git-blame
  gitweb: use blame --porcelain
  git-blame --porcelain
  blame.c: move code to output metainfo into a separate function.
  git-blame: --show-number (and -n)
  git-blame: --show-name (and -f)
  blame.c: whitespace and formatting clean-up.
  Gitweb - provide site headers and footers
  gitweb: blame: Mouse-over commit-8 shows author and date
  gitweb: blame: print commit-8 on the leading row of a commit-block
  Revert 954a618375
  gitweb: prepare for repositories with packed refs.
  gitweb: make leftmost column of blame less cluttered.
2006-10-25 13:18:06 -07:00
Junio C Hamano 7756b1f1dc Merge branch 'maint'
* maint:
  xdiff: Match GNU diff behaviour when deciding hunk comment worthiness of lines
  Update cherry documentation.
  Refer to git-rev-parse:Specifying Revisions from git.txt
  git-fetch.sh printed protocol fix
  RPM package re-classification.
  Documentation: note about contrib/.
  git-svn: fix symlink-to-file changes when using command-line svn 1.4.0
  Set $HOME for selftests
2006-10-25 12:57:48 -07:00
Junio C Hamano 6e7d76baee Update cherry documentation.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-25 12:56:37 -07:00
Junio C Hamano d47107d810 Refer to git-rev-parse:Specifying Revisions from git.txt
The brief list given in "Symbolic Identifiers" section of the
main documentation is good enough for overview, but help the
reader to find a more comrehensive list as needed.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-25 11:33:08 -07:00
Junio C Hamano 04d24455ce Documentation: note about contrib/.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-24 15:16:38 -07:00
Junio C Hamano 1259404c7e Merge branch 'maint'
* maint:
  gitweb: Fix setting $/ in parse_commit()
  daemon: do not die on older clients.
  xdiff/xemit.c (xdl_find_func): Elide trailing white space in a context header.
  git-clone: honor --quiet
  Documentation for the [remote] config
  prune-packed: Fix uninitialized variable.
2006-10-23 19:29:05 -07:00
Santi Béjar 0cc6d3464a Documentation for the [remote] config
Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-23 13:19:49 -07:00
Junio C Hamano 05eb811aa1 Merge branch 'np/pack'
* np/pack:
  add the capability for index-pack to read from a stream
  index-pack: compare only the first 20-bytes of the key.
  git-repack: repo.usedeltabaseoffset
  pack-objects: document --delta-base-offset option
  allow delta data reuse even if base object is a preferred base
  zap a debug remnant
  let the GIT native protocol use offsets to delta base when possible
  make pack data reuse compatible with both delta types
  make git-pack-objects able to create deltas with offset to base
  teach git-index-pack about deltas with offset to base
  teach git-unpack-objects about deltas with offset to base
  introduce delta objects with offset to base
2006-10-22 22:51:42 -07:00
Junio C Hamano 18abd745a0 git-pickaxe -C: blame cut-and-pasted lines.
This completes the initial round of git-pickaxe.  In addition to
the detection of line movements we already have, this finds new
lines that were created by moving or cutting-and-pasting lines
from different files in the parent.

With this,

	git pickaxe -f -n -C v1.4.0 -- revision.c

finds that a major part of that file actually came from
rev-list.c when Linus split the latter at commit ae563642 and
blames them to earlier commits that touch rev-list.c.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-20 00:30:44 -07:00
Junio C Hamano d24bba8008 git-pickaxe -M: blame line movements within a file.
This makes pickaxe more intelligent than the classic blame.

A typical example is a change that moves one static C function
from lower part of the file to upper part of the same file,
because you added a new caller in the middle.

The versions in the parent and the child would look like this:

        parent            child

        A                 static foo() {
        B                 ...
        C                 }
        D                 A
        E                 B
        F                 C
        G                 D
        static foo() {    ... call foo();
        ...               E
        }                 F
        H                 G
                          H

With the classic blame algorithm, we can blame lines A B C D E F
G and H to the parent.  The child is guilty of introducing the
line "... call foo();", and the blame is placed on the child.
However, the classic blame algorithm fails to notice that the
implementation of foo() at the top of the file is not new, and
moved from the lower part of the parent.

This commit introduces detection of such line movements, and
correctly blames the lines that were simply moved in the file to
the parent.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-20 00:27:05 -07:00
Junio C Hamano cee7f245dc git-pickaxe: blame rewritten.
Currently it does what git-blame does, but only faster.

More importantly, its internal structure is designed to support
content movement (aka cut-and-paste) more easily by allowing
more than one paths to be taken from the same commit.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-19 22:42:49 -07:00
Junio C Hamano 9100c9dce1 Merge branch 'jc/grep'
* jc/grep:
  teach revision walker about --all-match.
  grep --all-match
2006-10-18 22:08:58 -07:00
Junio C Hamano f73a5e8976 Merge branch 'jc/diff-numstat'
* jc/diff-numstat:
  diff --numstat
2006-10-18 22:08:42 -07:00
Junio C Hamano a420585f38 Merge branch 'rs/rebase'
* rs/rebase:
  git-rebase: Add a -v option to show a diffstat of the changes upstream at the start of a rebase.
  git-rebase: Use --ignore-if-in-upstream option when executing git-format-patch.
2006-10-18 22:08:31 -07:00
pclouds@gmail.com 6b09c7883f Add revspec documentation for ':path', ':[0-3]:path' and git-describe
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-18 21:43:30 -07:00
Junio C Hamano 74e2abe5b7 diff --numstat
[jc: with documentation from Jakub]

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-13 21:37:10 -07:00
Junio C Hamano b6945f570a git-repack: repo.usedeltabaseoffset
When configuration variable `repack.UseDeltaBaseOffset` is set
for the repository, the command passes `--delta-base-offset`
option to `git-pack-objects`; this typically results in slightly
smaller packs, but the generated packs are incompatible with
versions of git older than (and including) v1.4.3.

We will make it default to true sometime in the future, but not
for a while.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-13 21:28:58 -07:00
Rene Scharfe 23bed43d0c Documentation: add missing second colons and remove a typo
It takes two colons to mark text as item label.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-12 09:42:36 -07:00
Junio C Hamano b24642b2f2 blame: Document and add help text for -f, -n, and -p
New options --show-name, --show-number and --porcelain were not
documented.  Also add -p as a short-hand for --porcelain for
consistency.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-12 00:44:27 -07:00
Eric Wong e8f5d9081c Documentation/git-svn: document some of the newer features
I've forgotten to document many of the features added along the
way in the manpages.  This fills in some holes in the
documentation and adds updates some outdated information.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-11 15:24:15 -07:00
Junio C Hamano 63fba759bc pack-objects: document --delta-base-offset option
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-10 01:06:20 -07:00
Nicolas Pitre 4e27fb06f0 add commit count options to git-shortlog
This patch does 3 things:

1) Output the number of commits along with the name for each author
   (nice to know for long lists spending more than a screen worth of
   commit lines).

2) Provide a switch (-n) to sort authors according to their number of
   commits instead of author alphabetic order.

3) Provide a switch (-s) to supress commit lines and only keep a
   summary of authors and the number of commits for each of them.

And for good measure a short usage is displayed with -h.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-09 20:23:09 -07:00
Junio C Hamano 4057deb5de core.logallrefupdates create new log file only for branch heads.
It used to mean "create log file for any ref that is updated",
but now it creates new log files only for branch heads.

The old behaviour made this configuration less useful than
otherwise it would be; automatically creating log file for tags
is almost always not useful.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-08 01:35:18 -07:00
Dennis Stosberg 3df196716e Add default values for --window and --depth to the docs
Currently, you actually have to read the source to find out the
default values. While at it, fix two typos and suggest that these
options actually take a parameter in git-pack-objects.txt.

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-06 02:53:39 -07:00
Junio C Hamano abd6970aca cherry-pick: make -r the default
And introduce -x to expose (possibly) private commit object name
for people who cherry-pick between public branches.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-05 17:54:14 -07:00
Franck Bui-Huu 6030649591 Add git-upload-archive to the main git man page
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-05 01:57:18 -07:00
Robert Shearman b758789c20 git-rebase: Add a -v option to show a diffstat of the changes upstream at the start of a rebase.
Signed-off-by: Robert Shearman <rob@codeweavers.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-04 15:02:04 -07:00
Junio C Hamano 54bd25580e escape tilde in Documentation/git-rev-parse.txt
Fixes a failure to build the git-rev-parse manpage, seen with
asciidoc 8.0.0

We would love to use nicer quoting $$~$$ but alas asciidoc 7
does not know about it.  So use asciidoc.conf and define {tilde}
to be &#126;.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-10-03 01:04:19 -07:00
Junio C Hamano ff989b8d46 Merge branch 'master' into lj/refs
* master: (99 commits)
  lock_ref_sha1_basic does not remove empty directories on BSD
  git-push: .git/remotes/ file does not require SP after colon
  git-mv: invalidate the removed path properly in cache-tree
  Makefile: install and clean merge-recur, still.
  GIT 1.4.3-rc1
  gitweb: tree view: hash_base and hash are now context sensitive
  git-diff -B output fix.
  fetch: Reset remote refs list each time fetch_main is called
  Remove -fPIC which was only needed for Git.xs
  Fix approxidate() to understand 12:34 AM/PM are 00:34 and 12:34
  git-diff -B output fix.
  Make cvsexportcommit remove files.
  diff --stat: ensure at least one '-' for deletions, and one '+' for additions
  diff --stat=width[,name-width]: allow custom diffstat output width.
  gitweb: History: blob and tree are first, then commitdiff, etc
  gitweb: Remove redundant "commit" from history
  http/ftp: optionally ask curl to not use EPSV command
  gitweb: Don't use quotemeta on internally generated strings
  gitweb: Add snapshot to shortlog
  gitweb: Factor out gitweb_have_snapshot()
  ...
2006-10-02 11:49:59 -07:00
Junio C Hamano 2eaf22242f show-ref --hash=len, --abbrev=len, and --abbrev
This teaches show-ref to abbreviate the object name.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-01 00:32:44 -07:00
Junio C Hamano 69de8cc852 Merge branch 'jc/gitpm'
* jc/gitpm: (52 commits)
  Remove -fPIC which was only needed for Git.xs
  Git.pm: Kill Git.xs for now
  Revert "Make it possible to set up libgit directly (instead of from the environment)"
  Revert "Git.pm: Introduce fast get_object() method"
  Revert "Convert git-annotate to use Git.pm"
  Fix compilation with Sun CC
  pass DESTDIR to the generated perl/Makefile
  Eliminate Scalar::Util usage from private-Error.pm
  Convert git-annotate to use Git.pm
  Git.pm: Introduce fast get_object() method
  Make it possible to set up libgit directly (instead of from the environment)
  Work around sed and make interactions on the backslash at the end of line.
  Git.pm: Introduce ident() and ident_person() methods
  Convert git-send-email to use Git.pm
  Git.pm: Add config() method
  Use $GITPERLLIB instead of $RUNNING_GIT_TESTS and centralize @INC munging
  INSTALL: a tip for running after building but without installing.
  Perly Git: make sure we do test the freshly built one.
  Git.pm: Don't #define around die
  Git.xs: older perl do not know const char *
  ...
2006-09-30 23:38:24 -07:00
Junio C Hamano dd0c367e5e Merge branch 'jc/diff-stat'
* jc/diff-stat:
  diff --stat: ensure at least one '-' for deletions, and one '+' for additions
  diff --stat=width[,name-width]: allow custom diffstat output width.
  diff --stat: color output.
  diff --stat: allow custom diffstat output width.
2006-09-30 21:29:18 -07:00
Linus Torvalds 5c5b2ea9ab diff --stat=width[,name-width]: allow custom diffstat output width.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-28 22:27:29 -07:00
Sasha Khapyorsky 3ea099d48b http/ftp: optionally ask curl to not use EPSV command
If http.noEPSV config variable is defined and true, or if
GIT_CURL_FTP_NO_EPSV environment variable is defined, disable using
of EPSV ftp command (PASV will be used instead). This is helpful with
some "poor" ftp servers which does not support EPSV mode.

Signed-off-by: Sasha Khapyorsky <sashak@voltaire.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-28 19:02:46 -07:00
Junio C Hamano 0ab7befa31 grep --all-match
This lets you say:

	git grep --all-match -e A -e B -e C

to find lines that match A or B or C but limit the matches from
the files that have all of A, B and C.

This is different from

	git grep -e A --and -e B --and -e C

in that the latter looks for a single line that has all of these
at the same time.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-27 23:59:09 -07:00
Junio C Hamano 2958d9b5db Merge branch 'master' into lj/refs
* master: (72 commits)
  runstatus: do not recurse into subdirectories if not needed
  grep: fix --fixed-strings combined with expression.
  grep: free expressions and patterns when done.
  Corrected copy-and-paste thinko in ignore executable bit test case.
  An illustration of rev-list --parents --pretty=raw
  Allow git-checkout when on a non-existant branch.
  gitweb: Decode long title for link tooltips
  git-svn: Fix fetch --no-ignore-externals with GIT_SVN_NO_LIB=1
  Ignore executable bit when adding files if filemode=0.
  Remove empty ref directories that prevent creating a ref.
  Use const for interpolate arguments
  git-archive: update documentation
  Deprecate merge-recursive.py
  gitweb: fix over-eager application of esc_html().
  Allow '(no author)' in git-svn's authors file.
  Allow 'svn fetch' on '(no date)' revisions in Subversion.
  git-repack: allow git-repack to run in subdirectory
  Remove upload-tar and make git-tar-tree a thin wrapper to git-archive
  git-tar-tree: Move code for git-archive --format=tar to archive-tar.c
  git-tar-tree: Remove duplicate git_config() call
  ...
2006-09-27 22:23:12 -07:00
Junio C Hamano 194db7e3bb Merge branch 'jc/for-each-ref' into jc/ref-locking
* jc/for-each-ref:
  git-for-each-ref: improve the documentation on scripting modes
2006-09-27 22:00:54 -07:00
Jon Loeliger dd4676299d Cleaned up git-daemon virtual hosting support.
Standardized on lowercase hostnames from client.

Added interpolation values for the IP address, port and
canonical hostname of the server as it is contacted and
named by the client and passed in via the extended args.

Added --listen=host_or_ipaddr option suport.  Renamed port
variable as "listen_port" correspondingly as well.

Documented mutual exclusivity of --inetd option with
    --user, --group, --listen and --port options.

Added compat/inet_pton.c from Paul Vixie as needed.

Small memory leaks need to be cleaned up still.

Signed-off-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-27 18:00:52 -07:00
Junio C Hamano ac5409e420 update-ref: -d flag and ref creation safety.
This adds -d flag to update-ref to allow safe deletion of ref.
Before deleting it, the command checks if the given <oldvalue>
still matches the value the caller thought the ref contained.

Similarly, it also accepts 0{40} or an empty string as <oldvalue>
to allow safe creation of a new ref.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-27 02:01:42 -07:00
Junio C Hamano e9800b28c2 Merge branch 'jc/lt-ref2-with-lt-refs' into jc/ref-locking
* jc/lt-ref2-with-lt-refs:
  Fix show-ref usage for --dereference.
  Document git-show-ref [-s|--hash] option.
  Add man page for git-show-ref
  gitignore: git-show-ref is a generated file.
  Use Linus' show ref in "git-branch.sh".
  Add [-s|--hash] option to Linus' show-ref.
  Teach "git checkout" to use git-show-ref
  Add "git show-ref" builtin command
2006-09-27 00:53:29 -07:00