Commit graph

1321 commits

Author SHA1 Message Date
Johannes Schindelin 83a5ad6126 fetch & clone: do not output progress when not on a tty
This adds the option "--no-progress" to fetch-pack and upload-pack,
and makes fetch and clone pass this option when stdout is not a tty.

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

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-19 19:20:05 -08:00
Junio C Hamano 26cfcfbff4 Add release notes to the distribution.
This also adds a hook in the Makefile I can use to automatically
include pointers to documentation for older releases when updating
the pages at http://kernel.org/pub/software/scm/git/docs/.

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

Pointed out by Matthias Lederhofer.

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

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

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-12 22:00:45 -08:00
Matthias Lederhofer 1e8b0d486e git merge documentation: -m is optional
Changed -m=<msg> to -m <msg> too.

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

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

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

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

New test cases for these were also added.

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

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

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

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

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

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

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

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

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

and is fairly straightforward. So you can just write

	git reflog

or

	git reflog show

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	git cvsexportcommit -P cvshead mybranch

without having to do so in git first.

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

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

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

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

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

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

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-04 11:43:45 -08:00