git
11 years agoMerge branch 'mg/texinfo-5' into maint
Junio C Hamano [Fri, 12 Apr 2013 20:41:48 +0000 (13:41 -0700)] 
Merge branch 'mg/texinfo-5' into maint

* mg/texinfo-5:
  Documentation: Strip texinfo anchors to avoid duplicates

11 years agoMerge branch 'jk/diffcore-break-divzero' into maint
Junio C Hamano [Fri, 12 Apr 2013 20:41:47 +0000 (13:41 -0700)] 
Merge branch 'jk/diffcore-break-divzero' into maint

* jk/diffcore-break-divzero:
  diffcore-break: don't divide by zero

11 years agoMerge branch 'cn/commit-amend-doc' into maint
Junio C Hamano [Fri, 12 Apr 2013 20:41:47 +0000 (13:41 -0700)] 
Merge branch 'cn/commit-amend-doc' into maint

* cn/commit-amend-doc:
  Documentation/git-commit: reword the --amend explanation

11 years agoMerge branch 'jk/bisect-prn-unsigned' into maint
Junio C Hamano [Fri, 12 Apr 2013 20:41:46 +0000 (13:41 -0700)] 
Merge branch 'jk/bisect-prn-unsigned' into maint

* jk/bisect-prn-unsigned:
  bisect: avoid signed integer overflow

11 years agoMerge branch 'jk/no-more-self-assignment' into maint
Junio C Hamano [Fri, 12 Apr 2013 20:41:46 +0000 (13:41 -0700)] 
Merge branch 'jk/no-more-self-assignment' into maint

* jk/no-more-self-assignment:
  match-trees: simplify score_trees() using tree_entry()
  submodule: clarify logic in show_submodule_summary

11 years agoMerge branch 'rr/send-email-perl-critique' into maint
Junio C Hamano [Fri, 12 Apr 2013 20:41:46 +0000 (13:41 -0700)] 
Merge branch 'rr/send-email-perl-critique' into maint

* rr/send-email-perl-critique:
  send-email: use the three-arg form of open in recipients_cmd
  send-email: drop misleading function prototype
  send-email: use "return;" not "return undef;" on error codepaths

11 years agoMerge branch 'jc/t5516-pushInsteadOf-vs-pushURL' into maint
Junio C Hamano [Fri, 12 Apr 2013 20:41:45 +0000 (13:41 -0700)] 
Merge branch 'jc/t5516-pushInsteadOf-vs-pushURL' into maint

* jc/t5516-pushInsteadOf-vs-pushURL:
  t5516: test interaction between pushURL and pushInsteadOf correctly

11 years agoCorrect common spelling mistakes in comments and tests
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)] 
Correct common spelling mistakes in comments and tests

Most of these were found using Lucas De Marchi's codespell tool.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agokwset: fix spelling in comments
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)] 
kwset: fix spelling in comments

Correct spelling mistakes noticed using Lucas De Marchi's codespell
tool.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoprecompose-utf8: fix spelling of "want" in error message
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)] 
precompose-utf8: fix spelling of "want" in error message

Noticed using Lucas De Marchi's codespell tool.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocompat/nedmalloc: fix spelling in comments
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)] 
compat/nedmalloc: fix spelling in comments

Correct some typos found using Lucas De Marchi's codespell tool.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocompat/regex: fix spelling and grammar in comments
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)] 
compat/regex: fix spelling and grammar in comments

Some of these were found using Lucas De Marchi's codespell tool.
Others noticed by Eric Sunshine.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoobstack: fix spelling of similar
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)] 
obstack: fix spelling of similar

Noticed using Lucas De Marchi's codespell tool.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocontrib/subtree: fix spelling of accidentally
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)] 
contrib/subtree: fix spelling of accidentally

Noticed with Lucas De Marchi's codespell tool.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: spelling fixes
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)] 
git-remote-mediawiki: spelling fixes

Most of these were found using Lucas De Marchi's codespell tool.
Others were pointed out by Eric Sunshine.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodoc: various spelling fixes
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)] 
doc: various spelling fixes

Most of these were found using Lucas De Marchi's codespell tool.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'maint-1.8.1' into maint
Junio C Hamano [Fri, 12 Apr 2013 18:48:38 +0000 (11:48 -0700)] 
Merge branch 'maint-1.8.1' into maint

* maint-1.8.1:
  fast-export: fix argument name in error messages
  Documentation: distinguish between ref and offset deltas in pack-format

11 years agocompletion: get rid of empty COMPREPLY assignments
Felipe Contreras [Wed, 10 Apr 2013 06:57:52 +0000 (01:57 -0500)] 
completion: get rid of empty COMPREPLY assignments

There's no functional reason for those, the only purpose they are
supposed to serve is to say "we don't provide any words here", but
even for that it's not used consistently.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocompletion: trivial test improvement
Felipe Contreras [Wed, 10 Apr 2013 06:57:51 +0000 (01:57 -0500)] 
completion: trivial test improvement

Instead of passing a dummy "", let's check if the last character is a
space, and then move the _cword accordingly.

Apparently we were passing "" all the way to compgen, which fortunately
expanded it to nothing.

Lets do the right thing though.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocompletion: add more cherry-pick options
Felipe Contreras [Wed, 10 Apr 2013 09:08:18 +0000 (04:08 -0500)] 
completion: add more cherry-pick options

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodoc: clarify that "git daemon --user=<user>" option does not export HOME=~user
Junio C Hamano [Fri, 12 Apr 2013 16:08:31 +0000 (09:08 -0700)] 
doc: clarify that "git daemon --user=<user>" option does not export HOME=~user

The fact that we don't set $HOME may confuse admins who expect
~<user>/.gitconfig to be used, because that is not what we try to
read.  And worse, since 96b9e0e3, a git-daemon started by root is
likely to fail to run at all, as the user we switch to generally
cannot read ~root.

Signed-off-by: Jeff King <peff@peff.net>
Helped-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agohelp: mark common_guides[] as translatable
Simon Ruderich [Fri, 12 Apr 2013 13:51:42 +0000 (15:51 +0200)] 
help: mark common_guides[] as translatable

Signed-off-by: Simon Ruderich <simon@ruderich.org>
Acked-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agofast-export: fix argument name in error messages
Paul Price [Fri, 12 Apr 2013 14:05:55 +0000 (10:05 -0400)] 
fast-export: fix argument name in error messages

The --signed-tags argument is plural, while error messages referred
to --signed-tag (singular).  Tweak error messages to correspond to the
argument.

Signed-off-by: Paul Price <price@astro.princeton.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation: distinguish between ref and offset deltas in pack-format
Stefan Saasen [Fri, 12 Apr 2013 05:56:24 +0000 (15:56 +1000)] 
Documentation: distinguish between ref and offset deltas in pack-format

eb32d236 introduced the OBJ_OFS_DELTA object that uses a relative offset to
identify the base object instead of the 20-byte SHA1 reference. The pack file
documentation only mentions the SHA1 based reference in its description of the
deltified object entry.

Update the pack format documentation to clarify that the deltified object
representation refers to its base using either a relative negative offset or
the absolute SHA1 identifier.

Signed-off-by: Stefan Saasen <ssaasen@atlassian.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoSupport FTP-over-SSL/TLS for regular FTP
Modestas Vainius [Sun, 7 Apr 2013 19:10:39 +0000 (22:10 +0300)] 
Support FTP-over-SSL/TLS for regular FTP

Add a boolean http.sslTry option which allows to enable AUTH SSL/TLS and
encrypted data transfers when connecting via regular FTP protocol.

Default is false since it might trigger certificate verification errors on
misconfigured servers.

Signed-off-by: Modestas Vainius <modestas@vainius.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'tb/document-status-u-tradeoff' into maint
Junio C Hamano [Fri, 12 Apr 2013 15:12:47 +0000 (08:12 -0700)] 
Merge branch 'tb/document-status-u-tradeoff' into maint

* tb/document-status-u-tradeoff:
  i18n: make the translation of -u advice in one go

11 years agoi18n: make the translation of -u advice in one go
Jiang Xin [Fri, 12 Apr 2013 03:53:01 +0000 (11:53 +0800)] 
i18n: make the translation of -u advice in one go

The advice (consider use of -u when read_directory takes too long) is
separated into 3 different status_printf_ln() calls, and which brings
trouble for translators.

Since status_vprintf() called by status_printf_ln() can handle eol in
buffer, we could simply join these lines into one paragraph.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'maint'
Junio C Hamano [Fri, 12 Apr 2013 00:41:48 +0000 (17:41 -0700)] 
Merge branch 'maint'

* maint:
  Typo fix: replacing it's -> its
  t: make PIPE a standard test prerequisite
  archive: clarify explanation of --worktree-attributes
  t/README: --immediate skips cleanup commands for failed tests

11 years agoUpdate dtaft release notes to 1.8.3
Junio C Hamano [Thu, 11 Apr 2013 23:03:55 +0000 (16:03 -0700)] 
Update dtaft release notes to 1.8.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'ap/combine-diff-coalesce-lost'
Junio C Hamano [Fri, 12 Apr 2013 00:41:05 +0000 (17:41 -0700)] 
Merge branch 'ap/combine-diff-coalesce-lost'

Attempts to minimize "diff -c/--cc" output by coalescing the same
lines removed from the parents better, but with an O(n^2)
complexity.

* ap/combine-diff-coalesce-lost:
  combine-diff: coalesce lost lines optimally

11 years agoMerge branch 'sr/log-SG-no-textconv'
Junio C Hamano [Fri, 12 Apr 2013 00:41:04 +0000 (17:41 -0700)] 
Merge branch 'sr/log-SG-no-textconv'

"git log -S/-G" started paying attention to textconv filter, but
there was no way to disable this.  Make it honor --no-textconv
option.

* sr/log-SG-no-textconv:
  diffcore-pickaxe: unify code for log -S/-G
  diffcore-pickaxe: fix leaks in "log -S<block>" and "log -G<pattern>"
  diffcore-pickaxe: port optimization from has_changes() to diff_grep()
  diffcore-pickaxe: respect --no-textconv
  diffcore-pickaxe: remove fill_one()
  diffcore-pickaxe: remove unnecessary call to get_textconv()

11 years agoMerge branch 'js/rerere-forget-protect-against-NUL'
Junio C Hamano [Fri, 12 Apr 2013 00:41:02 +0000 (17:41 -0700)] 
Merge branch 'js/rerere-forget-protect-against-NUL'

A few bugfixes to "git rerere" working on corner case merge
conflicts.

* js/rerere-forget-protect-against-NUL:
  rerere forget: do not segfault if not all stages are present
  rerere forget: grok files containing NUL

11 years agoMerge branch 'po/help-guides'
Junio C Hamano [Fri, 12 Apr 2013 00:41:00 +0000 (17:41 -0700)] 
Merge branch 'po/help-guides'

"git help" learned "-g" option to show the list of guides just like
list of commands are given with "-a".

* po/help-guides:
  doc: include --guide option description for "git help"
  help: mention -a and -g option, and 'git help <concept>' usage.
  builtin/help.c: add list_common_guides_help() function
  builtin/help.c: add --guide option
  builtin/help.c: split "-a" processing into two

11 years agoTypo fix: replacing it's -> its
Benoit Bourbie [Sat, 13 Apr 2013 16:47:21 +0000 (10:47 -0600)] 
Typo fix: replacing it's -> its

Signed-off-by: Benoit Bourbie <benoit.bourbie@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot: make PIPE a standard test prerequisite
Adam Spiers [Thu, 11 Apr 2013 02:07:04 +0000 (03:07 +0100)] 
t: make PIPE a standard test prerequisite

The 'PIPE' test prerequisite was already defined identically by t9010
and t9300, therefore it makes sense to make it a predefined
prerequisite.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoarchive: clarify explanation of --worktree-attributes
René Scharfe [Wed, 10 Apr 2013 17:49:57 +0000 (19:49 +0200)] 
archive: clarify explanation of --worktree-attributes

Make it a bit clearer that --worktree-attributes is about files in the
working tree (checked out files, possibly changed) and not the current
working directory ($PWD).  Link to the ATTRIBUTES section, which has
more details.

Reported-by: Amit Bakshi <ambakshi@gmail.com>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot9903: Don't fail when run from path accessed through symlink
Torstein Hegge [Thu, 11 Apr 2013 18:53:22 +0000 (20:53 +0200)] 
t9903: Don't fail when run from path accessed through symlink

When the git directory is accessed through a symlink like

  ln -s /tmp/git /tmp/git-symlink
  cd /tmp/git-symlink/t
  make -C .. && ./t9903-bash-prompt.sh

$TRASH_DIRECTORY is /tmp/git-symlink/t/trash directory.t9903-bash-prompt
and $(pwd -P) is /tmp/git/t/trash directory.t9903-bash-prompt.

When __gitdir looks up the path through 'git rev-parse --git-dir', it
will return paths similar to $(pwd -P). This behavior is already tested in
t9903 'gitdir - resulting path avoids symlinks'.

Signed-off-by: Torstein Hegge <hegge@resisty.net>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: activate graphlog extension for hg_log()
Antoine Pelisse [Thu, 11 Apr 2013 12:23:17 +0000 (07:23 -0500)] 
remote-hg: activate graphlog extension for hg_log()

The hg_log() test helper uses the "--graph" parameter that is
implemented by the GraphLog extension. If the extension is not activated
by the user, the parameter is not available. Activate the extension in
setup().

Also changes the way we grep the output in hg_log(). The pipe operator
can hide the return code of hg command. As a matter of fact, if log
fails because it doesn't know about "--graph", it doesn't report any
failure and let's you think everything worked.

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: fix bad file paths
Felipe Contreras [Thu, 11 Apr 2013 12:23:16 +0000 (07:23 -0500)] 
remote-hg: fix bad file paths

Mercurial allows absolute file paths, and Git doesn't like that.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: document location of stored hg repository
Simon Ruderich [Thu, 11 Apr 2013 12:23:15 +0000 (07:23 -0500)] 
remote-hg: document location of stored hg repository

Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: fix bad state issue
Felipe Contreras [Thu, 11 Apr 2013 12:23:14 +0000 (07:23 -0500)] 
remote-hg: fix bad state issue

The problem reportedly happened after doing a push that fails, the abort
causes the state of remote-hg to go bad, this happens because
remote-hg's marks are not stored, but 'git fast-export' marks are.

Ensure that the marks are _always_ stored.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: add 'insecure' option
Simon Ruderich [Thu, 11 Apr 2013 12:23:13 +0000 (07:23 -0500)] 
remote-hg: add 'insecure' option

If set to true acts as hg's clone/pull --insecure option.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: add simple mail test
Felipe Contreras [Thu, 11 Apr 2013 12:23:12 +0000 (07:23 -0500)] 
remote-hg: add simple mail test

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: add basic author tests
Felipe Contreras [Thu, 11 Apr 2013 12:23:11 +0000 (07:23 -0500)] 
remote-hg: add basic author tests

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: show more proper errors
Felipe Contreras [Thu, 11 Apr 2013 12:23:10 +0000 (07:23 -0500)] 
remote-hg: show more proper errors

When cloning or pushing fails, we don't want to show a stack-trace.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: force remote push
Felipe Contreras [Thu, 11 Apr 2013 12:23:09 +0000 (07:23 -0500)] 
remote-hg: force remote push

Ideally we shouldn't do this, as it's not recommended in mercurial
documentation, but there's no other way to push multiple bookmarks (on
the same branch), which would be the behavior most similar to git.

At the same time, add a configuration option for the people that don't
want to risk creating new remote heads.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: push to the appropriate branch
Dusty Phillips [Thu, 11 Apr 2013 12:23:08 +0000 (07:23 -0500)] 
remote-hg: push to the appropriate branch

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: update tags globally
Felipe Contreras [Thu, 11 Apr 2013 12:23:07 +0000 (07:23 -0500)] 
remote-hg: update tags globally

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: update remote bookmarks
Felipe Contreras [Thu, 11 Apr 2013 12:23:06 +0000 (07:23 -0500)] 
remote-hg: update remote bookmarks

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: refactor export
Felipe Contreras [Thu, 11 Apr 2013 12:23:05 +0000 (07:23 -0500)] 
remote-hg: refactor export

No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: split bookmark handling
Felipe Contreras [Thu, 11 Apr 2013 12:23:04 +0000 (07:23 -0500)] 
remote-hg: split bookmark handling

Will be useful for remote bookmarks.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: redirect buggy mercurial output
Felipe Contreras [Thu, 11 Apr 2013 12:23:03 +0000 (07:23 -0500)] 
remote-hg: redirect buggy mercurial output

Mercurial emits messages like "searching for changes", "no changes
found", etc. meant for the use of its own UI layer, which break the pipe
between transport helper and remote helper.

Since there's no way to silence Mercurial, let's redirect to standard
error.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: trivial test cleanups
Felipe Contreras [Thu, 11 Apr 2013 12:23:02 +0000 (07:23 -0500)] 
remote-hg: trivial test cleanups

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: make sure fake bookmarks are updated
Felipe Contreras [Thu, 11 Apr 2013 12:23:01 +0000 (07:23 -0500)] 
remote-hg: make sure fake bookmarks are updated

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: fix for files with spaces
Peter van Zetten [Thu, 11 Apr 2013 12:23:00 +0000 (07:23 -0500)] 
remote-hg: fix for files with spaces

Set the maximum number of splits to make when dividing the diff stat
lines based on space characters.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: properly report errors on bookmark pushes
Felipe Contreras [Thu, 11 Apr 2013 12:22:59 +0000 (07:22 -0500)] 
remote-hg: properly report errors on bookmark pushes

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: add missing config variable in doc
Dusty Phillips [Thu, 11 Apr 2013 12:22:58 +0000 (07:22 -0500)] 
remote-hg: add missing config variable in doc

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: trivial cleanups
Felipe Contreras [Thu, 11 Apr 2013 12:22:57 +0000 (07:22 -0500)] 
remote-hg: trivial cleanups

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocherry-pick: make sure all input objects are commits
Miklos Vajna [Thu, 11 Apr 2013 13:06:52 +0000 (15:06 +0200)] 
cherry-pick: make sure all input objects are commits

When a single argument was a non-commit, the error message used to be:

fatal: BUG: expected exactly one commit from walk

For multiple arguments, when none of the arguments was a commit, the error was:

fatal: empty commit set passed

Finally, when some of the arguments were non-commits, we ignored those
arguments.  Fix this bug and make sure all arguments are commits, and
for the first non-commit, error out with:

fatal: <name>: Can't cherry-pick a <type>

Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodoc/http-backend: give some lighttpd config examples
Jeff King [Thu, 11 Apr 2013 03:36:13 +0000 (23:36 -0400)] 
doc/http-backend: give some lighttpd config examples

The examples in the documentation are all for Apache. Let's
at least cover the basics: an anonymous server, an
authenticated server, and a "half auth" server with
anonymous read and authenticated write.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodoc/http-backend: clarify "half-auth" repo configuration
Jeff King [Thu, 11 Apr 2013 03:32:11 +0000 (23:32 -0400)] 
doc/http-backend: clarify "half-auth" repo configuration

When the http-backend is set up to allow anonymous read but
authenticated write, the http-backend manual suggests
catching only the "/git-receive-pack" POST of the packfile,
not the initial "info/refs?service=git-receive-pack" GET in
which we advertise refs.

This does work and is secure, as we do not allow any write
during the info/refs request, and the information in the ref
advertisement is the same that you would get from a fetch.

However, the configuration required by the server is
slightly more complex. The default `http.receivepack`
setting is to allow pushes if the webserver tells us that
the user authenticated, and otherwise to return a 403
("Forbidden"). That works fine if authentication is turned
on completely; the initial request requires authentication,
and http-backend realizes it is OK to do a push.

But for this "half-auth" state, no authentication has
occurred during the initial ref advertisement. The
http-backend CGI therefore does not think that pushing
should be enabled, and responds with a 403. The client
cannot continue, even though the server would have allowed
it to run if it had provided credentials.

It would be much better if the server responded with a 401,
asking for credentials during the initial contact. But
git-http-backend does not know about the server's auth
configuration (so a 401 would be confusing in the case of a
true anonymous server). Unfortunately, configuring Apache to
recognize the query string and apply the auth appropriately
to receive-pack (but not upload-pack) initial requests is
non-trivial.

The site admin can work around this by just turning on
http.receivepack explicitly in its repositories. Let's
document this workaround.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocount-objects: add -H option to humanize sizes
Antoine Pelisse [Wed, 10 Apr 2013 19:03:24 +0000 (21:03 +0200)] 
count-objects: add -H option to humanize sizes

Use the new humanize() function to print loose objects size, pack size,
and garbage size in verbose mode, or loose objects size in regular mode.
This patch doesn't change the way anything is displayed when the option
is not used.

Also update the documentation.

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agostrbuf: create strbuf_humanise_bytes() to show byte sizes
Antoine Pelisse [Wed, 10 Apr 2013 19:03:23 +0000 (21:03 +0200)] 
strbuf: create strbuf_humanise_bytes() to show byte sizes

Humanization of downloaded size is done in the same function as text
formatting in 'process.c'. The code cannot be reused easily elsewhere.

Separate text formatting from size simplification and make the
function public in strbuf so that it can easily be used by other
callers.

We now can use strbuf_humanise_bytes() for both downloaded size and
download speed calculation. One of the drawbacks is that speed will
now look like this when download is stalled: "0 bytes/s" instead of
"0 KiB/s".

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot5004: fix issue with empty archive test and bsdtar
René Scharfe [Wed, 10 Apr 2013 17:00:20 +0000 (19:00 +0200)] 
t5004: fix issue with empty archive test and bsdtar

bsdtar, which is the default tar on Mac OS X, handles empty archives
just fine but reports archives containing only a pax extended header
comment as damaged.  Work around the issue by explicitly generating
the archive for the tree and not the commit, which causes git archive
to omit the commit hash comment record from the tar file.

Reported-by: BJ Hargrave <bj@bjhargrave.com>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agohttp-backend: respect GIT_NAMESPACE with dumb clients
John Koleszar [Wed, 10 Apr 2013 00:55:08 +0000 (17:55 -0700)] 
http-backend: respect GIT_NAMESPACE with dumb clients

Filter the list of refs returned via the dumb HTTP protocol according
to the active namespace, consistent with other clients of the
upload-pack service.

Signed-off-by: John Koleszar <jkoleszar@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoclone: Allow repo using gitfile as a reference
Aaron Schrab [Tue, 9 Apr 2013 22:22:00 +0000 (18:22 -0400)] 
clone: Allow repo using gitfile as a reference

Try reading gitfile files when processing --reference options to clone.
This will allow, among other things, using a submodule checked out with
a recent version of git as a reference repository without requiring the
user to have internal knowledge of submodule layout.

Signed-off-by: Aaron Schrab <aaron@schrab.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot/README: --immediate skips cleanup commands for failed tests
Simon Ruderich [Tue, 9 Apr 2013 21:48:36 +0000 (23:48 +0200)] 
t/README: --immediate skips cleanup commands for failed tests

Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoclone: Fix error message for reference repository
Aaron Schrab [Mon, 8 Apr 2013 22:46:39 +0000 (18:46 -0400)] 
clone: Fix error message for reference repository

Do not report that an argument to clone's --reference option is not a
local directory.  Nothing checks for the existence or type of the path
as supplied by the user; checks are only done for particular contents of
the supposed directory, so we have no way to know the status of the
supplied path.  Telling the user that a directory doesn't exist when
that isn't actually known may lead him or her on the wrong path to
finding the problem.

Instead just state that the entered path is not a local repository which
is really all that is known about it.  It could be more helpful to state
the actual paths which were checked, but I believe that giving a good
description of that would be too verbose for a simple error message and
would be too dependent on implementation details.

Signed-off-by: Aaron Schrab <aaron@schrab.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocheckout: abbreviate hash in suggest_reattach
Kevin Bracey [Mon, 8 Apr 2013 15:53:42 +0000 (18:53 +0300)] 
checkout: abbreviate hash in suggest_reattach

After printing the list of left-behind commits (with abbreviated
hashes), use an abbreviated hash in the suggested 'git branch' command;
there's no point in outputting a full 40-character hex string in some
friendly advice.

Signed-off-by: Kevin Bracey <kevin@bracey.fi>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: improve tag handling
Felipe Contreras [Mon, 8 Apr 2013 18:36:39 +0000 (13:36 -0500)] 
remote-bzr: improve tag handling

revision_history() is deprecated and doesn't do what we want (revno
instead of dotted_revno?).

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: fix utf-8 support for fetching
Christophe Simonis [Mon, 8 Apr 2013 18:36:38 +0000 (13:36 -0500)] 
remote-bzr: fix utf-8 support for fetching

The previous patches didn't deal with all the scenarios.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoRevert 4b7f53da7618 (simplify-merges: drop merge from irrelevant side branch, 2013...
Junio C Hamano [Mon, 8 Apr 2013 20:10:27 +0000 (13:10 -0700)] 
Revert 4b7f53da7618 (simplify-merges: drop merge from irrelevant side branch, 2013-01-17)

Kevin Bracey reports that the change regresses a case shown in the
user manual.

Trading one fix with another breakage is not worth it.  Just keep
the test to document the existing breakage, and revert the change
for now.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agomerge-tree: don't print entries that match "local"
John Keeping [Sun, 7 Apr 2013 21:07:51 +0000 (22:07 +0100)] 
merge-tree: don't print entries that match "local"

The documentation says:

the output from the command omits entries that match the
<branch1> tree.

But currently "added in branch1" and "removed in branch1" (both while
unchanged in branch2) do print output.  Change this so that the
behaviour matches the documentation.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoSync with 1.8.2.1
Junio C Hamano [Sun, 7 Apr 2013 22:28:50 +0000 (15:28 -0700)] 
Sync with 1.8.2.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoGit 1.8.2.1 v1.8.2.1
Junio C Hamano [Sun, 7 Apr 2013 22:27:23 +0000 (15:27 -0700)] 
Git 1.8.2.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agobundle: Accept prerequisites without commit messages
Lukas Fleischer [Sun, 7 Apr 2013 11:53:15 +0000 (13:53 +0200)] 
bundle: Accept prerequisites without commit messages

While explicitly stating that the commit message in a prerequisite
line is optional, we required all lines with 40 or more characters
to contain a space after the object name, bailing out if a line
consisted of an object name only. This was to allow bundling a
history to a commit without an message, but the code forgot that it
already called rtrim() to remove that whitespace.

As a workaround, only check for SP when the line has more than 40
characters.

Signed-off-by: Lukas Fleischer <git@cryptocrack.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUpdate draft release notes to 1.8.3
Junio C Hamano [Sun, 7 Apr 2013 21:40:26 +0000 (14:40 -0700)] 
Update draft release notes to 1.8.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jk/rm-removed-paths'
Junio C Hamano [Sun, 7 Apr 2013 21:33:14 +0000 (14:33 -0700)] 
Merge branch 'jk/rm-removed-paths'

A handful of test cases and a corner case bugfix for "git rm".

* jk/rm-removed-paths:
  t3600: document failure of rm across symbolic links
  t3600: test behavior of reverse-d/f conflict
  rm: do not complain about d/f conflicts during deletion

11 years agoMerge branch 'tb/shared-perm'
Junio C Hamano [Sun, 7 Apr 2013 21:33:11 +0000 (14:33 -0700)] 
Merge branch 'tb/shared-perm'

Simplifies adjust_shared_perm() implementation.

* tb/shared-perm:
  path.c: optimize adjust_shared_perm()
  path.c: simplify adjust_shared_perm()

11 years agoMerge branch 'cn/commit-amend-doc'
Junio C Hamano [Sun, 7 Apr 2013 21:33:06 +0000 (14:33 -0700)] 
Merge branch 'cn/commit-amend-doc'

* cn/commit-amend-doc:
  Documentation/git-commit: reword the --amend explanation

11 years agoMerge branch 'fc/remote-helpers-test-updates'
Junio C Hamano [Sun, 7 Apr 2013 21:33:02 +0000 (14:33 -0700)] 
Merge branch 'fc/remote-helpers-test-updates'

* fc/remote-helpers-test-updates:
  remote-hg: fix hg-git test-case
  remote-bzr: remove stale check code for tests
  remote-helpers: fix the run of all tests
  remote-bzr: avoid echo -n

11 years agoMerge branch 'mg/texinfo-5'
Junio C Hamano [Sun, 7 Apr 2013 21:32:59 +0000 (14:32 -0700)] 
Merge branch 'mg/texinfo-5'

Strip @anchor elements in the texinfo output of the documentation,
as a single document created by concatenating our entire manual set
will produce many duplicates that makes newer texinfo unhappy.

* mg/texinfo-5:
  Documentation: Strip texinfo anchors to avoid duplicates

11 years agoMerge branch 'jk/diffcore-break-divzero'
Junio C Hamano [Sun, 7 Apr 2013 21:32:57 +0000 (14:32 -0700)] 
Merge branch 'jk/diffcore-break-divzero'

* jk/diffcore-break-divzero:
  diffcore-break: don't divide by zero

11 years agoMerge branch 'jk/bisect-prn-unsigned'
Junio C Hamano [Sun, 7 Apr 2013 21:32:54 +0000 (14:32 -0700)] 
Merge branch 'jk/bisect-prn-unsigned'

* jk/bisect-prn-unsigned:
  bisect: avoid signed integer overflow

11 years agoMerge branch 'rr/triangle'
Junio C Hamano [Sun, 7 Apr 2013 21:32:50 +0000 (14:32 -0700)] 
Merge branch 'rr/triangle'

Support "pull from one place, push to another place" workflow
better by introducing remote.pushdefault (overrides the "origin"
thing) and branch.*.pushremote (overrides the branch.*.remote).

* rr/triangle:
  remote.c: introduce branch.<name>.pushremote
  remote.c: introduce remote.pushdefault
  remote.c: introduce a way to have different remotes for fetch/push
  t5516 (fetch-push): drop implicit arguments from helper functions
  t5516 (fetch-push): update test description
  remote.c: simplify a bit of code using git_config_string()

11 years agoMerge branch 'mm/status-during-revert'
Junio C Hamano [Sun, 7 Apr 2013 21:32:03 +0000 (14:32 -0700)] 
Merge branch 'mm/status-during-revert'

"git status" learned to report that you are in the middle of a
revert session, just like it does for a cherry-pick and a bisect
session.

* mm/status-during-revert:
  status: show commit sha1 in "You are currently reverting" message
  status: show 'revert' state and status hint

11 years agoMerge branch 'jk/set-upstream-error-cases'
Junio C Hamano [Sun, 7 Apr 2013 21:31:08 +0000 (14:31 -0700)] 
Merge branch 'jk/set-upstream-error-cases'

The handing by "git branch --set-upstream-to" against various forms
of errorneous inputs were suboptimal.

* jk/set-upstream-error-cases:
  branch: give advice when tracking start-point is missing
  branch: mention start_name in set-upstream error messages
  branch: improve error message for missing --set-upstream-to ref
  branch: factor out "upstream is not a branch" error messages
  t3200: test --set-upstream-to with bogus refs

11 years agoMerge branch 'jk/filter-branch-come-back-to-original'
Junio C Hamano [Sun, 7 Apr 2013 21:29:34 +0000 (14:29 -0700)] 
Merge branch 'jk/filter-branch-come-back-to-original'

When used with "-d temporary-directory" option, "git filter-branch"
failed to come back to the original working tree to perform the
final clean-up procedure.

* jk/filter-branch-come-back-to-original:
  filter-branch: return to original dir after filtering

11 years agoformat-patch: trivial cleanups
Felipe Contreras [Sun, 7 Apr 2013 17:46:24 +0000 (12:46 -0500)] 
format-patch: trivial cleanups

Now that the cover-letter code has been shuffled, we can do some
cleanups.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoformat-patch: add format.coverLetter configuration variable
Felipe Contreras [Sun, 7 Apr 2013 17:46:23 +0000 (12:46 -0500)] 
format-patch: add format.coverLetter configuration variable

Also, add a new option: 'auto', so if there's more than one patch, the
cover letter is generated, otherwise it's not.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agolog: update to OPT_BOOL
Felipe Contreras [Sun, 7 Apr 2013 17:46:22 +0000 (12:46 -0500)] 
log: update to OPT_BOOL

OPT_BOOLEAN is deprecated, and this is what we want.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoformat-patch: refactor branch name calculation
Felipe Contreras [Sun, 7 Apr 2013 17:46:21 +0000 (12:46 -0500)] 
format-patch: refactor branch name calculation

By moving the part that relies on rev->pending earlier, where we are
already checking the special case where there's only one ref.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoformat-patch: improve head calculation for cover-letter
Felipe Contreras [Sun, 7 Apr 2013 17:46:20 +0000 (12:46 -0500)] 
format-patch: improve head calculation for cover-letter

If we do it after the revision traversal we can be sure that this is
indeed a commit that will be processed (i.e. not a merge) and it's the
top most one (thus removing the NEEDSWORK comment, at least we show the
same as 'git diff --stat' output that appears in the cover-letter).

While we are at it, since we know there's nothing to generate, exit
sooner in all cases, like --cover-letter currently does.

Also, if there's nothing to generate and cover-letter is specified, a
different code-path might be triggered that is not currently covered in
the test-case, so add a test for it.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoSync with 1.8.1.6
Junio C Hamano [Sun, 7 Apr 2013 16:10:11 +0000 (09:10 -0700)] 
Sync with 1.8.1.6

11 years agofmt-merge-msg: use core.commentchar in tag signatures completely
Ralf Thielow [Sun, 7 Apr 2013 15:25:44 +0000 (17:25 +0200)] 
fmt-merge-msg: use core.commentchar in tag signatures completely

Commit eff80a9 (Allow custom "comment char") introduced a custom
comment character for commit messages but didn't use it completely
in the tag signature part.

This commit fixes that.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agofmt-merge-msg: respect core.commentchar in people credits
Ralf Thielow [Sun, 7 Apr 2013 15:25:43 +0000 (17:25 +0200)] 
fmt-merge-msg: respect core.commentchar in people credits

Commit eff80a9 (Allow custom "comment char") introduced a custom
comment character for commit messages but forgot to use it in
people credits which can be a part of a commit message.

With this commit, the custom comment character is also used
in people credits.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoGit 1.8.1.6 v1.8.1.6
Junio C Hamano [Sun, 7 Apr 2013 15:58:30 +0000 (08:58 -0700)] 
Git 1.8.1.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jc/directory-attrs-regression-fix' into maint-1.8.1
Junio C Hamano [Sun, 7 Apr 2013 15:45:03 +0000 (08:45 -0700)] 
Merge branch 'jc/directory-attrs-regression-fix' into maint-1.8.1

A pattern "dir" (without trailing slash) in the attributes file
stopped matching a directory "dir" by mistake with an earlier change
that wanted to allow pattern "dir/" to also match.

* jc/directory-attrs-regression-fix:
  t: check that a pattern without trailing slash matches a directory
  dir.c::match_pathname(): pay attention to the length of string parameters
  dir.c::match_pathname(): adjust patternlen when shifting pattern
  dir.c::match_basename(): pay attention to the length of string parameters
  attr.c::path_matches(): special case paths that end with a slash
  attr.c::path_matches(): the basename is part of the pathname

11 years agoremote-helpers/test-bzr.sh: do not use "grep '\s'"
Torsten Bögershausen [Sun, 7 Apr 2013 08:48:30 +0000 (10:48 +0200)] 
remote-helpers/test-bzr.sh: do not use "grep '\s'"

Using grep "devel\s\+3:" to find at least one whitspace is not
portable on all grep versions; not all grep versions understand "\s"
as a "whitespace".

Use a literal TAB followed by SPACE.

The + as a qualifier for "one or more" is not a basic regular
expression; use egrep instead of grep.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agosend-email: make annotate configurable
Felipe Contreras [Sun, 7 Apr 2013 07:10:27 +0000 (01:10 -0600)] 
send-email: make annotate configurable

Some people always do --annotate, lets not force them to always type
that.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>