1
0
mirror of https://github.com/git/git.git synced 2024-10-19 09:28:35 +02:00
Commit Graph

7026 Commits

Author SHA1 Message Date
Adam Spiers
95a68344af Improve documentation and comments regarding directory traversal API
traversal API has a few potentially confusing properties.  These
comments clarify a few key aspects and will hopefully make it easier
to understand for other newcomers in the future.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-28 12:07:45 -08:00
Adam Spiers
f1a7082f2a api-directory-listing.txt: update to match code
7c4c97c0ac turned the flags in struct dir_struct into a single bitfield
variable, but forgot to update this document.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-28 12:07:45 -08:00
Eric S. Raymond
95f95c99f6 Remove the suggestion to use parsecvs, which is currently broken.
The parsecvs code has been neglected for a long time, and the only
public version does not even build correctly.  I have been handed
control of the project and intend to fix this, but until I do it
cannot be recommended.

Also, the project URL given for Subversion needed to be updated
to follow their site move.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-28 11:35:32 -08:00
Junio C Hamano
1b800f8f50 Sync with 1.8.0.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-27 15:59:42 -08:00
Junio C Hamano
15999998fb Git 1.8.0.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-27 15:57:20 -08:00
Junio C Hamano
6ecc01f26c git(1): show link to contributor summary page
We earlier removed a link to list of contributors that pointed to a
defunct page; let's use a working one from Ohloh.net to replace it
instead.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-27 15:40:09 -08:00
Junio C Hamano
2b05d9f917 Merge branch 'sl/maint-git-svn-docs' into maint
* sl/maint-git-svn-docs:
  git-svn: Note about tags.
  git-svn: Expand documentation for --follow-parent
  git-svn: Recommend use of structure options.
  git-svn: Document branches with at-sign(@).
2012-12-27 15:38:34 -08:00
Sebastian Leske
008c208c2c git-svn: Note about tags.
Document that 'git svn' will import SVN tags as branches.

Signed-off-by: Sebastian Leske <sebastian.leske@sleske.name>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-27 15:38:26 -08:00
Sebastian Leske
197a80d7d9 git-svn: Expand documentation for --follow-parent
Describe what the option --follow-parent does, and what happens if it is
set or unset.

Signed-off-by: Sebastian Leske <sebastian.leske@sleske.name>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-27 15:38:26 -08:00
Sebastian Leske
91583a6a85 git-svn: Recommend use of structure options.
Document that when using git svn, one should usually either use the
directory structure options to import branches as branches, or only
import one subdirectory. The default behaviour of cloning all branches
and tags as subdirectories in the working copy is usually not what the
user wants.

Signed-off-by: Sebastian Leske <sebastian.leske@sleske.name>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-27 15:38:26 -08:00
Sebastian Leske
d658835c19 git-svn: Document branches with at-sign(@).
git svn sometimes creates branches with an at-sign in the name
(branchname@revision). These branches confuse many users and it is a FAQ
why they are created. Document when git svn creates them.

Signed-off-by: Sebastian Leske <sebastian.leske@sleske.name>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-27 15:38:26 -08:00
Junio C Hamano
4017edcfac Merge branch 'gb/maint-doc-svn-log-window-size' into maint
* branch 'gb/maint-doc-svn-log-window-size':
  Document git-svn fetch --log-window-size parameter
2012-12-27 15:34:37 -08:00
Junio C Hamano
8c6bda0f4d Merge branch 'km/maint-doc-git-reset' into maint
* branch 'km/maint-doc-git-reset':
  doc: git-reset: make "<mode>" optional
2012-12-27 15:32:27 -08:00
Max Horn
6cf9614df6 git-remote-helpers.txt: document invocation before input format
In the distant past, the order things were documented was
'Invocation', 'Commands', 'Capabilities', ...

Then it was decided that before giving a list of Commands, there
should be an overall description of the 'Input format', which was
a wise decision. However, this description was put as the very
first thing, with the rationale that any implementor would want
to know that first.

However, it seems an implementor would actually first need to
know how the remote helper will be invoked, so moving
'Invocation' to the front again seems logical. Moreover, we now
don't switch from discussing the input format to the invocation
style and then back to input related stuff.

Signed-off-by: Max Horn <max@quendi.de>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-27 15:30:14 -08:00
Junio C Hamano
0a1b59eb86 Merge branch 'jk/avoid-mailto-invalid-in-doc' into maint
* jk/avoid-mailto-invalid-in-doc:
  Documentation: don't link to example mail addresses
2012-12-27 15:27:46 -08:00
Junio C Hamano
4f96f1fbab Merge branch 'tj/maint-doc-commit-sign' into maint
* branch 'tj/maint-doc-commit-sign':
  Add -S, --gpg-sign option to manpage of "git commit"
2012-12-27 15:25:03 -08:00
Ramkumar Ramachandra
0b830ac521 Documentation: move diff.wordRegex from config.txt to diff-config.txt
19299a8 (Documentation: Move diff.<driver>.* from config.txt to
diff-config.txt, 2011-04-07) moved the diff configuration options to
diff-config.txt, but forgot about diff.wordRegex, which was left
behind in config.txt.  Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-27 15:21:46 -08:00
Thomas Ackermann
0a85441cdb Remove Documentation/pt_BR/gittutorial.txt
This file is rather outdated and IMHO shouldn't be there in the first place.
(If there are translations of the Git documentation they are better be kept
separate from the original documentation.)

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-27 08:42:33 -08:00
Junio C Hamano
86c3e6ed51 Merge branch 'maint' 2012-12-22 20:40:07 -08:00
Junio C Hamano
c2999adcd5 Merge branch 'jc/doc-diff-blobs' into maint
* jc/doc-diff-blobs:
  Documentation: Describe "git diff <blob> <blob>" separately
2012-12-22 20:38:07 -08:00
Junio C Hamano
a7b5e9141e Merge branch 'cr/doc-checkout-branch' into maint
* cr/doc-checkout-branch:
  Documentation/git-checkout.txt: document 70c9ac2 behavior
  Documentation/git-checkout.txt: clarify usage
2012-12-22 20:38:02 -08:00
Junio C Hamano
2b1965863b Merge branch 'ta/api-index-doc' into maint
* ta/api-index-doc:
  Remove misleading date from api-index-skel.txt
2012-12-22 20:37:42 -08:00
Junio C Hamano
ffcd76bda9 Merge branch 'as/doc-for-devs' into maint
* as/doc-for-devs:
  Documentation: move support for old compilers to CodingGuidelines
  SubmittingPatches: add convention of prefixing commit messages
2012-12-22 20:37:33 -08:00
Junio C Hamano
21b340181b Merge branch 'jc/fetch-tags-doc' into maint
* jc/fetch-tags-doc:
  fetch --tags: clarify documentation
2012-12-22 20:37:22 -08:00
Junio C Hamano
df54d59566 Merge branch 'nd/index-format-doc' into maint
* nd/index-format-doc:
  index-format.txt: clarify what is "invalid"
2012-12-22 20:37:09 -08:00
Junio C Hamano
66afe50b43 Merge branch 'ta/doc-cleanup' into maint
* ta/doc-cleanup:
  Documentation: build html for all files in technical and howto
  Documentation/howto: convert plain text files to asciidoc
  Documentation/technical: convert plain text files to asciidoc
  Change headline of technical/send-pack-pipeline.txt to not confuse its content with content from git-send-pack.txt
  Shorten two over-long lines in git-bisect-lk2009.txt by abbreviating some sha1
  Split over-long synopsis in git-fetch-pack.txt into several lines
2012-12-22 20:35:34 -08:00
Thomas Ackermann
854dfda8be Sort howto documents in howto-index.txt
Howto documents in howto-index.txt were listed in a rather
random order. So better sort them.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-22 20:26:56 -08:00
Junio C Hamano
b10c4add03 Merge branch 'ta/new-command-howto'
* ta/new-command-howto:
  Move ./technical/api-command.txt to ./howto/new-command.txt
2012-12-21 15:19:25 -08:00
Junio C Hamano
814a1924b4 Merge branch 'jc/doc-diff-blobs'
"git diff <blob> <blob>" was not documented and was only hinted as
an extension to "git diff <commit> <commit> -- <pathspec>", but
comparison between two blobs are more special than that.  It does
not take any pathspec to begin with.

* jc/doc-diff-blobs:
  Documentation: Describe "git diff <blob> <blob>" separately
2012-12-21 15:19:13 -08:00
Junio C Hamano
51bf6bea51 Merge branch 'cr/doc-checkout-branch'
Document the magic "git checkout <no-such-branch>" hack to create
local branch out of a remote tracking branch that hasn't been
documented so far.

* cr/doc-checkout-branch:
  Documentation/git-checkout.txt: document 70c9ac2 behavior
  Documentation/git-checkout.txt: clarify usage
2012-12-21 15:19:08 -08:00
Junio C Hamano
6600dcbd30 Merge branch 'ta/api-index-doc'
* ta/api-index-doc:
  Remove misleading date from api-index-skel.txt
2012-12-21 15:19:04 -08:00
Junio C Hamano
53096bf0af Merge branch 'jk/avoid-mailto-invalid-in-doc'
Avoids invalid sample e-mail addresses from becoming mailto links
in the formatted output.

* jk/avoid-mailto-invalid-in-doc:
  Documentation: don't link to example mail addresses
2012-12-21 15:18:57 -08:00
Junio C Hamano
c2c6a70a54 Merge branch 'as/doc-for-devs'
It might be a better idea to move the text the bottom one adds to
the extended description from the quick checklist part.

* as/doc-for-devs:
  Documentation: move support for old compilers to CodingGuidelines
  SubmittingPatches: add convention of prefixing commit messages
2012-12-21 15:18:47 -08:00
Junio C Hamano
73cf1b540e Merge branch 'jc/fetch-tags-doc'
"git fetch --tags" was explained as if it were "git fetch
--no-no-tags", which is not the case, causing confusion.

* jc/fetch-tags-doc:
  fetch --tags: clarify documentation
2012-12-21 15:18:35 -08:00
Junio C Hamano
d34ccd6df7 Merge branch 'nd/index-format-doc'
* nd/index-format-doc:
  index-format.txt: clarify what is "invalid"
2012-12-21 15:18:32 -08:00
Junio C Hamano
80c78e11a0 Merge branch 'sl/git-svn-docs'
* sl/git-svn-docs:
  git-svn: Note about tags.
  git-svn: Expand documentation for --follow-parent
  git-svn: Recommend use of structure options.
  git-svn: Document branches with at-sign(@).
2012-12-21 15:18:27 -08:00
Thomas Ackermann
81670e9bfc Move ./technical/api-command.txt to ./howto/new-command.txt
The contents of this document does not describe any particular API, but
is more about the way to add a new command, which belongs to the "How To"
section of the documentation suite.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-21 10:35:53 -08:00
Jeff King
823ab40fd4 add global --literal-pathspecs option
Git takes pathspec arguments in many places to limit the
scope of an operation. These pathspecs are treated not as
literal paths, but as glob patterns that can be fed to
fnmatch. When a user is giving a specific pattern, this is a
nice feature.

However, when programatically providing pathspecs, it can be
a nuisance. For example, to find the latest revision which
modified "$foo", one can use "git rev-list -- $foo". But if
"$foo" contains glob characters (e.g., "f*"), it will
erroneously match more entries than desired. The caller
needs to quote the characters in $foo, and even then, the
results may not be exactly the same as with a literal
pathspec. For instance, the depth checks in
match_pathspec_depth do not kick in if we match via fnmatch.

This patch introduces a global command-line option (i.e.,
one for "git" itself, not for specific commands) to turn
this behavior off. It also has a matching environment
variable, which can make it easier if you are a script or
porcelain interface that is going to issue many such
commands.

This option cannot turn off globbing for particular
pathspecs. That could eventually be done with a ":(noglob)"
magic pathspec prefix. However, that level of granularity is
more cumbersome to use for many cases, and doing ":(noglob)"
right would mean converting the whole codebase to use
"struct pathspec", as the usual "const char **pathspec"
cannot represent extra per-item flags.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 14:58:59 -08:00
Thomas Ackermann
18499ba694 Remove duplicate entry in ./Documentation/Makefile
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 10:24:23 -08:00
W. Trevor King
b928922727 submodule add: If --branch is given, record it in .gitmodules
This allows you to easily record a submodule.<name>.branch option in
.gitmodules when you add a new submodule.  With this patch,

  $ git submodule add -b <branch> <repository> [<path>]
  $ git config -f .gitmodules submodule.<path>.branch <branch>

reduces to

  $ git submodule add -b <branch> <repository> [<path>]

This means that future calls to

  $ git submodule update --remote ...

will get updates from the same branch that you used to initialize the
submodule, which is usually what you want.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 09:40:51 -08:00
W. Trevor King
06b1abb5bd submodule update: add --remote for submodule's upstream changes
The current `update` command incorporates the superproject's gitlinked
SHA-1 ($sha1) into the submodule HEAD ($subsha1).  Depending on the
options you use, it may checkout $sha1, rebase the $subsha1 onto
$sha1, or merge $sha1 into $subsha1.  This helps you keep up with
changes in the upstream superproject.

However, it's also useful to stay up to date with changes in the
upstream subproject.  Previous workflows for incorporating such
changes include the ungainly:

  $ git submodule foreach 'git checkout $(git config --file $toplevel/.gitmodules submodule.$name.branch) && git pull'

With this patch, all of the useful functionality for incorporating
superproject changes can be reused to incorporate upstream subproject
updates.  When you specify --remote, the target $sha1 is replaced with
a $sha1 of the submodule's origin/master tracking branch.  If you want
to merge a different tracking branch, you can configure the
`submodule.<name>.branch` option in `.gitmodules`.  You can override
the `.gitmodules` configuration setting for a particular superproject
by configuring the option in that superproject's default configuration
(using the usual configuration hierarchy, e.g. `.git/config`,
`~/.gitconfig`, etc.).

Previous use of submodule.<name>.branch
=======================================

Because we're adding a new configuration option, it's a good idea to
check if anyone else is already using the option.  The foreach-pull
example above was described by Ævar in

  commit f030c96d8643fa0a1a9b2bd9c2f36a77721fb61f
  Author: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
  Date:   Fri May 21 16:10:10 2010 +0000

    git-submodule foreach: Add $toplevel variable

Gerrit uses the same interpretation for the setting, but because
Gerrit has direct access to the subproject repositories, it updates
the superproject repositories automatically when a subproject changes.
Gerrit also accepts the special value '.', which it expands into the
superproject's branch name.

Although the --remote functionality is using `submodule.<name>.branch`
slightly differently, the effect is the same.  The foreach-pull
example uses the option to record the name of the local branch to
checkout before pulls.  The tracking branch to be pulled is recorded
in `.git/modules/<name>/config`, which was initialized by the module
clone during `submodule add` or `submodule init`.  Because the branch
name stored in `submodule.<name>.branch` was likely the same as the
branch name used during the initial `submodule add`, the same branch
will be pulled in each workflow.

Implementation details
======================

In order to ensure a current tracking branch state, `update --remote`
fetches the submodule's remote repository before calculating the
SHA-1.  However, I didn't change the logic guarding the existing fetch:

  if test -z "$nofetch"
  then
    # Run fetch only if $sha1 isn't present or it
    # is not reachable from a ref.
    (clear_local_git_env; cd "$path" &&
      ( (rev=$(git rev-list -n 1 $sha1 --not --all 2>/dev/null) &&
       test -z "$rev") || git-fetch)) ||
    die "$(eval_gettext "Unable to fetch in submodule path '\$path'")"
  fi

There will not be a double-fetch, because the new $sha1 determined
after the `--remote` triggered fetch should always exist in the
repository.  If it doesn't, it's because some racy process removed it
from the submodule's repository and we *should* be re-fetching.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 09:40:01 -08:00
Junio C Hamano
bd52900df4 Documentation: Describe "git diff <blob> <blob>" separately
As it was not a common operation, it was described as if it is a
side note for the more common two-commit variant, but this mode
behaves very differently, e.g. it does not make any sense to ask
recursive behaviour, or give the command a pathspec.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-18 11:35:28 -08:00
Chris Rorvick
00bb4378c7 Documentation/git-checkout.txt: document 70c9ac2 behavior
Document the behavior implemented in 70c9ac2 (DWIM "git checkout
frotz" to "git checkout -b frotz origin/frotz").

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-18 11:07:44 -08:00
Chris Rorvick
e1cdf63316 Documentation/git-checkout.txt: clarify usage
The forms of checkout that do not take a path are lumped together in
the DESCRIPTION section, but the description for this group is
dominated by explanation of the -b|-B form.

Split these apart for more clarity.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-18 11:04:52 -08:00
Junio C Hamano
b7cd0c9b69 Sync with 'maint' 2012-12-18 10:51:22 -08:00
Sitaram Chamarty
31d66aa408 clarify -M without % symbol in diff-options
Signed-off-by: Sitaram Chamarty <sitaramc@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-18 08:46:15 -08:00
Junio C Hamano
30825178fb log --format: teach %C(auto,black) to respect color config
Traditionally, %C(color attr) always emitted the ANSI color
sequence; it was up to the scripts that wanted to conditionally
color their output to omit %C(...) specifier when they do not want
colors.

Optionally allow "auto," to be prefixed to the color, so that the
output is colored iff we would color regular "log" output
(e.g., taking into account color.* and --color command line
options).

Tests and pretty_context bits by Jeff King <peff@peff.net>.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-17 17:30:04 -08:00
Adam Spiers
a26fd033af Documentation: move support for old compilers to CodingGuidelines
The "Try to be nice to older C compilers" text is clearly a guideline
to be borne in mind whilst coding rather than when submitting patches.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-16 18:30:53 -08:00
Adam Spiers
6a5b649883 SubmittingPatches: add convention of prefixing commit messages
Conscientious newcomers to git development will read SubmittingPatches
and CodingGuidelines, but could easily miss the convention of
prefixing commit messages with a single word identifying the file
or area the commit touches.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-16 18:30:50 -08:00
John Keeping
f430ed8b99 Documentation: don't link to example mail addresses
Email addresses in documentation are converted into mailto: hyperlinks
in the HTML output and footnotes in man pages.  This isn't desirable for
cases where the address is used as an example and is not valid.

Particularly annoying is the example "jane@laptop.(none)" which appears
in git-shortlog(1) as "jane@laptop[1].(none)", with note 1 saying:

	1. jane@laptop
	   mailto:jane@laptop

Fix this by escaping these email addresses with a leading backslash, to
prevent Asciidoc expanding them as inline macros.

In the case of mailmap.txt, render the address monospaced so that it
matches the block examples surrounding that paragraph.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-16 17:59:07 -08:00
Thomas Ackermann
a041c9c752 Remove misleading date from api-index-skel.txt
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-16 11:57:41 -08:00
Junio C Hamano
2e900297db Git 1.8.1-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-15 11:19:02 -08:00
Thomas Ackermann
fef11965da Renumber list in api-command.txt
Start list with 1 instead of 0; ASCIIDOC will renumber it anyway.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-15 10:46:47 -08:00
Junio C Hamano
f0cb2f137c fetch --tags: clarify documentation
Explain that --tags is just like another explicit refspec on the
command line and as such overrides the default refspecs configured
via the remote.$name.fetch variable.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-13 16:19:45 -08:00
Junio C Hamano
790c83cda9 Merge branch 'maint' 2012-12-13 11:13:56 -08:00
Junio C Hamano
538d1239a8 Merge branch 'mh/doc-remote-helpers'
* mh/doc-remote-helpers:
  git-remote-helpers.txt: clarify options & ref list attributes
  git-remote-helpers.txt: clarify command <-> capability correspondences
  git-remote-helpers.txt: rearrange description of capabilities
  git-remote-helpers.txt: minor grammar fix
  git-remote-helpers.txt: document missing capabilities
  git-remote-helpers.txt: document invocation before input format
2012-12-13 11:00:15 -08:00
Manlio Perillo
75940a001a git.txt: add missing info about --git-dir command-line option
Unlike other environment variables (e.g. GIT_WORK_TREE,	GIT_NAMESPACE),
the Documentation/git.txt file did not mention that the GIT_DIR
environment variable can also be set using the --git-dir command line
option.

Signed-off-by: Manlio Perillo <manlio.perillo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-13 10:54:01 -08:00
Jeff King
8c473cecfd mailmap: default mailmap.blob in bare repositories
The motivation for mailmap.blob is to let users of bare
repositories use the mailmap feature, as they would not have
a checkout containing the .mailmap file. We can make it even
easier for them by just looking in HEAD:.mailmap by default.

We can't know for sure that this is where they would keep a
mailmap, of course, but it is the best guess (and it matches
the non-bare behavior, which reads from HEAD:.mailmap in the
working tree). If it's missing, git will silently ignore the
setting.

We do not do the same magic in the non-bare case, because:

  1. In the common case, HEAD:.mailmap will be the same as
     the .mailmap in the working tree, which is a no-op.

  2. In the uncommon case, the user has modified .mailmap
     but not yet committed it, and would expect the working
     tree version to take precedence.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-13 10:22:13 -08:00
Jeff King
d5422b0c0b mailmap: fix some documentation loose-ends for mailmap.blob
Anywhere we mention mailmap.file, it is probably worth
mentioning mailmap.blob, as well.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-13 10:19:26 -08:00
Nguyễn Thái Ngọc Duy
4a6385fe55 index-format.txt: clarify what is "invalid"
A cache-tree entry with a negative entry count is considered invalid
by the current Git; it records that we do not know the object name
of a tree that would result by writing the directory covered by the
cache-tree as a tree object.

Clarify that any entry with a negative entry count is invalid, but
the implementations must write -1 there. This way, we can later
decide to allow writers to use negative values other than -1 to
encode optional information on such invalidated entries without
harming interoperability; we do not know what will be encoded and
how, so we keep these other negative values as reserved for now.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-13 10:12:25 -08:00
Junio C Hamano
24a62db7bb git(1): show link to contributor summary page
We earlier removed a link to list of contributors that pointed to a
defunct page; let's use a working one from Ohloh.net to replace it
instead.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-12 11:58:17 -08:00
Jeff King
086109006f mailmap: support reading mailmap from blobs
In a bare repository, there isn't a simple way to respect an
in-tree mailmap without extracting it to a temporary file.
This patch provides a config variable, similar to
mailmap.file, which reads the mailmap from a blob in the
repository.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-12 11:12:35 -08:00
Junio C Hamano
7e0651a630 Sync with 1.8.0.2
* maint:
  Git 1.8.0.2
  Documentation/git-stash.txt: add a missing verb
  git(1): remove a defunct link to "list of authors"

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-10 13:07:12 -08:00
Junio C Hamano
3e53891f85 Git 1.8.0.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-10 13:05:47 -08:00
Sébastien Loriot
5badfdcf88 Documentation/git-stash.txt: add a missing verb
Signed-off-by: Sébastien Loriot <sloriot.ml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-10 08:18:25 -08:00
Junio C Hamano
ac046c0e8c git(1): remove a defunct link to "list of authors"
The linked page has not been showing the promised "more complete
list" for more than 6 months by now, and nobody has resurrected
the list there nor elsewhere since then.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-09 00:33:04 -08:00
Junio C Hamano
816f290752 Git 1.8.1-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 15:17:21 -08:00
Junio C Hamano
00704e4ba5 Documentation/diff-config: work around AsciiDoc misfortune
The line that happens to begin with indent followed by "3. " was
interpreted as if it was an enumerated list; just wrap the lines
differently to work it around for now.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 15:15:59 -08:00
Junio C Hamano
5a2c11b6db Merge branch 'maint'
* maint:
  Update draft release notes to 1.8.0.2
2012-12-07 14:16:52 -08:00
Junio C Hamano
a859d3ee57 Update draft release notes to 1.8.0.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 14:16:38 -08:00
Junio C Hamano
f07f4134ae Merge branch 'jc/doc-push-satellite' into maint
* jc/doc-push-satellite:
  Documentation/git-push.txt: clarify the "push from satellite" workflow
2012-12-07 14:11:21 -08:00
Max Horn
9ec8bcda60 git-remote-helpers.txt: clarify options & ref list attributes
The documentation was misleading in that it gave the impression that
'for-push' could be used as a ref attribute in the output of the
'list' command. That is wrong.

Also, explicitly point out the connection between the commands
'list' and 'options' on the one hand, and the sections
'REF LIST ATTRIBUTES' and 'OPTIONS' on the other hand.

Signed-off-by: Max Horn <max@quendi.de>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 13:54:15 -08:00
Max Horn
754cb1aeba git-remote-helpers.txt: clarify command <-> capability correspondences
In particular, document 'list for-push' separately from 'list', as
the former needs only be supported for the push/export
capabilities, and the latter only for fetch/import. Indeed, a
hypothetically 'push-only' helper would only need to support the
former, not the latter.

Signed-off-by: Max Horn <max@quendi.de>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 13:54:15 -08:00
Max Horn
0673bb28d0 git-remote-helpers.txt: rearrange description of capabilities
This also remove some duplication in the descriptions
(e.g. refspec was explained twice with similar level of detail).

Signed-off-by: Max Horn <max@quendi.de>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 13:54:15 -08:00
Max Horn
b20c457a39 git-remote-helpers.txt: minor grammar fix
Signed-off-by: Max Horn <max@quendi.de>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 13:54:15 -08:00
Max Horn
b4b106e5a5 git-remote-helpers.txt: document missing capabilities
Specifically, document the 'export' and '(im|ex)port-marks'
capabilities as well as the export command, which were
undocumented (but in active use).

Signed-off-by: Max Horn <max@quendi.de>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 13:54:15 -08:00
Max Horn
f829a9eae6 git-remote-helpers.txt: document invocation before input format
In the distant past, the order things were documented was
'Invocation', 'Commands', 'Capabilities', ...

Then it was decided that before giving a list of Commands, there
should be an overall description of the 'Input format', which was
a wise decision. However, this description was put as the very
first thing, with the rationale that any implementor would want
to know that first.

However, it seems an implementor would actually first need to
know how the remote helper will be invoked, so moving
'Invocation' to the front again seems logical. Moreover, we now
don't switch from discussing the input format to the invocation
style and then back to input related stuff.

Signed-off-by: Max Horn <max@quendi.de>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 13:54:14 -08:00
Sebastian Leske
dd465ce66f git-svn: Note about tags.
Document that 'git svn' will import SVN tags as branches.

Signed-off-by: Sebastian Leske <sebastian.leske@sleske.name>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-05 14:39:55 -08:00
Sebastian Leske
0d35bfe1be git-svn: Expand documentation for --follow-parent
Describe what the option --follow-parent does, and what happens if it is
set or unset.

Signed-off-by: Sebastian Leske <sebastian.leske@sleske.name>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-05 14:39:55 -08:00
Sebastian Leske
92166fd7b4 git-svn: Recommend use of structure options.
Document that when using git svn, one should usually either use the
directory structure options to import branches as branches, or only
import one subdirectory. The default behaviour of cloning all branches
and tags as subdirectories in the working copy is usually not what the
user wants.

Signed-off-by: Sebastian Leske <sebastian.leske@sleske.name>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-05 14:39:55 -08:00
Sebastian Leske
7cad29d558 git-svn: Document branches with at-sign(@).
git svn sometimes creates branches with an at-sign in the name
(branchname@revision). These branches confuse many users and it is a FAQ
why they are created. Document when git svn creates them.

Signed-off-by: Sebastian Leske <sebastian.leske@sleske.name>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-05 14:39:55 -08:00
Junio C Hamano
fb4c62235f Merge branch 'mm/status-push-pull-advise'
* mm/status-push-pull-advise:
  document that statusHints affects git checkout
2012-12-04 13:34:10 -08:00
Matthieu Moy
552755a88b document that statusHints affects git checkout
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-04 07:57:30 -08:00
Junio C Hamano
ee26a6e2b8 Git 1.8.1-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-03 09:49:51 -08:00
Chris Rorvick
b450568209 push: allow already-exists advice to be disabled
Add 'advice.pushAlreadyExists' option to disable the advice shown when
an update is rejected for a reference that is not allowed to update at
all (verses those that are allowed to fast-forward.)

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-03 08:04:09 -08:00
Chris Rorvick
1184564eac push: rename config variable for more general use
The 'pushNonFastForward' advice config can be used to squelch several
instances of push-related advice.  Rename it to 'pushUpdateRejected' to
cover other reject scenarios that are unrelated to fast-forwarding.
Retain the old name for compatibility.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-03 08:04:08 -08:00
Chris Rorvick
40eff17999 push: require force for annotated tags
Do not allow fast-forwarding of references that point to a tag object.
Updating from a tag is potentially destructive since it would likely
leave the tag dangling.  Disallowing updates to a tag also makes sense
semantically and is consistent with the behavior of lightweight tags.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-02 01:44:49 -08:00
Chris Rorvick
dbfeddb12e push: require force for refs under refs/tags/
References are allowed to update from one commit-ish to another if the
former is an ancestor of the latter.  This behavior is oriented to
branches which are expected to move with commits.  Tag references are
expected to be static in a repository, though, thus an update to
something under refs/tags/ should be rejected unless the update is
forced.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-02 01:44:34 -08:00
Junio C Hamano
f94c3251e1 Update draft release notes to 1.8.1 2012-11-29 13:57:09 -08:00
Junio C Hamano
7472ad1dae Merge branch 'jc/doc-push-satellite'
* jc/doc-push-satellite:
  Documentation/git-push.txt: clarify the "push from satellite" workflow
2012-11-29 12:52:54 -08:00
Junio C Hamano
03a23a46c5 Merge branch 'er/doc-add-new-commands'
* er/doc-add-new-commands:
  Documentation: how to add a new command
2012-11-29 12:52:36 -08:00
Junio C Hamano
8a6a6f4259 Merge branch 'maint'
* maint:
  git-fast-import.txt: improve documentation for quoted paths
  git-remote-mediawiki: escape ", \, and LF in file names
2012-11-29 12:21:17 -08:00
Felipe Contreras
fc407f9821 Add new simplified git-remote-testgit
Exercising the python remote helper framework is for another tool and
another test. This is about testing the remote-helper interface.

It's way simpler, it exercises the same features of remote helpers, it's
easy to read and understand, and it doesn't depend on python.

For now let's just copy the old remote-helpers test script, although
some of those tests don't make sense. In addition, this script would be
able to test other features not currently being tested.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-29 12:18:45 -08:00
Matthieu Moy
7c65b2ebb7 git-fast-import.txt: improve documentation for quoted paths
The documentation mentioned only newlines and double quotes as
characters needing escaping, but the backslash also needs it. Also, the
documentation was not clearly saying that double quotes around the file
name were required (double quotes in the examples could be interpreted as
part of the sentence, not part of the actual string).

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-29 11:49:51 -08:00
Junio C Hamano
226dcb5256 Merge branch 'maint' 2012-11-28 13:49:33 -08:00
Junio C Hamano
8f8af9f4d1 Update draft release notes to 1.8.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-28 13:49:10 -08:00
Junio C Hamano
93341d805f Start preparing for 1.8.0.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-28 13:40:02 -08:00
Junio C Hamano
b48990e738 Documentation/git-push.txt: clarify the "push from satellite" workflow
The context of the example to push into refs/remotes/satellite/
hierarchy of the other repository needs to be spelled out explicitly
for the value of this example to be fully appreciated.  Make it so.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-27 22:39:08 -08:00
Junio C Hamano
b7973fbbc3 Merge branch 'maint' 2012-11-27 13:29:08 -08:00
Junio C Hamano
a7c940edce Merge branch 'esr/maint-doc-fast-import' into maint
* esr/maint-doc-fast-import:
  doc/fast-import: clarify how content states are built
2012-11-27 13:28:31 -08:00
Junio C Hamano
2207e104ab Merge branch 'wtk/submodule-doc-fixup' into maint
* wtk/submodule-doc-fixup:
  git-submodule: wrap branch option with "<>" in usage strings.
2012-11-27 13:28:18 -08:00
Mark Szepieniec
6b6e063c44 Documentation: improve phrasing in git-push.txt
The current version contains the sentence:

Further suppose that the other person already pushed changes leading to
A back to the original repository you two obtained the original commit
X.

which doesn't parse for me; I've changed it to

Further suppose that the other person already pushed changes leading to
A back to the original repository from which you two obtained the
original commit X.

Signed-off-by: Mark Szepieniec <mszepien@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-27 09:12:58 -08:00
Eric S. Raymond
29ed5489af Documentation: how to add a new command
This document contains no new policies or proposals; it attempts to
document established practices and interface requirements.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-26 13:43:21 -08:00
Junio C Hamano
e8a1f5a2ae Update draft release notes to 1.8.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-25 18:52:42 -08:00
Junio C Hamano
be95387af2 Merge branch 'rr/submodule-diff-config'
Allow "git diff --submodule=log" to set to be the default via
configuration.

* rr/submodule-diff-config:
  submodule: display summary header in bold
  diff: rename "set" variable
  diff: introduce diff.submodule configuration variable
  Documentation: move diff.wordRegex from config.txt to diff-config.txt
2012-11-25 18:44:50 -08:00
Junio C Hamano
f9b329a7d1 Sync with 1.8.0.1 2012-11-25 18:40:55 -08:00
Junio C Hamano
ed9fe75513 Git 1.8.0.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-25 18:40:34 -08:00
Junio C Hamano
2d242fb3fc Update draft release notes for 1.8.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-21 13:32:58 -08:00
Junio C Hamano
22d33a20f9 Merge branch 'esr/maint-doc-fast-import'
* esr/maint-doc-fast-import:
  doc/fast-import: clarify how content states are built
2012-11-21 13:32:48 -08:00
Junio C Hamano
681b036fa0 Merge branch 'wtk/submodule-doc-fixup'
* wtk/submodule-doc-fixup:
  git-submodule: wrap branch option with "<>" in usage strings.
2012-11-21 13:25:42 -08:00
Junio C Hamano
3a189da601 Sixth batch for 1.8.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-20 10:46:29 -08:00
Junio C Hamano
b4f35513be Merge branch 'jl/submodule-rm'
* jl/submodule-rm:
  docs: move submodule section
2012-11-20 10:40:31 -08:00
Junio C Hamano
dc998a489a Merge branch 'ta/doc-cleanup'
* ta/doc-cleanup:
  Documentation: build html for all files in technical and howto
  Documentation/howto: convert plain text files to asciidoc
  Documentation/technical: convert plain text files to asciidoc
  Change headline of technical/send-pack-pipeline.txt to not confuse its content with content from git-send-pack.txt
  Shorten two over-long lines in git-bisect-lk2009.txt by abbreviating some sha1
  Split over-long synopsis in git-fetch-pack.txt into several lines
2012-11-20 10:32:58 -08:00
Junio C Hamano
80dfab86cd Sync with maint
* maint:
  Further preparation for 1.8.0.1
2012-11-20 10:16:34 -08:00
Junio C Hamano
1c03999bef Further preparation for 1.8.0.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-20 10:16:14 -08:00
Junio C Hamano
cf48960b6d Merge branch 'mm/maint-doc-commit-edit' into maint
* mm/maint-doc-commit-edit:
  Document 'git commit --no-edit' explicitly
2012-11-20 10:14:55 -08:00
Junio C Hamano
cdcd793213 Merge branch 'as/maint-doc-fix-no-post-rewrite' into maint
* as/maint-doc-fix-no-post-rewrite:
  commit: fixup misplacement of --no-post-rewrite description
2012-11-20 10:14:47 -08:00
Junio C Hamano
f3828dc066 Sync with maint 2012-11-18 19:48:31 -08:00
Junio C Hamano
2808f6abc2 Start preparing for 1.8.0.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-18 19:47:19 -08:00
Junio C Hamano
b98769e06e Merge branch 'po/maint-refs-replace-docs' into maint
The refs/replace hierarchy was not mentioned in the
repository-layout docs.

* po/maint-refs-replace-docs:
  Doc repository-layout: Show refs/replace
2012-11-18 19:34:09 -08:00
Junio C Hamano
78ba7e267c Merge branch 'mm/maint-doc-remote-tracking' into maint
Update "remote tracking branch" in the documentation to
"remote-tracking branch".

* mm/maint-doc-remote-tracking:
  Documentation: remote tracking branch -> remote-tracking branch
2012-11-18 19:33:20 -08:00
Ramkumar Ramachandra
c47ef57caa diff: introduce diff.submodule configuration variable
Introduce a diff.submodule configuration variable corresponding to the
'--submodule' command-line option of 'git diff'.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-18 19:18:13 -08:00
Ramkumar Ramachandra
22bc70fdf9 Documentation: move diff.wordRegex from config.txt to diff-config.txt
19299a8 (Documentation: Move diff.<driver>.* from config.txt to
diff-config.txt, 2011-04-07) moved the diff configuration options to
diff-config.txt, but forgot about diff.wordRegex, which was left
behind in config.txt.  Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-18 19:18:13 -08:00
Junio C Hamano
5a90748f28 Start 1.8.1 cycle
Prepare the release notes for the upcoming release, and describe
changes up to the 5th batch we just merged.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-15 11:21:47 -08:00
Junio C Hamano
4ad4fce63a Merge branch 'jc/prettier-pretty-note'
Emit the notes attached to the commit in "format-patch --notes"
output after three-dashes.

* jc/prettier-pretty-note:
  format-patch: add a blank line between notes and diffstat
  Doc User-Manual: Patch cover letter, three dashes, and --notes
  Doc format-patch: clarify --notes use case
  Doc notes: Include the format-patch --notes option
  Doc SubmittingPatches: Mention --notes option after "cover letter"
  Documentation: decribe format-patch --notes
  format-patch --notes: show notes after three-dashes
  format-patch: append --signature after notes
  pretty_print_commit(): do not append notes message
  pretty: prepare notes message at a centralized place
  format_note(): simplify API
  pretty: remove reencode_commit_message()
2012-11-15 10:25:05 -08:00
Junio C Hamano
6050b5bca0 Merge branch 'mh/notes-string-list'
Improve the asymptotic performance of the cat_sort_uniq notes merge
strategy.

* mh/notes-string-list:
  string_list_add_refs_from_colon_sep(): use string_list_split()
  notes: fix handling of colon-separated values
  combine_notes_cat_sort_uniq(): sort and dedup lines all at once
  Initialize sort_uniq_list using named constant
  string_list: add a function string_list_remove_empty_items()
2012-11-15 10:24:53 -08:00
Junio C Hamano
2be3d85a1c Merge branch 'mh/strbuf-split'
Cleanups and documentation for strbuf_split.

* mh/strbuf-split:
  strbuf_split*(): document functions
  strbuf_split*(): rename "delim" parameter to "terminator"
  strbuf_split_buf(): simplify iteration
  strbuf_split_buf(): use ALLOC_GROW()
2012-11-15 10:24:49 -08:00
Junio C Hamano
6b34d6e692 Merge branch 'mm/maint-doc-commit-edit'
* mm/maint-doc-commit-edit:
  Document 'git commit --no-edit' explicitly
2012-11-15 10:24:44 -08:00
Junio C Hamano
80b2234e9b Merge branch 'as/maint-doc-fix-no-post-rewrite'
* as/maint-doc-fix-no-post-rewrite:
  commit: fixup misplacement of --no-post-rewrite description
2012-11-15 10:24:29 -08:00
Junio C Hamano
a2055c28ee Merge branch 'cr/cvsimport-local-zone'
Allows "cvsimport" to read per-author timezone from the author info
file.

* cr/cvsimport-local-zone:
  cvsimport: work around perl tzset issue
  git-cvsimport: allow author-specific timezones
2012-11-15 10:24:09 -08:00
Junio C Hamano
b398fcc262 Merge branch 'jh/symbolic-ref-d'
Add "symbolic-ref -d SYM" to delete a symbolic ref SYM.

It is already possible to remove a symbolic ref with "update-ref -d
--no-deref", but it may be a good addition for completeness.

* jh/symbolic-ref-d:
  git symbolic-ref --delete $symref
2012-11-15 10:23:51 -08:00
Matt Kraai
3469c7ebbf docs: move submodule section
293ab15e ("submodule: teach rm to remove submodules unless they
contain a git directory", 2012-09-26) inserted the "Submodules"
section between a sentence describing a command and the command.  Move
the "Submodules" section further down.

Noticed-by: Horst H. von Brand
Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-14 13:49:53 -08:00
Jeff King
05eda511b3 Merge branch 'km/send-email-compose-encoding'
"git send-email --compose" can let the user create a non-ascii
cover letter message, but there was not a way to mark it with
appropriate content type before sending it out.

Further updates fix subject quoting.

* km/send-email-compose-encoding:
  git-send-email: add rfc2047 quoting for "=?"
  git-send-email: introduce quote_subject()
  git-send-email: skip RFC2047 quoting for ASCII subjects
  git-send-email: use compose-encoding for Subject
  git-send-email: introduce compose-encoding
2012-11-09 12:50:29 -05:00
Jeff King
5f836422ab Merge branch 'nd/attr-match-optim-more'
Start laying the foundation to build the "wildmatch" after we can
agree on its desired semantics.

* nd/attr-match-optim-more:
  attr: more matching optimizations from .gitignore
  gitignore: make pattern parsing code a separate function
  exclude: split pathname matching code into a separate function
  exclude: fix a bug in prefix compare optimization
  exclude: split basename matching code into a separate function
  exclude: stricten a length check in EXC_FLAG_ENDSWITH case
2012-11-09 12:42:25 -05:00
Eric S. Raymond
e70528862f doc/fast-import: clarify how content states are built
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Jeff King <peff@peff.net>
2012-11-08 14:11:53 -05:00
Michael Haggerty
6bb2a1377b string_list: add a function string_list_remove_empty_items()
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Jeff King <peff@peff.net>
2012-11-08 11:34:08 -05:00
Jeff King
f07e5551a8 Merge branch 'tj/maint-doc-commit-sign'
* tj/maint-doc-commit-sign:
  Add -S, --gpg-sign option to manpage of "git commit"
2012-11-04 08:00:47 -05:00
Jeff King
0d2605112e Merge branch 'pp/maint-doc-pager-config'
* pp/maint-doc-pager-config:
  Documentation: improve the example of overriding LESS via core.pager
2012-11-04 08:00:38 -05:00
Jeff King
d0c6c1758b Merge branch 'km/maint-doc-git-reset'
* km/maint-doc-git-reset:
  doc: git-reset: make "<mode>" optional
2012-11-04 08:00:33 -05:00
Jeff King
9a806be5df Merge branch 'gb/maint-doc-svn-log-window-size'
* gb/maint-doc-svn-log-window-size:
  Document git-svn fetch --log-window-size parameter
2012-11-04 08:00:21 -05:00
Jeff King
e52bec9469 Merge branch 'po/maint-refs-replace-docs'
The refs/replace hierarchy was not mentioned in the
repository-layout docs.

* po/maint-refs-replace-docs:
  Doc repository-layout: Show refs/replace
2012-11-04 08:00:11 -05:00
Jeff King
6d3f2906a0 Merge branch 'mm/maint-doc-remote-tracking'
We long ago hyphenated "remote-tracking branch"; this
catches some new instances added since then.

* mm/maint-doc-remote-tracking:
  Documentation: remote tracking branch -> remote-tracking branch
2012-11-04 07:59:57 -05:00
Michael Haggerty
06379a6509 strbuf_split*(): document functions
Document strbuf_split_buf(), strbuf_split_str(), strbuf_split_max(),
strbuf_split(), and strbuf_list_free() in the header file and in
api-strbuf.txt.  (These functions were previously completely
undocumented.)

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jeff King <peff@peff.net>
2012-11-04 06:46:55 -05:00
Andreas Schwab
77effefefd commit: fixup misplacement of --no-post-rewrite description
In e858af6 (commit: document a couple of options) the description of the
--no-post-rewrite option was put inside the paragraph for the --amend
option.  Move it down after the paragraph.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Jeff King <peff@peff.net>
2012-11-02 09:22:02 -04:00
Matthieu Moy
ae45320c40 Document 'git commit --no-edit' explicitly
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Jeff King <peff@peff.net>
2012-11-02 07:49:28 -04:00
Tom Jones
098bbdc31c Add -S, --gpg-sign option to manpage of "git commit"
git commit -S, --gpg-sign was mentioned in the program's help message,
but not in the manpage.

This adds an equivalent entry for the option in the manpage.

Signed-off-by: Tom Jones <tom@oxix.org>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-29 04:16:49 -04:00
Jeff King
eeb2535f5a Merge branch 'nd/status-long'
Allow an earlier "--short" option on the command line to be
countermanded with the "--long" option for "git status" and "git
commit".

* nd/status-long:
  status: add --long output format option
2012-10-29 04:14:58 -04:00
Jeff King
d2f4469b13 Merge branch 'jc/grep-pcre-loose-ends'
"git log -F -E --grep='<ere>'" failed to use the given <ere>
pattern as extended regular expression, and instead looked for the
string literally.  The early part of this series is a fix for it;
the latter part teaches log to respect the grep.* configuration.

* jc/grep-pcre-loose-ends:
  log: honor grep.* configuration
  log --grep: accept --basic-regexp and --perl-regexp
  log --grep: use the same helper to set -E/-F options as "git grep"
  revisions: initialize revs->grep_filter using grep_init()
  grep: move pattern-type bits support to top-level grep.[ch]
  grep: move the configuration parsing logic to grep.[ch]
  builtin/grep.c: make configuration callback more reusable
2012-10-29 04:12:15 -04:00
Jeff King
fdb4d27158 Merge branch 'jl/submodule-add-by-name'
If you remove a submodule, in order to keep the repository so that
"git checkout" to an older commit in the superproject history can
resurrect the submodule, the real repository will stay in $GIT_DIR
of the superproject.  A later "git submodule add $path" to add a
different submodule at the same path will fail.  Diagnose this case
a bit better, and if the user really wants to add an unrelated
submodule at the same path, give the "--name" option to give it a
place in $GIT_DIR of the superproject that does not conflict with
the original submodule.

* jl/submodule-add-by-name:
  submodule add: Fail when .git/modules/<name> already exists unless forced
  Teach "git submodule add" the --name option
2012-10-29 04:12:12 -04:00
Jeff King
d21240fafa Merge branch 'jl/submodule-rm'
"git rm submodule" cannot blindly remove a submodule directory as
its working tree may have local changes, and worse yet, it may even
have its repository embedded in it.  Teach it some special cases
where it is safe to remove a submodule, specifically, when there is
no local changes in the submodule working tree, and its repository
is not embedded in its working tree but is elsewhere and uses the
gitfile mechanism to point at it.

* jl/submodule-rm:
  submodule: teach rm to remove submodules unless they contain a git directory
2012-10-29 04:12:07 -04:00
Michael Haggerty
059b37934c string_list_longest_prefix(): remove function
This function was added in f103f95b11d087f07c0c48bf784cd9197e18f203 in
the erroneous expectation that it would be used in the
reimplementation of longest_ancestor_length().  But it turned out to
be easier to use a function specialized for comparing path prefixes
(i.e., one that knows about slashes and root paths) than to prepare
the paths in such a way that a generic string prefix comparison
function can be used.  So delete string_list_longest_prefix() and its
documentation and test cases.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-29 02:34:58 -04:00
Patrick Palka
3a599b832b Documentation: improve the example of overriding LESS via core.pager
You can override an option set in the LESS variable by simply prefixing
the command line option with `-+`. This is more robust than the previous
example if the default LESS options are to ever change.

Signed-off-by: Patrick Palka <patrick@parcs.ath.cx>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-29 02:27:13 -04:00
Krzysztof Mazur
d505865be5 doc: git-reset: make "<mode>" optional
The git-reset's "<mode>" is an optional argument, however it was
documented as required.

The "<mode>" is documented as one of: --soft, --mixed, --hard, --merge
or --keep, so "<mode>" should be used instead of "--<mode>".

Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-29 01:37:07 -04:00
Philip Oakley
d84cef1817 Doc User-Manual: Patch cover letter, three dashes, and --notes
Show that git format-patch can have a cover letter, include patch
commentary below the three dashes, and notes can also be
included.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-26 10:31:38 -04:00
Gunnlaugur Þór Briem
bc22b27749 Document git-svn fetch --log-window-size parameter
The --log-window-size parameter to git-svn fetch is undocumented.

Minimally describe what it does and why the user might change it.

Signed-off-by: Gunnlaugur Þór Briem <gunnlaugur@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-26 09:32:53 -04:00
Philip Oakley
6454d9f166 Doc format-patch: clarify --notes use case
Remove double negative, and include the repeat usage across
versions of a patch series.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-26 09:25:04 -04:00
Philip Oakley
11fbe18e9e Doc repository-layout: Show refs/replace
Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-25 06:56:39 -04:00
Matthieu Moy
a6d3bde5af Documentation: remote tracking branch -> remote-tracking branch
This change was already done by 0e615b252f3 (Matthieu Moy, Tue Nov 2
2010, Replace "remote tracking" with "remote-tracking"), but new
instances of remote tracking (without dash) were introduced in the
meantime.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-25 06:55:46 -04:00
Jeff King
530f237500 Merge branch 'fa/remote-svn'
A GSoC project.

* fa/remote-svn:
  Add a test script for remote-svn
  remote-svn: add marks-file regeneration
  Add a svnrdump-simulator replaying a dump file for testing
  remote-svn: add incremental import
  remote-svn: Activate import/export-marks for fast-import
  Create a note for every imported commit containing svn metadata
  vcs-svn: add fast_export_note to create notes
  Allow reading svn dumps from files via file:// urls
  remote-svn, vcs-svn: Enable fetching to private refs
  When debug==1, start fast-import with "--stats" instead of "--quiet"
  Add documentation for the 'bidi-import' capability of remote-helpers
  Connect fast-import to the remote-helper via pipe, adding 'bidi-import' capability
  Add argv_array_detach and argv_array_free_detached
  Add svndump_init_fd to allow reading dumps from arbitrary FDs
  Add git-remote-testsvn to Makefile
  Implement a remote helper for svn in C
2012-10-25 06:42:02 -04:00
Jeff King
8de8f9f656 Merge branch 'jm/diff-context-config'
Teaches a new configuration variable to "git diff" Porcelain and
its friends.

* jm/diff-context-config:
  t4055: avoid use of sed 'a' command
  diff: diff.context configuration gives default to -U
2012-10-25 06:41:57 -04:00
Philip Oakley
e39b307d09 Doc notes: Include the format-patch --notes option
git format-patch gained a --notes option. Tell the notes user.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-25 06:15:56 -04:00
Philip Oakley
76323c67b7 Doc SubmittingPatches: Mention --notes option after "cover letter"
The git format-patch --notes option can now insert the commit notes
after the three dashes. Mention this after the regular cover letter
guidance for submitting patches.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-25 06:15:56 -04:00
Thomas Ackermann
5e00439f0a Documentation: build html for all files in technical and howto
These files were recently revised to be valid asciidoc, so
there is no reason not to build html versions.

Signed-off-by: Thomas Ackermann <th.acker66@arcor.de>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-25 05:38:14 -04:00
W. Trevor King
38ae92e4d0 git-submodule: wrap branch option with "<>" in usage strings.
Use "-b <branch>" instead of "-b branch".  This brings the usage
strings in line with other options, e.g. "--reference <repository>".

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-25 04:46:13 -04:00
Junio C Hamano
8c7a786b6c Git 1.8.0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-21 13:56:23 -07:00
Johan Herland
9ab55daa55 git symbolic-ref --delete $symref
Teach symbolic-ref to delete symrefs by adding the -d/--delete option to
git-symbolic-ref. Both proper and dangling symrefs are deleted by this
option, but other refs - or anything else that is not a symref - is not.

The symref deletion is performed by first verifying that we are given a
proper symref, and then invoking delete_ref() on it with the REF_NODEREF
flag.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-21 12:17:38 -07:00
Junio C Hamano
e422c0cf1c Documentation: decribe format-patch --notes
Even though I coded this, I am not sure what use scenarios would benefit
from this option, so the description is unnecessarily negative at this
moment. People who do want to use this feature need to come up with a
more plausible use case and replace it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-19 13:01:05 -07:00
Jeff King
f3f47a1e8d status: add --long output format option
You can currently set the output format to --short or
--porcelain. There is no --long, because we default to it
already. However, you may want to override an alias that
uses "--short" to get back to the default.

This requires a little bit of refactoring, because currently
we use STATUS_FORMAT_LONG internally to mean the same as
"the user did not specify anything". By expanding the enum
to include STATUS_FORMAT_NONE, we can distinguish between
the implicit and explicit cases. This effects these
conditions:

  1. The user has asked for NUL termination. With NONE, we
     currently default to turning on the porcelain mode.
     With an explicit --long, we would in theory use NUL
     termination with the long mode, but it does not support
     it. So we can just complain and die.

  2. When an output format is given to "git commit", we
     default to "--dry-run". This behavior would now kick in
     when "--long" is given, too.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-18 15:01:35 -07:00
Thomas Ackermann
1797e5c50c Documentation/howto: convert plain text files to asciidoc
These were not originally meant for asciidoc, but they are already
so close.  Mark them up in asciidoc.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-18 10:51:34 -07:00
Junio C Hamano
87a5461fa7 Git 1.8.0-rc3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-17 10:39:44 -07:00
Junio C Hamano
d2bfef22e4 Sync with 1.7.12.4 2012-10-17 10:37:32 -07:00
Junio C Hamano
7e2010537e Git 1.7.12.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-17 10:36:42 -07:00
Junio C Hamano
5a77ff74ba Merge branch 'rr/git-uri-doc' into maint
* rr/git-uri-doc:
  Git url doc: mark ftp/ftps as read-only and deprecate them
2012-10-17 10:28:56 -07:00
Junio C Hamano
530d71011e Merge branch 'nd/doc-ignore' into maint
* nd/doc-ignore:
  gitignore.txt: suggestions how to get literal # or ! at the beginning
2012-10-17 10:28:42 -07:00
Junio C Hamano
352611fc2c Merge branch 'jc/doc-long-options' into maint
* jc/doc-long-options:
  gitcli: parse-options lets you omit tail of long options
2012-10-17 10:28:34 -07:00
Junio C Hamano
756583f432 Merge branch 'po/maint-docs' into maint
* po/maint-docs:
  Doc branch: show -vv option and alternative
  Doc clean: add See Also link
  Doc add: link gitignore
  Doc: separate gitignore pattern sources
  Doc: shallow clone deepens _to_ new depth
2012-10-17 10:27:10 -07:00
Junio C Hamano
8c4bcd34bd Merge branch 'jc/ll-merge-binary-ours' into maint
* jc/ll-merge-binary-ours:
  ll-merge: warn about inability to merge binary files only when we can't
  attr: "binary" attribute should choose built-in "binary" merge driver
  merge: teach -Xours/-Xtheirs to binary ll-merge driver
2012-10-17 10:26:51 -07:00
Junio C Hamano
19100d3f7d Merge branch 'db/doc-custom-xmlto' into maint
* db/doc-custom-xmlto:
  Documentation/Makefile: Allow custom XMLTO binary
2012-10-17 10:25:37 -07:00
Chris Rorvick
fb2c984148 git-cvsimport: allow author-specific timezones
CVS patchsets are imported with timestamps having an offset of +0000
(UTC).  The cvs-authors file is already used to translate the CVS
username to full name and email in the corresponding commit.  Extend
this file to support an optional timezone for calculating a user-
specific timestamp offset.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-16 22:23:18 -07:00
Matthew Ogilvie
96bc8f66f9 cvsserver Documentation: new cvs ... -r support
Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-16 16:17:55 -07:00
Thomas Ackermann
5316c8e939 Documentation/technical: convert plain text files to asciidoc
These were not originally meant for asciidoc, but they are already
so close.  Mark them up in asciidoc.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-16 16:09:09 -07:00
Thomas Ackermann
368dc5d6ae Change headline of technical/send-pack-pipeline.txt to not confuse its content with content from git-send-pack.txt
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-16 16:09:09 -07:00
Thomas Ackermann
9fa9728e2c Shorten two over-long lines in git-bisect-lk2009.txt by abbreviating some sha1
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-16 16:09:09 -07:00
Thomas Ackermann
cc91a85ec7 Split over-long synopsis in git-fetch-pack.txt into several lines
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-16 16:09:09 -07:00
Thomas Ackermann
d25c58ce43 Documentation/RelNotes: remove "updated up to this revision" markers
These were used to keep track of the last commit a release notes
entry was written for, and should have been removed when cutting
the final release.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-16 15:35:00 -07:00
Junio C Hamano
4a182f6174 Update draft release notes to 1.8.0
We are almost there...

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-16 13:27:23 -07:00
Nguyễn Thái Ngọc Duy
237ec6e40d Support "**" wildcard in .gitignore and .gitattributes
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-15 14:58:19 -07:00
Nguyễn Thái Ngọc Duy
82dce998c2 attr: more matching optimizations from .gitignore
.gitattributes and .gitignore share the same pattern syntax but has
separate matching implementation. Over the years, ignore's
implementation accumulates more optimizations while attr's stays the
same.

This patch reuses the core matching functions that are also used by
excluded_from_list. excluded_from_list and path_matches can't be
merged due to differences in exclude and attr, for example:

* "!pattern" syntax is forbidden in .gitattributes.  As an attribute
  can be unset (i.e. set to a special value "false") or made back to
  unspecified (i.e. not even set to "false"), "!pattern attr" is unclear
  which one it means.

* we support attaching attributes to directories, but git-core
  internally does not currently make use of attributes on
  directories.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-15 14:57:17 -07:00
Jonathan Nieder
e8ef401cd0 doc: advertise GIT_CONFIG_NOSYSTEM
On a multiuser system where mortals do not have write access to /etc,
the GIT_CONFIG_NOSYSTEM variable is the best tool we have to keep
getting work done when a syntax error or other problem renders
/etc/gitconfig buggy, until the sysadmin sorts the problem out.

Noticed while experimenting with teaching git to error out when
/etc/gitconfig is unreadable.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-14 10:14:46 -07:00
Junio C Hamano
c5fe239860 Merge branch 'rr/git-uri-doc'
* rr/git-uri-doc:
  Git url doc: mark ftp/ftps as read-only and deprecate them
2012-10-10 14:57:26 -07:00
Junio C Hamano
4321fe0b54 Merge branch 'nd/doc-ignore'
* nd/doc-ignore:
  gitignore.txt: suggestions how to get literal # or ! at the beginning
2012-10-10 14:57:02 -07:00
Junio C Hamano
0115042349 Merge branch 'jc/doc-long-options'
* jc/doc-long-options:
  gitcli: parse-options lets you omit tail of long options
2012-10-10 14:56:52 -07:00
Junio C Hamano
8d47dc7f2d Sync with maint
* maint:
  attr: a note about the order of .gitattributes lookup
2012-10-10 14:54:33 -07:00
Nguyen Thai Ngoc Duy
40701adbcb attr: a note about the order of .gitattributes lookup
This is the documentation part of

1a9d7e9 (attr.c: read .gitattributes from index as well. - 2007-08-14)
06f33c1 (Read attributes from the index that is being checked out - 2009-03-13)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-10 11:09:20 -07:00
Krzysztof Mazur
62e0069056 git-send-email: introduce compose-encoding
The introduction email (--compose option) have encoding hardcoded to
UTF-8, but invoked editor may not use UTF-8 encoding.
The encoding used by patches can be changed by the "8bit-encoding"
option, but this option does not have effect on introduction email
and equivalent for introduction email is missing.

Added compose-encoding command line option and sendemail.composeencoding
configuration option specify encoding of introduction email.

Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-10 00:33:40 -07:00
Junio C Hamano
727b6fc3ed log --grep: accept --basic-regexp and --perl-regexp
When we added the "--perl-regexp" option (or "-P") to "git grep", we
should have done the same for the commands in the "git log" family,
but somehow we forgot to do so.  This corrects it, but we will
reserve the short-and-sweet "-P" option for something else for now.

Also introduce the "--basic-regexp" option for completeness, so that
the "last one wins" principle can be used to defeat an earlier -E
option, e.g. "git log -E --basic-regexp --grep='<bre>'".  Note that
it cannot have the short "-G" option as the option is to grep in the
patch text in the context of "log" family.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-09 23:21:30 -07:00
Ramkumar Ramachandra
6347e71619 Git url doc: mark ftp/ftps as read-only and deprecate them
It is not even worth mentioning their removal; just discourage
people from using them.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-08 14:18:19 -07:00
Junio C Hamano
4c6c949c7d Git 1.8.0-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-08 11:45:41 -07:00
Junio C Hamano
5a333adeb5 Sync with 1.7.12.3 2012-10-08 11:41:21 -07:00
Junio C Hamano
234cd45662 Git 1.7.12.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-08 11:40:43 -07:00
Junio C Hamano
9b4030cd98 Merge branch 'rt/maint-clone-single' into maint
A repository created with "git clone --single" had its fetch
refspecs set up just like a clone without "--single", leading the
subsequent "git fetch" to slurp all the other branches, defeating
the whole point of specifying "only this branch".

* rt/maint-clone-single:
  clone --single: limit the fetch refspec to fetched branch
2012-10-08 11:34:02 -07:00
Junio C Hamano
63c0c2c8a0 Merge branch 'jc/blame-follows-renames' into maint
It was unclear in the documentation for "git blame" that it is
unnecessary for users to use the "--follow" option.

* jc/blame-follows-renames:
  git blame: document that it always follows origin across whole-file renames
2012-10-08 11:33:35 -07:00
Nguyễn Thái Ngọc Duy
866f5f82b9 gitignore.txt: suggestions how to get literal # or ! at the beginning
We support backslash escape, but we hide the details behind the phrase
"a shell glob suitable for consumption by fnmatch(3)". So it may not
be obvious how one can get literal # or ! at the beginning of pattern.
Add a few lines on how to work around the magic characters.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-07 16:15:19 -07:00
Florian Achleitner
271bfd678b Add documentation for the 'bidi-import' capability of remote-helpers
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-07 14:10:17 -07:00
Florian Achleitner
df7428eca4 Add argv_array_detach and argv_array_free_detached
Allow detaching of ownership of the argv_array's contents and add a
function to free those detached argv_arrays later.

This makes it possible to use argv_array efficiently with the exiting
struct child_process which only contains a member char **argv.

Add to documentation.

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-07 14:10:16 -07:00
Junio C Hamano
30462a7483 gitcli: parse-options lets you omit tail of long options
Describe the behaviour, but do warn people against taking it too
literally and expect an abbreviation valid today will stay valid
forever.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-04 20:30:27 -07:00
Junio C Hamano
f84667def2 Update draft release notes to 1.8.0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-02 21:18:40 -07:00
Junio C Hamano
fa11d7c879 Merge branch 'nd/grep-reflog'
Teach the commands from the "log" family the "--grep-reflog" option
to limit output by string that appears in the reflog entry when the
"--walk-reflogs" option is in effect.

* nd/grep-reflog:
  revision: make --grep search in notes too if shown
  log --grep-reflog: reject the option without -g
  revision: add --grep-reflog to filter commits by reflog messages
  grep: prepare for new header field filter
2012-10-02 21:13:39 -07:00
Junio C Hamano
b65f30b6b3 Merge branch 'maint' 2012-10-02 13:47:30 -07:00
Junio C Hamano
9376c8603f Start preparing for 1.7.12.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-02 13:44:59 -07:00
Junio C Hamano
e2c7a5b646 Merge branch 'rr/maint-submodule-unknown-cmd' into maint
"git submodule frotz" was not diagnosed as "frotz" being an unknown
subcommand to "git submodule"; the user instead got a complaint that
"git submodule status" was run with an unknown path "frotz".

* rr/maint-submodule-unknown-cmd:
  submodule: if $command was not matched, don't parse other args
2012-10-02 13:42:32 -07:00
Ramkumar Ramachandra
1ec6f488de Documentation: mention push.default in git-push.txt
It already is listed in the "git config" documentation, but people
interested in pushing would first look at "git push" documentation.

Noticed-by: David Glasser
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Fixed-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-02 12:07:44 -07:00
Michael J Gruber
d117dd2096 RelNotes/1.8.0: various typo and style fixes
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-02 10:17:25 -07:00
Junio C Hamano
b0ec16b49e Git 1.8.0-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-01 13:09:47 -07:00
Junio C Hamano
4dbf436bff Merge branch 'jc/blame-follows-renames'
Clarify the "blame" documentation to tell the users that there is
no need to ask for "--follow".

* jc/blame-follows-renames:
  git blame: document that it always follows origin across whole-file renames
2012-10-01 12:58:43 -07:00
Junio C Hamano
92f6e98c69 Merge branch 'rt/maint-clone-single'
Running "git fetch" in a repository made with "git clone --single"
slurps all the branches, defeating the point of "--single".

* rt/maint-clone-single:
  clone --single: limit the fetch refspec to fetched branch
2012-10-01 12:58:10 -07:00
Jeff Muizelaar
6468a4e548 diff: diff.context configuration gives default to -U
Introduce a configuration variable diff.context that tells
Porcelain commands to use a non-default number of context
lines instead of 3 (the default).  With this variable, users
do not have to keep repeating "git log -U8" from the command
line; instead, it becomes sufficient to say "git config
diff.context 8" just once.

Signed-off-by: Jeff Muizelaar <jmuizelaar@mozilla.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-30 20:16:01 -07:00
Junio C Hamano
f65ed83c7e Update draft release notes to 1.8.0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-29 23:25:09 -07:00
Junio C Hamano
28de297ffe Sync with 1.7.12.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-29 23:22:53 -07:00
Junio C Hamano
d8cf053dac Git 1.7.12.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-29 23:20:47 -07:00
Junio C Hamano
31d69db340 Merge branch 'jc/maint-log-grep-all-match-1' into maint
* jc/maint-log-grep-all-match-1:
  grep.c: make two symbols really file-scope static this time
  t7810-grep: test --all-match with multiple --grep and --author options
  t7810-grep: test interaction of multiple --grep and --author options
  t7810-grep: test multiple --author with --all-match
  t7810-grep: test multiple --grep with and without --all-match
  t7810-grep: bring log --grep tests in common form
  grep.c: mark private file-scope symbols as static
  log: document use of multiple commit limiting options
  log --grep/--author: honor --all-match honored for multiple --grep patterns
  grep: show --debug output only once
  grep: teach --debug option to dump the parse tree
2012-09-29 22:30:56 -07:00
Junio C Hamano
da5a2bd525 Merge branch 'rr/maint-submodule-unknown-cmd'
* rr/maint-submodule-unknown-cmd:
  submodule: if $command was not matched, don't parse other args
2012-09-29 22:28:33 -07:00
Junio C Hamano
68a31b7d95 Merge branch 'aw/rebase-i-edit-todo'
Teach an option to edit the insn sheet to "git rebase -i".

* aw/rebase-i-edit-todo:
  rebase -i: suggest using --edit-todo to fix an unknown instruction
  rebase -i: Add tests for "--edit-todo"
  rebase -i: Teach "--edit-todo" action
  rebase -i: Refactor help messages for todo file
  rebase usage: subcommands can not be combined with -i
2012-09-29 22:28:12 -07:00
Jens Lehmann
73b0898d0d Teach "git submodule add" the --name option
"git submodule add" initializes the name of a submodule to its path. This
was ok as long as the .git directory lived inside the submodule's work
tree, but since 1.7.8 it is stored in the .git/modules/<name> directory of
the superproject, making the submodule name survive the removal of the
submodule's work tree. This leads to problems when the user tries to add a
different submodule at the same path - and thus the same name - later, as
that will happily try to restore the submodule from the old repository
instead of the one the user specified and will lead to a checkout of the
wrong repository.

Add the new "--name" option to let the user provide a name for the
submodule. This enables the user to solve this conflict without having to
remove .git/modules/<name> by hand (which is no viable solution as it
makes it impossible to checkout a commit that records the old submodule
and populate it, as that will still check out the new submodule for the
same reason).

To achieve that the submodule's name is added to the parameter list of
the module_clone() helper function. This makes it possible to remove the
call of module_name() there because both callers of module_clone() already
know the name and can provide it as argument number two.

Reported-by: Jonathan Johnson <me@jondavidjohn.com>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-29 21:49:11 -07:00
Nguyễn Thái Ngọc Duy
38cfe915bf revision: make --grep search in notes too if shown
Notes are shown after commit body. From user perspective it looks
pretty much like commit body and they may assume --grep would search
in that part too.

Make it so.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-29 12:15:05 -07:00
Junio C Hamano
baa6378ff2 log --grep-reflog: reject the option without -g
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-29 12:07:04 -07:00
Nguyễn Thái Ngọc Duy
72fd13f71c revision: add --grep-reflog to filter commits by reflog messages
Similar to --author/--committer which filters commits by author and
committer header fields. --grep-reflog adds a fake "reflog" header to
commit and a grep filter to search on that line.

All rules to --author/--committer apply except no timestamp stripping.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-29 11:41:14 -07:00
Jens Lehmann
293ab15eea submodule: teach rm to remove submodules unless they contain a git directory
Currently using "git rm" on a submodule - populated or not - fails with
this error:

	fatal: git rm: '<submodule path>': Is a directory

This made sense in the past as there was no way to remove a submodule
without possibly removing unpushed parts of the submodule's history
contained in its .git directory too, so erroring out here protected the
user from possible loss of data.

But submodules cloned with a recent git version do not contain the .git
directory anymore, they use a gitfile to point to their git directory
which is safely stored inside the superproject's .git directory. The work
tree of these submodules can safely be removed without losing history, so
let's teach git to do so.

Using rm on an unpopulated submodule now removes the empty directory from
the work tree and the gitlink from the index. If the submodule's directory
is missing from the work tree, it will still be removed from the index.

Using rm on a populated submodule using a gitfile will apply the usual
checks for work tree modification adapted to submodules (unless forced).
For a submodule that means that the HEAD is the same as recorded in the
index, no tracked files are modified and no untracked files that aren't
ignored are present in the submodules work tree (ignored files are deemed
expendable and won't stop a submodule's work tree from being removed).
That logic has to be applied in all nested submodules too.

Using rm on a submodule which has its .git directory inside the work trees
top level directory will just error out like it did before to protect the
repository, even when forced. In the future git could either provide a
message informing the user to convert the submodule to use a gitfile or
even attempt to do the conversion itself, but that is not part of this
change.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-29 11:33:31 -07:00
Ramkumar Ramachandra
af9c9f9713 submodule: if $command was not matched, don't parse other args
"git submodule" command DWIMs the command line and assumes a
unspecified action word for 'status' action.  This is a UI mistake
that leads to a confusing behaviour.  A mistyped command name is
instead treated as a request for 'status' of the submodule with that
name, e.g.

    $ git submodule show
    error: pathspec 'show' did not match any file(s) known to git.
    Did you forget to 'git add'?

Stop DWIMming an unknown or mistyped subcommand name as pathspec
given to unspelled "status" subcommand.  "git submodule" without any
argument is still interpreted as "git submodule status", but its
value is questionable.

Adjust t7400 to match, and stop advertising the default subcommand
being 'status' which does not help much in practice, other than
promoting laziness and confusion.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-25 11:31:48 -07:00
Michał Kiedrowicz
656197ad38 graph.c: infinite loop in git whatchanged --graph -m
Running "whatchanged --graph -m" on a simple two-head merges
can fall into infinite loop.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-25 11:07:15 -07:00
Junio C Hamano
652398a88e Update draft release notes to 1.8.0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-25 10:44:32 -07:00
Junio C Hamano
c4eed8689b Merge branch 'aj/xfuncname-ada'
* aj/xfuncname-ada:
  Add userdiff patterns for Ada
2012-09-25 10:40:11 -07:00
Junio C Hamano
ff91dbbf7d Merge branch 'po/maint-docs'
Various documentation fixups.

* po/maint-docs:
  Doc branch: show -vv option and alternative
  Doc clean: add See Also link
  Doc add: link gitignore
  Doc: separate gitignore pattern sources
  Doc: shallow clone deepens _to_ new depth
2012-09-25 10:39:52 -07:00
Junio C Hamano
8ccd4b68a7 Merge branch 'db/doc-custom-xmlto'
* db/doc-custom-xmlto:
  Documentation/Makefile: Allow custom XMLTO binary
2012-09-25 10:39:48 -07:00
Junio C Hamano
b5d156c362 Sync with maint 2012-09-24 12:50:36 -07:00
Junio C Hamano
1a002c73ba Start preparation for 1.7.12.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-24 12:50:00 -07:00
Junio C Hamano
8144049d79 Merge branch 'dj/fetch-all-tags' into maint
"git fetch --all", when passed "--no-tags", did not honor the
"--no-tags" option while fetching from individual remotes (the same
issue existed with "--tags", but combination "--all --tags" makes
much less sense than "--all --no-tags").

* dj/fetch-all-tags:
  fetch --all: pass --tags/--no-tags through to each remote
  submodule: use argv_array instead of hand-building arrays
  fetch: use argv_array instead of hand-building arrays
  argv-array: fix bogus cast when freeing array
  argv-array: add pop function
2012-09-24 12:39:21 -07:00
Junio C Hamano
e5dce96e9e git blame: document that it always follows origin across whole-file renames
Make it clear to people who (rightly or wrongly) think that the
"--follow" option should follow origin across while-file renames
that we already do so.  That would explain the output that they see
when they do give the "--follow" option to the command.

We may or may not want to do a "--no-follow" patch as a follow-up,
but that is a separate topic.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-21 12:14:19 -07:00
Junio C Hamano
16eed7c993 Merge branch 'mh/fetch-filter-refs'
Finishing touch to update documentation of string-list to make sure
the earlier rewrite of ref-list match logic that depends on its sort
order will not get broken.

* mh/fetch-filter-refs:
  string_list API: document what "sorted" means
2012-09-21 11:17:00 -07:00
Junio C Hamano
f1c62ee9de Merge branch 'maint'
* maint:
  Documentation: Document signature showing options
  completion: fix shell expansion of items
2012-09-20 15:55:47 -07:00
Junio C Hamano
467ad25471 Merge branch 'jw/doc-commit-title' into maint
* jw/doc-commit-title:
  Documentation: describe subject more precisely
2012-09-20 15:55:22 -07:00
Junio C Hamano
ee70fb8e4a Merge branch 'sn/ls-remote-get-url-doc' into maint
* sn/ls-remote-get-url-doc:
  ls-remote: document the '--get-url' option
2012-09-20 15:54:57 -07:00
Junio C Hamano
9fcacaab02 Merge branch 'nd/log-n-doc' into maint
* nd/log-n-doc:
  doc: move rev-list option -<n> from git-log.txt to rev-list-options.txt
2012-09-20 15:54:43 -07:00
Junio C Hamano
f9c2d2b14e Merge branch 'nd/maint-remote-remove' into maint
* nd/maint-remote-remove:
  remote: prefer subcommand name 'remove' to 'rm'
2012-09-20 15:53:31 -07:00
Ralf Thielow
31b808a032 clone --single: limit the fetch refspec to fetched branch
After running "git clone --single", the resulting repository has the
usual default "+refs/heads/*:refs/remotes/origin/*" wildcard fetch
refspec installed, which means that a subsequent "git fetch" will
end up grabbing all the other branches.

Update the fetch refspec to cover only the singly cloned ref instead
to correct this.

That means:
If "--single" is used without "--branch" or "--mirror", the
fetch refspec covers the branch on which remote's HEAD points to.
If "--single" is used with "--branch", it'll cover only the branch
specified in the "--branch" option.
If "--single" is combined with "--mirror", then it'll cover all
refs of the cloned repository.
If "--single" is used with "--branch" that specifies a tag, then
it'll cover only the ref for this tag.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-20 14:15:35 -07:00
Stephen Boyd
f2fef7b55a Documentation: Document signature showing options
The pretty formats for GPG signatures were introduced but never
documented. Use the documentation from the commit that introduced them.
Do the same for the --show-signature option added to git log and
friends.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-20 10:28:51 -07:00
Dave Borowitz
dd4f307561 Documentation/Makefile: Allow custom XMLTO binary
Signed-off-by: Dave Borowitz <dborowitz@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-19 16:35:10 -07:00
Philip Oakley
f0970faa96 Doc branch: show -vv option and alternative
Indicate that the -v option can be given twice in the short options.
Without it users pass over the option. Also indicate the alternate
'git remote show' method.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-19 10:22:49 -07:00
Philip Oakley
068c6745fe Doc clean: add See Also link
'git clean' is controlled by gitignore. Provide See Also link for it.

Use of core.excludesfile is implied.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-18 21:49:50 -07:00
Philip Oakley
a73d379063 Doc add: link gitignore
Use a gitignore link rather than the gitrepository-
layout link.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-18 21:49:46 -07:00