1
0
mirror of https://github.com/git/git.git synced 2024-09-30 07:51:31 +02:00
Commit Graph

1267 Commits

Author SHA1 Message Date
Shawn O. Pearce
0f39087589 Cleanup subcommand documentation for git-remote.
Jakub Narebski pointed out the positional notation in git-remote's
documentation was very confusing, especially now that we have 3
supported subcommands.  Instead of referring to subcommands by
position, refer to them by name.

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

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

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

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

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

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

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

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

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

(4) Alice pulls from me again:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Add more discussion of history rewriting.

And a bunch of other miscellaneous changes....

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

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

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

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

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

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

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

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

--exec continues to work.

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22 12:54:02 -08:00