1
0
mirror of https://github.com/git/git.git synced 2024-09-30 10:11:21 +02:00
Commit Graph

1267 Commits

Author SHA1 Message Date
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
d320a5437f8304cf9ea3ee1898e49d643e005738.

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 4c81c213a479e4aae0653a56ad6e8db5c31f019c.

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 fec9ebf16c948bcb4a8b88d0173ee63584bcde76
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 954a6183756a073723a7c9fd8d2feb13132876b0
  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