1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-07 17:46:10 +02:00
Commit Graph

2669 Commits

Author SHA1 Message Date
Ævar Arnfjörð Bjarmason 20d2a30f8f Makefile: replace perl/Makefile.PL with simple make rules
Replace the perl/Makefile.PL and the fallback perl/Makefile used under
NO_PERL_MAKEMAKER=NoThanks with a much simpler implementation heavily
inspired by how the i18n infrastructure's build process works[1].

The reason for having the Makefile.PL in the first place is that it
was initially[2] building a perl C binding to interface with libgit,
this functionality, that was removed[3] before Git.pm ever made it to
the master branch.

We've since since started maintaining a fallback perl/Makefile, as
MakeMaker wouldn't work on some platforms[4]. That's just the tip of
the iceberg. We have the PM.stamp hack in the top-level Makefile[5] to
detect whether we need to regenerate the perl/perl.mak, which I fixed
just recently to deal with issues like the perl version changing from
under us[6].

There is absolutely no reason for why this needs to be so complex
anymore. All we're getting out of this elaborate Rube Goldberg machine
was copying perl/* to perl/blib/* as we do a string-replacement on
the *.pm files to hardcode @@LOCALEDIR@@ in the source, as well as
pod2man-ing Git.pm & friends.

So replace the whole thing with something that's pretty much a copy of
how we generate po/build/**.mo from po/*.po, just with a small sed(1)
command instead of msgfmt. As that's being done rename the files
from *.pm to *.pmc just to indicate that they're generated (see
"perldoc -f require").

While I'm at it, change the fallback for Error.pm from being something
where we'll ship our own Error.pm if one doesn't exist at build time
to one where we just use a Git::Error wrapper that'll always prefer
the system-wide Error.pm, only falling back to our own copy if it
really doesn't exist at runtime. It's now shipped as
Git::FromCPAN::Error, making it easy to add other modules to
Git::FromCPAN::* in the future if that's needed.

Functional changes:

 * This will not always install into perl's idea of its global
   "installsitelib". This only potentially matters for packagers that
   need to expose Git.pm for non-git use, and as explained in the
   INSTALL file there's a trivial workaround.

 * The scripts themselves will 'use lib' the target directory, but if
   INSTLIBDIR is set it overrides it. It doesn't have to be this way,
   it could be set in addition to INSTLIBDIR, but my reading of [7] is
   that this is the desired behavior.

 * We don't build man pages for all of the perl modules as we used to,
   only Git(3pm). As discussed on-list[8] that we were building
   installed manpages for purely internal APIs like Git::I18N or
   private-Error.pm was always a bug anyway, and all the Git::SVN::*
   ones say they're internal APIs.

   There are apparently external users of Git.pm, but I don't expect
   there to be any of the others.

   As a side-effect of these general changes the perl documentation
   now only installed by install-{doc,man}, not a mere "install" as
   before.

1. 5e9637c629 ("i18n: add infrastructure for translating Git with
   gettext", 2011-11-18)

2. b1edc53d06 ("Introduce Git.pm (v4)", 2006-06-24)

3. 18b0fc1ce1 ("Git.pm: Kill Git.xs for now", 2006-09-23)

4. f848718a69 ("Make perl/ build procedure ActiveState friendly.",
   2006-12-04)

5. ee9be06770 ("perl: detect new files in MakeMaker builds",
   2012-07-27)

6. c59c4939c2 ("perl: regenerate perl.mak if perl -V changes",
   2017-03-29)

7. 0386dd37b1 ("Makefile: add PERLLIB_EXTRA variable that adds to
   default perl path", 2013-11-15)

8. 87bmjjv1pu.fsf@evledraar.booking.com ("Re: [PATCH] Makefile:
   replace perl/Makefile.PL with simple make rules"

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-11 15:28:10 -08:00
Junio C Hamano 93bfe62ae3 Merge branch 'tz/complete-branch-copy'
Command line completion (in contrib/) has been taught about the
"--copy" option of "git branch".

* tz/complete-branch-copy:
  completion: add '--copy' option to 'git branch'
2017-11-27 11:06:37 +09:00
Junio C Hamano f3f671b928 Merge branch 'rv/sendemail-tocmd-in-config-and-completion'
Teach "sendemail.tocmd" to places that know about "sendemail.to",
like documentation and shell completion (in contrib/).

* rv/sendemail-tocmd-in-config-and-completion:
  completion: add git config sendemail.tocmd
  Documentation/config: add sendemail.tocmd to list preceding "See git-send-email(1)"
2017-11-27 11:06:32 +09:00
Junio C Hamano 10f65c239a Merge branch 'jc/ignore-cr-at-eol'
The "diff" family of commands learned to ignore differences in
carriage return at the end of line.

* jc/ignore-cr-at-eol:
  diff: --ignore-cr-at-eol
  xdiff: reassign xpparm_t.flags bits
2017-11-27 11:06:31 +09:00
Jeff King f5da077b1f git-jump: give contact instructions in the README
Let's make it clear how patches should flow into
contrib/git-jump. The normal Git maintainer does not
necessarily care about things in contrib/, and authors of
individual components should be the ones giving the final
review/ack for a patch. Ditto for bug reports, which are
likely to get more attention from the area expert.

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-21 11:01:02 +09:00
Beat Bolli 007d06aa57 contrib/git-jump: allow to configure the grep command
Add the configuration option "jump.grepCmd" that allows to configure the
command that is used to search in grep mode. This allows the users of
git-jump to use ag(1) or ack(1) as search engines.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-21 11:00:27 +09:00
Todd Zullinger 41ca0f773e completion: add '--copy' option to 'git branch'
In 52d59cc645 (branch: add a --copy (-c) option to go with --move (-m),
2017-06-18), `git branch` learned a `--copy` option.  Include it when
providing command completions.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-17 10:32:19 +09:00
Junio C Hamano f13b8ec25e Merge branch 'tz/fsf-address-update'
* tz/fsf-address-update:
  Replace Free Software Foundation address in license notices
  Replace Free Software Foundation address in license notices
2017-11-15 12:14:34 +09:00
Junio C Hamano 5c22d53bfb Merge branch 'ab/mediawiki-namespace'
The remote-helper for talking to MediaWiki has been updated to
work with mediawiki namespaces.

* ab/mediawiki-namespace:
  remote-mediawiki: show progress while fetching namespaces
  remote-mediawiki: process namespaces in order
  remote-mediawiki: support fetching from (Main) namespace
  remote-mediawiki: skip virtual namespaces
  remote-mediawiki: show known namespace choices on failure
  remote-mediawiki: allow fetching namespaces with spaces
  remote-mediawiki: add namespace support
2017-11-15 12:14:32 +09:00
Junio C Hamano fcaba62192 Merge branch 'ab/mediawiki-name-truncation'
The remote-helper for talking to MediaWiki has been updated to
truncate an overlong pagename so that ".mw" suffix can still be
added.

* ab/mediawiki-name-truncation:
  remote-mediawiki: limit filenames to legal
2017-11-15 12:14:26 +09:00
Rasmus Villemoes 5d3adff65e completion: add git config sendemail.tocmd
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-14 15:42:01 +09:00
Junio C Hamano 55b5d92092 Merge branch 'js/wincred-empty-cred'
MinGW updates.

* js/wincred-empty-cred:
  wincred: handle empty username/password correctly
  t0302: check helper can handle empty credentials
2017-11-09 14:31:31 +09:00
Junio C Hamano 906329f369 Merge branch 'dk/libsecret-unlock-to-load-fix'
The credential helper for libsecret (in contrib/) has been improved
to allow possibly prompting the end user to unlock secrets that are
currently locked (otherwise the secrets may not be loaded).

* dk/libsecret-unlock-to-load-fix:
  credential-libsecret: unlock locked secrets
2017-11-09 14:31:30 +09:00
Todd Zullinger 484257925f Replace Free Software Foundation address in license notices
The mailing address for the FSF has changed over the years.  Rather than
updating the address across all files, refer readers to gnu.org, as the
GNU GPL documentation now suggests for license notices.  The mailing
address is retained in the full license files (COPYING and LGPL-2.1).

The old address is still present in t/diff-lib/COPYING.  This is
intentional, as the file is used in tests and the contents are not
expected to change.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-09 13:21:21 +09:00
Antoine Beaupré 94c9acbf00 remote-mediawiki: show progress while fetching namespaces
Without this, the fetch process seems hanged while we fetch page
listings across the namespaces. Obviously, it should be possible to
silence this with -q, but that's an issue already present everywhere
in the code and should be fixed separately:

https://github.com/Git-Mediawiki/Git-Mediawiki/issues/30

Signed-off-by: Antoine Beaupré <anarcat@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-08 11:06:33 +09:00
Antoine Beaupré 55fefa9e94 remote-mediawiki: process namespaces in order
Ideally, we'd process them in numeric order since that is more
logical, but we can't do that yet since this is where we find the
numeric identifiers in the first place. Lexicographic order is a good
compromise.

Signed-off-by: Antoine Beaupré <anarcat@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-08 11:06:33 +09:00
Antoine Beaupré da2a180977 remote-mediawiki: support fetching from (Main) namespace
When we specify a list of namespaces to fetch from, by default the MW
API will not fetch from the default namespace, refered to as "(Main)"
in the documentation:

https://www.mediawiki.org/wiki/Manual:Namespace#Built-in_namespaces

I haven't found a way to address that "(Main)" namespace when getting
the namespace ids: indeed, when listing namespaces, there is no
"canonical" field for the main namespace, although there is a "*"
field that is set to "" (empty). So in theory, we could specify the
empty namespace to get the main namespace, but that would make
specifying namespaces harder for the user: we would need to teach
users about the "empty" default namespace. It would also make the code
more complicated: we'd need to parse quotes in the configuration.

So we simply override the query here and allow the user to specify
"(Main)" since that is the publicly documented name.

Signed-off-by: Antoine Beaupré <anarcat@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-08 11:06:33 +09:00
Antoine Beaupré db3364352d remote-mediawiki: skip virtual namespaces
Virtual namespaces do not correspond to pages in the database and are
automatically generated by MediaWiki. It makes little sense,
therefore, to fetch pages from those namespaces and the MW API doesn't
support listing those pages.

According to the documentation, those virtual namespaces are currently
"Special" (-1) and "Media" (-2) but we treat all negative namespaces
as "virtual" as a future-proofing mechanism.

Signed-off-by: Antoine Beaupré <anarcat@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-08 11:06:33 +09:00
Antoine Beaupré 09eebbadca remote-mediawiki: show known namespace choices on failure
If we fail to find a requested namespace, we should tell the user
which ones we know about, since those were already fetched. This
allows users to fetch all namespaces by specifying a dummy namespace,
failing, then copying the list of namespaces in the config.

Eventually, we should have a flag that allows fetching all namespaces
automatically.

Reviewed-by: Antoine Beaupré <anarcat@debian.org>
Signed-off-by: Antoine Beaupré <anarcat@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-08 11:06:33 +09:00
Junio C Hamano e9282f02b2 diff: --ignore-cr-at-eol
A new option --ignore-cr-at-eol tells the diff machinery to treat a
carriage-return at the end of a (complete) line as if it does not
exist.

Just like other "--ignore-*" options to ignore various kinds of
whitespace differences, this will help reviewing the real changes
you made without getting distracted by spurious CRLF<->LF conversion
made by your editor program.

Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
[jch: squashed in command line completion by Dscho]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-08 10:05:27 +09:00
Ingo Ruhnke cc92338004 remote-mediawiki: allow fetching namespaces with spaces
we still want to use spaces as separators in the config, but we should
allow the user to specify namespaces with spaces, so we use underscore
for this.

Reviewed-by: Antoine Beaupré <anarcat@debian.org>
Signed-off-by: Antoine Beaupré <anarcat@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-07 09:45:55 +09:00
Kevin 5d9798ae62 remote-mediawiki: add namespace support
This introduces a new remote.origin.namespaces argument that is a
space-separated list of namespaces. The list of pages extract is then
taken from all the specified namespaces.

Reviewed-by: Antoine Beaupré <anarcat@debian.org>
Signed-off-by: Antoine Beaupré <anarcat@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-07 09:45:55 +09:00
Junio C Hamano 30af513004 Merge branch 'tb/complete-checkout'
Command line completion (in contrib/) update.

* tb/complete-checkout:
  completion: add remaining flags to checkout
2017-11-06 14:24:31 +09:00
Junio C Hamano 130b512e62 Merge branch 'dm/run-command-ignored-hook-advise'
A hook script that is set unexecutable is simply ignored.  Git
notifies when such a file is ignored, unless the message is
squelched via advice.ignoredHook configuration.

* dm/run-command-ignored-hook-advise:
  run-command: add hint when a hook is ignored
2017-11-06 14:24:22 +09:00
Dennis Kaarsemaker 9c109e9bbc credential-libsecret: unlock locked secrets
Credentials exposed by the secret service DBUS interface may be locked.
Setting the SECRET_SEARCH_UNLOCK flag will make the secret service
unlock these secrets, possibly prompting the user for credentials to do
so. Without this flag, the secret is simply not loaded.

Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-04 10:59:21 +09:00
Jakub Bereżański 601e1e7897 wincred: handle empty username/password correctly
Empty (length 0) usernames and/or passwords, when saved in the Windows
Credential Manager, come back as null when reading the credential.

One use case for such empty credentials is with NTLM authentication, where
empty username and password instruct libcurl to authenticate using the
credentials of the currently logged-on user (single sign-on).

When locating the relevant credentials, make empty username match null.
When outputting the credentials, handle nulls correctly.

Signed-off-by: Jakub Bereżański <kuba@berezanscy.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-01 13:46:39 +09:00
Antoine Beaupré d1a7050f93 remote-mediawiki: limit filenames to legal
mediawiki pages can have names longer than NAME_MAX (generally 255)
characters, which will fail on checkout. we simply strip out extra
characters, which may mean one page's content will overwrite another
(the last editing winning).

ideally, we would do a more clever system to find unique names, but
that would be more difficult and error prone for a situation that
should rarely happen in the first place.

Signed-off-by: Antoine Beaupré <anarcat@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-01 13:42:38 +09:00
Thomas Braun 6357d9d004 completion: add remaining flags to checkout
In the commits 1fc458d9 (builtin/checkout: add --recurse-submodules
switch, 2017-03-14), 08d595dc (checkout: add --ignore-skip-worktree-bits
in sparse checkout mode, 2013-04-13) and 32669671 (checkout: introduce
--detach synonym for "git checkout foo^{commit}", 2011-02-08) checkout
gained new flags but the completion was not updated, although these flags
are useful completions. Add them.

The flags --force and --ignore-other-worktrees are not added as they are
potentially dangerous.

The flags --progress and --no-progress are only useful for scripting and are
therefore also not included.

Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>
Reviewed-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-10-25 15:12:46 +09:00
Junio C Hamano 952cc9b9bd Merge branch 'tb/complete-describe'
Docfix.

* tb/complete-describe:
  completion: add --broken and --dirty to describe
2017-10-11 14:52:23 +09:00
Damien Marié f805a00a39 run-command: add hint when a hook is ignored
When an hook is present but the file is not set as executable then git will
ignore the hook.
For now this is silent which can be confusing.

This commit adds this warning to improve the situation:

  hint: The 'pre-commit' hook was ignored because it's not set as executable.
  hint: You can disable this warning with `git config advice.ignoredHook false`

To allow the old use-case of enabling/disabling hooks via the executable flag a
new setting is introduced: advice.ignoredHook.

Signed-off-by: Damien Marié <damien@dam.io>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-10-10 13:21:46 +09:00
Thomas Braun 7823655082 completion: add --broken and --dirty to describe
When the flags for broken and dirty were implemented in
b0176ce6b5 (builtin/describe: introduce --broken flag, 2017-03-21)
and 9f67d2e827 (Teach "git describe" --dirty option, 2009-10-21)
the completion was not updated, although these flags are useful
completions. Add them.

Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>
Helped-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-10-07 11:12:58 +09:00
Junio C Hamano ac67aa5fd0 Merge branch 'rs/cocci-de-paren-call-params'
Code clean-up.

* rs/cocci-de-paren-call-params:
  coccinelle: remove parentheses that become unnecessary
2017-10-05 13:48:19 +09:00
René Scharfe 9ca356fa8b coccinelle: remove parentheses that become unnecessary
Transformations that hide multiplications can end up with an pair of
parentheses that is no longer needed.  E.g. with a rule like this:

  @@
  expression E;
  @@
  - E * 2
  + double(E)

... we might get a patch like this:

  -	x = (a + b) * 2;
  +	x = double((a + b));

Add a pair of parentheses to the preimage side of such rules.
Coccinelle will generate patches that remove them if they are present,
and it will still match expressions that lack them.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-10-02 13:02:26 +09:00
Junio C Hamano 1f1ea329b9 Merge branch 'dw/diff-highlight-makefile-fix'
Build clean-up.

* dw/diff-highlight-makefile-fix:
  diff-highlight: add clean target to Makefile
2017-09-19 10:47:50 +09:00
Junio C Hamano 8e36002add Merge branch 'ma/up-to-date'
Message and doc updates.

* ma/up-to-date:
  treewide: correct several "up-to-date" to "up to date"
  Documentation/user-manual: update outdated example output
2017-09-10 17:08:22 +09:00
Daniel Watkins 74f1bd912b diff-highlight: add clean target to Makefile
Now that `make` produces a file, we should have a clean target to remove
it.

Signed-off-by: Daniel Watkins <daniel@daniel-watkins.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-09-06 12:56:26 +09:00
Martin Ågren 7560f547e6 treewide: correct several "up-to-date" to "up to date"
Follow the Oxford style, which says to use "up-to-date" before the noun,
but "up to date" after it. Don't change plumbing (specifically
send-pack.c, but transport.c (git push) also has the same string).

This was produced by grepping for "up-to-date" and "up to date". It
turned out we only had to edit in one direction, removing the hyphens.

Fix a typo in Documentation/git-diff-index.txt while we're there.

Reported-by: Jeffrey Manian <jeffrey.manian@gmail.com>
Reported-by: STEVEN WHITE <stevencharleswhitevoices@gmail.com>
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-23 12:17:22 -07:00
Junio C Hamano 6d2b8a390c Merge branch 'eb/contacts-reported-by'
"git contacts" (in contrib/) now lists the address on the
"Reported-by:" trailer to its output, in addition to those on
S-o-b: and other trailers, to make it easier to notify (and thank)
the original bug reporter.

* eb/contacts-reported-by:
  git-contacts: also recognise "Reported-by:"
2017-08-11 13:27:06 -07:00
Junio C Hamano aec68c3dde Merge branch 'rg/rerere-train-overwrite'
The "rerere-train" script (in contrib/) learned the "--overwrite"
option to allow overwriting existing recorded resolutions.

* rg/rerere-train-overwrite:
  contrib/rerere-train: optionally overwrite existing resolutions
2017-08-11 13:27:05 -07:00
Eric Blake 09ac673788 git-contacts: also recognise "Reported-by:"
It's nice to cc someone that reported a bug, in order to let them
know that a fix is being considered, and possibly even get their
help in reviewing/testing the patch.

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-27 09:42:55 -07:00
Raman Gupta ad53bf79aa contrib/rerere-train: optionally overwrite existing resolutions
Provide the user an option to overwrite existing resolutions using an
`--overwrite` flag. This might be used, for example, if the user knows
that they already have an entry in their rerere cache for a conflict,
but wish to drop it and retrain based on the merge commit(s) passed to
the rerere-train script.

Signed-off-by: Raman Gupta <rocketraman@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-26 13:38:48 -07:00
René Scharfe 578398071e add MOVE_ARRAY
Similar to COPY_ARRAY (introduced in 60566cbb58), add a safe and
convenient helper for moving potentially overlapping ranges of array
entries.  It infers the element size, multiplies automatically and
safely to get the size in bytes, does a basic type safety check by
comparing element sizes and unlike memmove(3) it supports NULL
pointers iff 0 elements are to be moved.

Also add a semantic patch to demonstrate the helper's intended usage.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-17 14:54:53 -07:00
Junio C Hamano 35049a2343 Merge branch 'aw/contrib-subtree-doc-asciidoctor' into maint
The Makefile rule in contrib/subtree for building documentation
learned to honour USE_ASCIIDOCTOR just like the main documentation
set does.

* aw/contrib-subtree-doc-asciidoctor:
  subtree: honour USE_ASCIIDOCTOR when set
2017-07-10 13:59:06 -07:00
Junio C Hamano d73b46cfb5 Merge branch 'rs/free-and-null'
Code cleanup.

* rs/free-and-null:
  coccinelle: polish FREE_AND_NULL rules
2017-07-10 13:42:51 -07:00
Junio C Hamano eb37527ab0 Merge branch 'xz/send-email-batch-size'
"git send-email" learned to overcome some SMTP server limitation
that does not allow many pieces of e-mails to be sent over a single
session.

* xz/send-email-batch-size:
  send-email: --batch-size to work around some SMTP server limit
2017-07-06 18:14:46 -07:00
Junio C Hamano 33cc9cfc3d Merge branch 'aw/contrib-subtree-doc-asciidoctor'
The Makefile rule in contrib/subtree for building documentation
learned to honour USE_ASCIIDOCTOR just like the main documentation
set does.

* aw/contrib-subtree-doc-asciidoctor:
  subtree: honour USE_ASCIIDOCTOR when set
2017-07-06 18:14:42 -07:00
xiaoqiang zhao 5453b83bdf send-email: --batch-size to work around some SMTP server limit
Some email servers (e.g. smtp.163.com) limit the number emails to be
sent per session (connection) and this will lead to a faliure when
sending many messages.

Teach send-email to disconnect after sending a number of messages
(configurable via the --batch-size=<num> option), wait for a few
seconds (configurable via the --relogin-delay=<seconds> option) and
reconnect, to work around such a limit.

Also add two configuration variables to give these options the default.

Note:

  We will use this as a band-aid for now, but in the longer term, we
  should look at and react to the SMTP error code from the server;
  Xianqiang reports that 450 and 451 are returned by problematic
  servers.

  cf. https://public-inbox.org/git/7993e188.d18d.15c3560bcaf.Coremail.zxq_yx_007@163.com/

Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-05 09:09:45 -07:00
René Scharfe 76d8d45ffb coccinelle: polish FREE_AND_NULL rules
There are two rules for using FREE_AND_NULL in free.cocci, one for
pointer types and one for expressions.  Both cause coccinelle to remove
empty lines and even newline characters between replacements for some
reason; consecutive "free(x);/x=NULL;" sequences end up as multiple
FREE_AND_NULL calls on the same time.

Remove the type rule, as the expression rule already covers it, and
rearrange the lines of the latter to place the addition of FREE_AND_NULL
between the removals, which causes coccinelle to leave surrounding
whitespace untouched.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-29 10:46:16 -07:00
A. Wilcox fdc1ad97c1 subtree: honour USE_ASCIIDOCTOR when set
Defining USE_ASCIIDOCTOR=1 when building Git uses asciidoctor over
asciidoc when generating DocBook and man page documentation.  However,
the contrib/subtree module does not presently honour that flag.

This causes a build failure when asciidoc is not present on the build
system.  Instead, adapt the main Documentation/Makefile logic to use
asciidoctor when requested.

Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-27 21:01:27 -07:00
Ville Skyttä 6412757514 Spelling fixes
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-27 10:35:49 -07:00