Commit graph

4121 commits

Author SHA1 Message Date
Dmitry Potapov 05d3951ec9 git-archive: add '-o' as a alias for '--output'
The '-o' option is commonly used in many tools to specify the output file.
Typing '--output' every time is a bit too long to be a practical alternative
to redirecting output. But specifying the output name has the advantage of
making possible to guess the desired output format by filename extension.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13 13:23:40 -07:00
Johannes Gilger 65d15ed992 git-clone doc: typofix
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13 11:58:54 -07:00
Nelson Elhage 9f67fee2f0 git-push: Accept -n as a synonym for --dry-run.
git-push is not currently using -n for anything else, and it seems
unlikely we will want to use it to mean anything else in the future,
so add it as an alias for convenience.

Signed-off-by: Nelson Elhage <nelhage@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13 11:29:18 -07:00
Junio C Hamano 12efe45a33 git-commit doc: remove duplicated --dry-run description
60c2993 (Documentation/git-commit.txt: describe --dry-run, 2009-08-15)
wanted to update the documentation to say that "git status" is not the
same as "git commit --dry-run" anymore, but it screwed up and also added
the description of --dry-run that was already present.

Noticed by Johannes Gilger.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13 11:24:26 -07:00
Junio C Hamano eaf1c941bb GIT 1.6.5-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13 01:50:33 -07:00
Jari Aalto 5f2b1e67ca Improve --patch option documentation in git-add
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13 01:36:13 -07:00
Junio C Hamano 79cb645f9a Merge branch 'jt/pushinsteadof'
* jt/pushinsteadof:
  Add url.<base>.pushInsteadOf: URL rewriting for push only
  Wrap rewrite globals in a struct in preparation for adding another set
2009-09-13 01:33:20 -07:00
Junio C Hamano dc1b0c06ee Merge branch 'jk/unwanted-advices'
* jk/unwanted-advices:
  status: make "how to stage" messages optional
  push: make non-fast-forward help message configurable
2009-09-13 01:33:18 -07:00
Junio C Hamano 1cdd64e800 quiltimport documentation: --dry-run and -n are synonyms
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13 01:32:49 -07:00
Junio C Hamano cd03eebbfd Merge branch 'db/vcs-helper'
* db/vcs-helper:
  Makefile: remove remnant of separate http/https/ftp helpers
  Use a clearer style to issue commands to remote helpers
  Make the "traditionally-supported" URLs a special case
  Makefile: install hardlinks for git-remote-<scheme> supported by libcurl if possible
  Makefile: do not link three copies of git-remote-* programs
  Makefile: git-http-fetch does not need expat
  http-fetch: Fix Makefile dependancies
  Add transport native helper executables to .gitignore
  git-http-fetch: not a builtin
  Use an external program to implement fetching with curl
  Add support for external programs for handling native fetches
2009-09-13 01:31:55 -07:00
Junio C Hamano 5b590d783a Merge branch 'maint'
* maint:
  GIT 1.6.4.3
  svn: properly escape arguments for authors-prog
  http.c: remove verification of remote packs
  grep: accept relative paths outside current working directory
  grep: fix exit status if external_grep() punts

Conflicts:
	GIT-VERSION-GEN
	RelNotes
2009-09-13 01:30:53 -07:00
Junio C Hamano 7fb6bcff2d GIT 1.6.4.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13 01:28:13 -07:00
Jeff King edf563fbaa status: make "how to stage" messages optional
These messages are nice for new users, but experienced git
users know how to manipulate the index, and these messages
waste a lot of screen real estate.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-11 21:33:24 -07:00
Jeff King 75194438f4 push: make non-fast-forward help message configurable
This message is designed to help new users understand what
has happened when refs fail to push. However, it does not
help experienced users at all, and significantly clutters
the output, frequently dwarfing the regular status table and
making it harder to see.

This patch introduces a general configuration mechanism for
optional messages, with this push message as the first
example.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-11 21:33:20 -07:00
Nicolas Sebrecht 434a6db7dc add documentation for mailinfo.scissors and '--no-scissors'
Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-11 00:23:07 -07:00
Josh Triplett 1c2eafb89b Add url.<base>.pushInsteadOf: URL rewriting for push only
This configuration option allows systematically rewriting fetch-only URLs
to push-capable URLs when used with push.  For instance:

[url "ssh://example.org/"]
    pushInsteadOf = "git://example.org/"

This will allow clones of "git://example.org/path/to/repo" to subsequently
push to "ssh://example.org/path/to/repo", without manually configuring
pushurl for that remote.

Includes documentation for the new option, bash completion updates, and
test cases (both that pushInsteadOf applies to push, that it does not
apply to fetch, and that it is ignored when pushURL is already defined).

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-08 01:18:46 -07:00
Junio C Hamano 5ad9dce7e6 GIT 1.6.5-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-07 17:20:02 -07:00
Junio C Hamano df01e7c5ee Merge branch 'maint'
* maint:
  git-pull: do not mention --quiet and --verbose twice
  githooks.txt: put hooks into subsections
2009-09-07 15:45:48 -07:00
Emmanuel Trillaud 90e431152e git-pull: do not mention --quiet and --verbose twice
git-pull.txt includes fetch-options.txt and merge-options.txt, both of
which document the --quiet and --verbose.

Supress the ones from fetch-options.txt.

Signed-off-by: Emmanuel Trillaud <etrillaud@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-07 15:45:13 -07:00
Bert Wesarg 6d71c1dca4 githooks.txt: put hooks into subsections
All hooks are currently in its own section. Which may confuse users,
because the section name serves as the hook file name and sections are
all caps for man pages. Putting them into a new HOOKS section and each
hook into a subsection keeps the case to lower case.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-07 15:45:13 -07:00
Junio C Hamano b8711f520b Merge branch 'jc/mailinfo-scissors'
* jc/mailinfo-scissors:
  mailinfo.scissors: new configuration
  am/mailinfo: Disable scissors processing by default
  Documentation: describe the scissors mark support of "git am"
  Teach mailinfo to ignore everything before -- >8 -- mark
  builtin-mailinfo.c: fix confusing internal API to mailinfo()
2009-09-07 15:25:37 -07:00
Junio C Hamano 2da9f8e370 Merge branch 'jk/clone-b'
* jk/clone-b:
  clone: add --branch option to select a different HEAD
2009-09-07 15:24:53 -07:00
Junio C Hamano e4d1afbcf2 Merge branch 'jc/upload-pack-hook'
* jc/upload-pack-hook:
  upload-pack: feed "kind [clone|fetch]" to post-upload-pack hook
  upload-pack: add a trigger for post-upload-pack hook
2009-09-07 15:24:47 -07:00
Junio C Hamano 54f0bdc811 Merge branch 'tr/reset-checkout-patch'
* tr/reset-checkout-patch:
  stash: simplify defaulting to "save" and reject unknown options
  Make test case number unique
  tests: disable interactive hunk selection tests if perl is not available
  DWIM 'git stash save -p' for 'git stash -p'
  Implement 'git stash save --patch'
  Implement 'git checkout --patch'
  Implement 'git reset --patch'
  builtin-add: refactor the meat of interactive_add()
  Add a small patch-mode testing library
  git-apply--interactive: Refactor patch mode code
  Make 'git stash -k' a short form for 'git stash save --keep-index'
2009-09-07 15:24:38 -07:00
Junio C Hamano aeb84b05ae core.whitespace: split trailing-space into blank-at-{eol,eof}
People who configured trailing-space depended on it to catch both extra
white space at the end of line, and extra blank lines at the end of file.
Earlier attempt to introduce only blank-at-eof gave them an escape hatch
to keep the old behaviour, but it is a regression until they explicitly
specify the new error class.

This introduces a blank-at-eol that only catches extra white space at the
end of line, and makes the traditional trailing-space a convenient synonym
to catch both blank-at-eol and blank-at-eof.  This way, people who used
trailing-space continue to catch both classes of errors.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-05 23:14:31 -07:00
Junio C Hamano 77b15bbd88 apply --whitespace=warn/error: diagnose blank at EOF
"git apply" strips new blank lines at EOF under --whitespace=fix option,
but neigher --whitespace=warn nor --whitespace=error paid any attention to
these errors.

Introduce a new whitespace error class, blank-at-eof, to make the
whitespace error handling more consistent.

The patch adds a new "linenr" field to the struct fragment in order to
record which line the hunk started in the input file, but this is needed
solely for reporting purposes.  The detection of this class of whitespace
errors cannot be done while parsing a patch like we do for all the other
classes of whitespace errors.  It instead has to wait until we find where
to apply the hunk, but at that point, we do not have an access to the
original line number in the input file anymore, hence the new field.

Depending on your point of view, this may be a bugfix that makes warn and
error in line with fix.  Or you could call it a new feature.  The line
between them is somewhat fuzzy in this case.

Strictly speaking, triggering more errors than before is a change in
behaviour that is not backward compatible, even though the reason for the
change is because the code was not checking for an error that it should
have.  People who do not want added blank lines at EOF to trigger an error
can disable the new error class.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-04 11:50:26 -07:00
Junio C Hamano 79b4fde573 Merge branch 'maint'
* maint:
  git-clone: add missing comma in --reference documentation
2009-09-03 09:43:08 -07:00
Junio C Hamano bc29df6022 Merge branch 'maint-1.6.3' into maint
* maint-1.6.3:
  git-clone: add missing comma in --reference documentation
  git-cvsserver: no longer use deprecated 'git-subcommand' commands
  clone: disconnect transport after fetching
2009-09-03 09:42:56 -07:00
Junio C Hamano ba7e81430a Merge branch 'maint-1.6.2' into maint-1.6.3
* maint-1.6.2:
  git-clone: add missing comma in --reference documentation
  clone: disconnect transport after fetching
2009-09-03 09:42:38 -07:00
Miklos Vajna 405923761a git-clone: add missing comma in --reference documentation
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-03 09:41:56 -07:00
Matthieu Moy 3c2eb80fe3 stash: simplify defaulting to "save" and reject unknown options
With the earlier DWIM patches, certain combination of options defaulted
to the "save" command correctly while certain equally valid combination
did not.  For example, "git stash -k" were Ok but "git stash -q -k" did
not work.

This makes the logic of defaulting to "save" much simpler. If there are no
non-flag arguments, it is clear that there is no command word, and we
default to "save" subcommand.  This rule prevents "git stash -q apply"
from quietly creating a stash with "apply" as the message.

This also teaches "git stash save" to reject an unknown option.  This is
to keep a mistyped "git stash save --quite" from creating a stash with a
message "--quite", and this safety is more important with the new logic
to default to "save" with any option-looking argument without an explicit
comand word.

[jc: this is based on Matthieu's 3-patch series, and a follow-up
discussion, and he and Peff take all the credit; if I have introduced bugs
while reworking, they are mine.]

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-01 22:03:11 -07:00
Junio C Hamano f324cb50be Sync with 1.6.4.2 2009-08-29 14:52:03 -07:00
Junio C Hamano 82c3e21000 GIT 1.6.4.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-29 14:31:01 -07:00
René Scharfe f7aec129fa UI consistency: allow --force for where -f means force
git branch, checkout, clean, mv and tag all have an option -f to override
certain checks.  This patch makes them accept the long option --force as
a synonym.

While we're at it, document that checkout support --quiet as synonym for
its short option -q.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-29 14:08:03 -07:00
Junio C Hamano 11cae066b2 upload-pack: feed "kind [clone|fetch]" to post-upload-pack hook
A request to clone the repository does not give any "have" but asks for
all the refs we offer with "want".  When a request does not ask to clone
the repository fully, but asks to fetch some refs into an empty
repository, it will not give any "have" but its "want" won't ask for all
the refs we offer.

If we suppose (and I would say this is a rather big if) that it makes
sense to distinguish these two cases, a hook cannot reliably do this
alone.  The hook can detect lack of "have" and bunch of "want", but there
is no direct way to tell if the other end asked for all refs we offered,
or merely most of them.

Between the time we talked with the other end and the time the hook got
called, we may have acquired more refs or lost some refs in the repository
by concurrent operations.  Given that we plan to introduce selective
advertisement of refs with a protocol extension, it would become even more
difficult for hooks to guess between these two cases.

This adds "kind [clone|fetch]" to hook's input, as a stable interface to
allow the hooks to tell these cases apart.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-28 22:39:24 -07:00
Junio C Hamano a8563ec851 upload-pack: add a trigger for post-upload-pack hook
After upload-pack successfully finishes its operation, post-upload-pack
hook can be called for logging purposes.

The hook is passed various pieces of information, one per line, from its
standard input.  Currently the following items can be fed to the hook, but
more types of information may be added in the future:

    want SHA-1::
        40-byte hexadecimal object name the client asked to include in the
        resulting pack.  Can occur one or more times in the input.

    have SHA-1::
        40-byte hexadecimal object name the client asked to exclude from
        the resulting pack, claiming to have them already.  Can occur zero
        or more times in the input.

    time float::
        Number of seconds spent for creating the packfile.

    size decimal::
        Size of the resulting packfile in bytes.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-28 22:39:17 -07:00
Junio C Hamano d17982f19c Draft release notes to 1.6.5 before -rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-28 19:48:56 -07:00
Junio C Hamano 433233e0b6 Merge branch 'jc/shortstatus'
* jc/shortstatus:
  git commit --dry-run -v: show diff in color when asked
  Documentation/git-commit.txt: describe --dry-run
  wt-status: collect untracked files in a separate "collect" phase
  Make git_status_config() file scope static to builtin-commit.c
  wt-status: move wt_status_colors[] into wt_status structure
  wt-status: move many global settings to wt_status structure
  commit: --dry-run
  status: show worktree status of conflicted paths separately
  wt-status.c: rework the way changes to the index and work tree are summarized
  diff-index: keep the original index intact
  diff-index: report unmerged new entries
2009-08-28 19:38:19 -07:00
Junio C Hamano aab9ea1aad Merge branch 'maint'
* maint:
  Fix overridable written with an extra 'e'
  Documentation: git-archive: mark --format as optional in summary
  Round-down years in "years+months" relative date view
2009-08-27 22:01:01 -07:00
Junio C Hamano 749086fa09 Merge branch 'maint-1.6.3' into maint
* maint-1.6.3:
  Fix overridable written with an extra 'e'
  Documentation: git-archive: mark --format as optional in summary
  Round-down years in "years+months" relative date view
2009-08-27 20:42:42 -07:00
Junio C Hamano 5e64650d93 Merge branch 'maint-1.6.2' into maint-1.6.3
* maint-1.6.2:
  Fix overridable written with an extra 'e'
  Documentation: git-archive: mark --format as optional in summary
  Round-down years in "years+months" relative date view

Conflicts:
	Documentation/git-archive.txt
2009-08-27 20:42:38 -07:00
Nanako Shiraishi 9319789804 Fix overridable written with an extra 'e'
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-27 20:41:48 -07:00
Junio C Hamano 891182f914 Merge branch 'maint-1.6.1' into maint-1.6.2
* maint-1.6.1:
  Documentation: git-archive: mark --format as optional in summary
2009-08-27 20:41:37 -07:00
Junio C Hamano 66fd74ea5d Merge branch 'maint-1.6.0' into maint-1.6.1
* maint-1.6.0:
  Documentation: git-archive: mark --format as optional in summary
2009-08-27 20:41:31 -07:00
Wesley J. Landaker 82d97da30a Documentation: git-archive: mark --format as optional in summary
The --format option was made optional in 8ff21b1 (git-archive: make
tar the default format, 2007-04-09), but it was not marked as optional
in the summary. This trival patch just changes the summary to match
the rest of the documentation.

Signed-off-by: Wesley J. Landaker <wjl@icecavern.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-27 20:05:10 -07:00
Junio C Hamano adc5423531 Merge branch 'jh/submodule-foreach'
* jh/submodule-foreach:
  git clone: Add --recursive to automatically checkout (nested) submodules
  t7407: Use 'rev-parse --short' rather than bash's substring expansion notation
  git submodule status: Add --recursive to recurse into nested submodules
  git submodule update: Introduce --recursive to update nested submodules
  git submodule foreach: Add --recursive to recurse into nested submodules
  git submodule foreach: test access to submodule name as '$name'
  Add selftest for 'git submodule foreach'
  git submodule: Cleanup usage string and add option parsing to cmd_foreach()
  git submodule foreach: Provide access to submodule name, as '$name'

Conflicts:
	Documentation/git-submodule.txt
	git-submodule.sh
2009-08-27 16:59:25 -07:00
Junio C Hamano c3f0cadfa8 Merge branch 'wl/insta-mongoose'
* wl/insta-mongoose:
  Add support for the Mongoose web server.
2009-08-27 16:57:34 -07:00
Junio C Hamano 017678b4f4 am/mailinfo: Disable scissors processing by default
You can enable it by giving --scissors to "git am".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-26 22:22:22 -07:00
Nanako Shiraishi f43c97f572 Documentation: describe the scissors mark support of "git am"
Describe what a scissors mark looks like, and explain in what situation
it is often used.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-26 22:21:33 -07:00
Jeff King 7a4ee28f41 clone: add --branch option to select a different HEAD
We currently point the HEAD of a newly cloned repo to the
same ref as the parent repo's HEAD. While a user can then
"git checkout -b foo origin/foo" whichever branch they
choose, it is more convenient and more efficient to tell
clone which branch you want in the first place.

Based on a patch by Kirill A. Korinskiy.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-26 19:36:20 -07:00
Junio C Hamano 68ea474164 Merge branch 'maint'
* maint:
  git-log: allow --decorate[=short|full]
  Minor improvement to the write-tree documentation
  git-bisect: call the found commit "*the* first bad commit"
2009-08-26 12:15:15 -07:00
Lars Hjemli d8526a4c3b git-log: allow --decorate[=short|full]
Commit de435ac0 changed the behavior of --decorate from printing the
full ref (e.g., "refs/heads/master") to a shorter, more human-readable
version (e.g., just "master"). While this is nice for human readers,
external tools using the output from "git log" may prefer the full
version.

This patch introduces an extension to --decorate to allow the caller to
specify either the short or the full versions.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-26 12:05:58 -07:00
David Kågedal 8d95184395 Minor improvement to the write-tree documentation
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-26 12:05:58 -07:00
Junio C Hamano b8132342e9 Merge branch 'jc/maint-clean-nested-dir-safety' into maint
* jc/maint-clean-nested-dir-safety:
  clean: require double -f options to nuke nested git repository and work tree
2009-08-26 12:05:57 -07:00
Junio C Hamano 079f298513 Merge branch 'jl/submodule-summary-diff-files'
* jl/submodule-summary-diff-files:
  Documentaqtion/git-submodule.txt: Typofix
  git submodule summary: add --files option
2009-08-25 14:46:43 -07:00
Junio C Hamano d6d994d911 Merge branch 'lh/short-decorate'
* lh/short-decorate:
  git-log: allow --decorate[=short|full]
2009-08-25 14:46:12 -07:00
Nanako Shiraishi b85e6c5f81 Documentation: consistently refer to check-ref-format
Change the <name> placeholder to <tagname> in the SYNOPSIS section of
git-tag documentation, and describe it in the OPTIONS section in a way
similar to how documentation for git-branch does.

Add SEE ALSO section to list the other documentation pages these two pages
refer to.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-25 13:06:18 -07:00
Junio C Hamano 2e1176d51e Merge branch 'jc/verify-pack-stat'
* jc/verify-pack-stat:
  verify-pack --stat-only: show histogram without verifying
2009-08-23 17:19:19 -07:00
Wilhansen Li 0ded47581a Add support for the Mongoose web server.
Mongoose (http://code.google.com/p/mongoose/) is a lightweight web
server. It's just a single binary so it's a lot simpler to configure and
install.

Signed-off-by: Wilhansen Li <wil@nohakostudios.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-23 15:03:53 -07:00
Junio C Hamano 32f4cc49ae Sync with 1.6.4.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-21 20:23:10 -07:00
Junio C Hamano d9b9784f57 GIT 1.6.4.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-21 20:16:10 -07:00
Junio C Hamano f00ecbe42b Merge branch 'cc/replace'
* cc/replace:
  t6050: check pushing something based on a replaced commit
  Documentation: add documentation for "git replace"
  Add git-replace to .gitignore
  builtin-replace: use "usage_msg_opt" to give better error messages
  parse-options: add new function "usage_msg_opt"
  builtin-replace: teach "git replace" to actually replace
  Add new "git replace" command
  environment: add global variable to disable replacement
  mktag: call "check_sha1_signature" with the replacement sha1
  replace_object: add a test case
  object: call "check_sha1_signature" with the replacement sha1
  sha1_file: add a "read_sha1_file_repl" function
  replace_object: add mechanism to replace objects found in "refs/replace/"
  refs: add a "for_each_replace_ref" function
2009-08-21 18:47:53 -07:00
Junio C Hamano 5e092b5bce Merge branch 'gb/apply-ignore-whitespace'
* gb/apply-ignore-whitespace:
  git apply: option to ignore whitespace differences
2009-08-21 18:47:48 -07:00
Junio C Hamano f393747c4c Merge branch 'np/maint-limit-delta-cache' into maint
* np/maint-limit-delta-cache:
  don't let the delta cache grow unbounded in 'git repack'
2009-08-21 11:34:02 -07:00
Johan Herland e7fed18a89 git clone: Add --recursive to automatically checkout (nested) submodules
Many projects using submodules expect all submodules to be checked out
in order to build/work correctly. A common command sequence for
developers on such projects is:

	git clone url/to/project
	cd project
	git submodule update --init (--recursive)

This patch introduces the --recursive option to git-clone. The new
option causes git-clone to recursively clone and checkout all
submodules of the cloned project. Hence, the above command sequence
can be reduced to:

	git clone --recursive url/to/project

--recursive is ignored if no checkout is done by the git-clone.

The patch also includes documentation and a selftest.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-20 16:59:50 -07:00
Johan Herland 64b19ffedd git submodule status: Add --recursive to recurse into nested submodules
In very large and hierarchically structured projects, one may encounter
nested submodules. In these situations, it is valuable to not only show
status for all the submodules in the current repo (which is what is
currently done by 'git submodule status'), but also to show status for
all submodules at all levels (i.e. recursing into nested submodules as
well).

This patch teaches the new --recursive option to the 'git submodule status'
command. The patch also includes documentation and selftests.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-18 22:59:58 -07:00
Johan Herland b13fd5c1a2 git submodule update: Introduce --recursive to update nested submodules
In very large and hierarchically structured projects, one may encounter
nested submodules. In these situations, it is valuable to not only update
the submodules in the current repo (which is what is currently done by
'git submodule update'), but also to operate on all submodules at all
levels (i.e. recursing into nested submodules as well).

This patch teaches the new --recursive option to the 'git submodule update'
command. The patch also includes documentation and selftests.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-18 22:59:12 -07:00
Johan Herland 15fc56a853 git submodule foreach: Add --recursive to recurse into nested submodules
In very large and hierarchically structured projects, one may encounter
nested submodules. In these situations, it is valuable to not only operate
on all the submodules in the current repo (which is what is currently done
by 'git submodule foreach'), but also to operate on all submodules at all
levels (i.e. recursing into nested submodules as well).

This patch teaches the new --recursive option to the 'git submodule foreach'
command. The patch also includes documentation and selftests.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-18 22:57:37 -07:00
Tuomas Suutari 61f36a79da git-svn.txt: Fix location of parent argument
The note about interoperating in different timezones and such is about
localtime argument, not parent.

Signed-off-by: Tuomas Suutari <tuomas.suutari@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2009-08-18 20:47:11 -07:00
Junio C Hamano 3f189d0ffc Merge branch 'maint'
* maint:
  filter-branch: make the usage string fit on 80 chars terminals.
  filter-branch: add an example how to add ACKs to a range of commits
  docs: describe impact of repack on "clone -s"
2009-08-18 14:40:10 -07:00
Lars Hjemli 33e7018c45 git-log: allow --decorate[=short|full]
Commit de435ac0 changed the behavior of --decorate from printing the
full ref (e.g., "refs/heads/master") to a shorter, more human-readable
version (e.g., just "master"). While this is nice for human readers,
external tools using the output from "git log" may prefer the full
version.

This patch introduces an extension to --decorate to allow the caller to
specify either the short or the full versions.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-18 13:14:17 -07:00
Johan Herland 1e7f2aad7d git submodule foreach: Provide access to submodule name, as '$name'
The argument to 'git submodule foreach' already has access to the variables
'$path' (the path to the submodule, relative to the superproject) and '$sha1'
(the submodule commit recorded by the superproject).

This patch adds another variable -- '$name' -- which contains the name of the
submodule, as recorded in the superproject's .gitmodules file.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-18 12:27:57 -07:00
Johannes Schindelin b8f423327b filter-branch: add an example how to add ACKs to a range of commits
When you have to add certain lines like ACKs (or for that matter,
Signed-off-by:s) to a range of commits starting with HEAD, you might
be tempted to use 'git rebase -i -10', but that is a waste of your
time.

It is better to use 'git filter-branch' with an appropriate message
filter, and this commit adds an example how to do so to
filter-branch's man page.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-18 12:20:58 -07:00
Jeff King 13354f5377 docs: describe impact of repack on "clone -s"
The effects of repacking on a repository with alternates are a bit
subtle. The two main things users will want are:

  1. Not to waste disk space by accidentally copying objects which could
     be shared.

  2. Copying all objects explicitly to break the dependency on the source
     repo.

This patch describes both under the "clone -s" documentation. It makes
sense to put it there rather than in git-repack.txt for both cases.

For (1), we are warning the user who is using "clone -s" about what _not_
to do, so we need to get their attention when reading about "clone -s".

For (2), we are telling them how git-repack can be used to accomplish a
task, but until they know that git-repack is the right tool, they have no
reason to look at the repack documentation.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-17 00:03:39 -07:00
Junio C Hamano 14683af812 Merge branch 'jc/maint-clean-nested-dir-safety'
* jc/maint-clean-nested-dir-safety:
  clean: require double -f options to nuke nested git repository and work tree
2009-08-16 04:13:13 -07:00
Thomas Rast f300fab544 DWIM 'git stash save -p' for 'git stash -p'
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-15 15:21:22 -07:00
Junio C Hamano 367ea191e6 Merge branch 'js/stash-dwim' into tr/reset-checkout-patch
* commit 'tr/reset-checkout-patch^^2':
  Make 'git stash -k' a short form for 'git stash save --keep-index'
2009-08-15 15:20:28 -07:00
Thomas Rast dda1f2a5c3 Implement 'git stash save --patch'
This adds a hunk-based mode to git-stash.  You can select hunks from
the difference between HEAD and worktree, and git-stash will build a
stash that reflects these changes.  The index state of the stash is
the same as your current index, and we also let --patch imply
--keep-index.

Note that because the selected hunks are rolled back from the worktree
but not the index, the resulting state may appear somewhat confusing
if you had also staged these changes.  This is not entirely
satisfactory, but due to the way stashes are applied, other solutions
would require a change to the stash format.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-15 15:19:31 -07:00
Thomas Rast 4f353658b9 Implement 'git checkout --patch'
This introduces a --patch mode for git-checkout.  In the index usage

  git checkout --patch -- [files...]

it lets the user discard edits from the <files> at the granularity of
hunks (by selecting hunks from 'git diff' and then reverse applying
them to the worktree).

We also accept a revision argument.  In the case

  git checkout --patch HEAD -- [files...]

we offer hunks from the difference between HEAD and the worktree, and
reverse applies them to both index and worktree, allowing you to
discard staged changes completely.  In the non-HEAD usage

  git checkout --patch <revision> -- [files...]

it offers hunks from the difference between the worktree and
<revision>.  The chosen hunks are then applied to both index and
worktree.

The application to worktree and index is done "atomically" in the
sense that we first check if the patch applies to the index (it should
always apply to the worktree).  If it does not, we give the user a
choice to either abort or apply to the worktree anyway.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-15 15:18:05 -07:00
Thomas Rast d002ef4d94 Implement 'git reset --patch'
This introduces a --patch mode for git-reset.  The basic case is

  git reset --patch -- [files...]

which acts as the opposite of 'git add --patch -- [files...]': it
offers hunks for *un*staging.  Advanced usage is

  git reset --patch <revision> -- [files...]

which offers hunks from the diff between the index and <revision> for
forward application to the index.  (That is, the basic case is just
<revision> = HEAD.)

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-15 15:17:47 -07:00
Junio C Hamano 60c2993c92 Documentation/git-commit.txt: describe --dry-run
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-15 01:58:37 -07:00
Lars Hjemli ef92e1a436 Documentaqtion/git-submodule.txt: Typofix
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-15 01:50:52 -07:00
Jens Lehmann 1c244f6ee5 git submodule summary: add --files option
git submodule summary is providing similar functionality for submodules as
git diff-index does for a git project (including the meaning of --cached).
But the analogon to git diff-files is missing, so add a --files option to
summarize the differences between the index of the super project and the
last commit checked out in the working tree of the submodule.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-14 19:50:11 -07:00
Junio C Hamano 6ffd781226 Merge branch 'maint'
* maint:
  push: point to 'git pull' and 'git push --force' in case of non-fast forward
  Documentation: add: <filepattern>... is optional
  Change mentions of "git programs" to "git commands"
  Documentation: merge: one <remote> is required
  help.c: give correct structure's size to memset()
2009-08-12 16:36:04 -07:00
Junio C Hamano 2cd9c2aff0 Merge branch 'maint-1.6.3' into maint
* maint-1.6.3:
  Change mentions of "git programs" to "git commands"
  Documentation: merge: one <remote> is required
  help.c: give correct structure's size to memset()
2009-08-12 16:15:55 -07:00
Matthieu Moy 07436e43da push: point to 'git pull' and 'git push --force' in case of non-fast forward
'git push' failing because of non-fast forward is a very common situation,
and a beginner does not necessarily understand "fast forward" immediately.

Add a new section to the git-push documentation and refer them to it.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-12 16:15:47 -07:00
Paul Bolle e89df7dcda Documentation: add: <filepattern>... is optional
<filepattern>... is optional (e.g. when the --all or --update
options are used) so use square brackets in the synopsis.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-12 16:15:47 -07:00
Ori Avtalion 57f6ec0290 Change mentions of "git programs" to "git commands"
Most of the docs and printouts refer to "commands" when discussing what
the end users call via the "git" top-level program. We should refer them
as "git programs" when we discuss the fact that the commands are
implemented as separate programs, but in other contexts, it is better to
use the term "git commands" consistently.

Signed-off-by: Ori Avtalion <ori@avtalion.name>
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-12 16:14:41 -07:00
Paul Bolle 22f1fb66be Documentation: merge: one <remote> is required
merge only requires one <remote>, so "<remote>..." should be used in the
synopsis (and not "<remote> <remote>...").

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-12 16:14:32 -07:00
Junio C Hamano efd1796838 Merge branch 'maint'
* maint:
  Fix typos in git-remote.txt and git-symbolic-ref.txt
  git-instaweb: fix mod_perl detection for apache2
2009-08-10 22:23:59 -07:00
Junio C Hamano e532e7b08f Merge branch 'maint-1.6.3' into maint
* maint-1.6.3:
  Fix typos in git-remote.txt and git-symbolic-ref.txt
2009-08-10 22:23:48 -07:00
Junio C Hamano efd3f9fdbc Merge branch 'np/maint-limit-delta-cache'
* np/maint-limit-delta-cache:
  don't let the delta cache grow unbounded in 'git repack'
2009-08-10 22:16:09 -07:00
Junio C Hamano 67f272c2f2 Merge branch 'mk/grep-max-depth'
* mk/grep-max-depth:
  grep: Add --max-depth option.
2009-08-10 22:15:12 -07:00
Junio C Hamano 08ac69685a Merge branch 'js/run-command-updates'
* js/run-command-updates:
  api-run-command.txt: describe error behavior of run_command functions
  run-command.c: squelch a "use before assignment" warning
  receive-pack: remove unnecessary run_status report
  run_command: report failure to execute the program, but optionally don't
  run_command: encode deadly signal number in the return value
  run_command: report system call errors instead of returning error codes
  run_command: return exit code as positive value
  MinGW: simplify waitpid() emulation macros
2009-08-10 22:14:57 -07:00
Štěpán Němec 75f492ace7 Fix typos in git-remote.txt and git-symbolic-ref.txt
Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-10 19:05:00 -07:00
Thomas Rast f5f1e164bd Document 'stash clear' recovery via unreachable commits
Add an example to the stash documentation that shows how to quickly
find candidate commits among the 'git fsck --unreachable' output.
Unless you have merges of branch names containing WIP, or edit your
merge messages to say WIP, there will be no false positives.

Snippet written by Björn "doener" Steinbrink and me after zepolen_
asked on IRC.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-09 18:33:41 -07:00
Johannes Sixt 0b91322311 api-run-command.txt: describe error behavior of run_command functions
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-08 13:51:25 -07:00
Junio C Hamano 3a5d13a3c3 commit: --dry-run
This teaches --dry-run option to "git commit".

It is the same as "git status", but in the longer term we would want to
change the semantics of "git status" not to be the preview of commit, and
this is the first step for doing so.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-07 23:03:36 -07:00
Junio C Hamano 6c4f3ec9b4 verify-pack --stat-only: show histogram without verifying
When this option is given, the command does not verify the pack contents,
but shows the delta chain histogram.  If used with --verbose, the usual
list of objects is also shown.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-07 20:45:31 -07:00
Junio C Hamano 7ecc9b153c Merge branch 'maint' into jc/verify-pack-stat
* maint: (95 commits)
  verify-pack -v: do not report "chain length 0"
  t5510: harden the way verify-pack is used
  gitweb/README: Document $base_url
  Documentation: git submodule: add missing options to synopsis
  Better usage string for reflog.
  hg-to-git: don't import the unused popen2 module
  send-email: remove debug trace
  config: Keep inner whitespace verbatim
  GIT 1.6.4
  GIT 1.6.3.4
  config.txt: document add.ignore-errors
  request-pull: allow ls-remote to notice remote.$nickname.uploadpack
  Update the documentation of the raw diff output format
  git-rerere.txt: Clarify ambiguity of the config variable
  t9143: do not fail if Compress::Zlib is missing
  Trivial path quoting fixes in git-instaweb
  GIT 1.6.4-rc3
  Documentation/config.txt: a variable can be defined on the section header line
  git svn: make minimize URL more reliable over http(s)
  Disable asciidoc 8.4.1+ semantics for `{plus}` and friends
  ...
2009-08-07 20:44:49 -07:00