Commit graph

55800 commits

Author SHA1 Message Date
Junio C Hamano 86d2271f06 Merge branch 'ab/send-email-transferencoding-fix'
Since "git send-email" learned to take 'auto' as the value for the
transfer-encoding, it by mistake stopped honoring the values given
to the configuration variables sendemail.transferencoding and/or
sendemail.<ident>.transferencoding.  This has been corrected to
(finally) redoing the order of setting the default, reading the
configuration and command line options.

* ab/send-email-transferencoding-fix:
  send-email: fix regression in sendemail.identity parsing
  send-email: document --no-[to|cc|bcc]
  send-email: fix broken transferEncoding tests
  send-email: remove cargo-culted multi-patch pattern in tests
  send-email: do defaults -> config -> getopt in that order
  send-email: rename the @bcclist variable for consistency
  send-email: move the read_config() function above getopts
2019-06-13 13:18:46 -07:00
Junio C Hamano b697d92f56 Git 2.22
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-07 09:39:21 -07:00
Junio C Hamano 6ee1eaca3e l10n-2.22.0-rnd3
-----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCgA3FiEET/4dIHc7EQTOoGRdx6TpG3VEeigFAlz6JwgZHHdvcmxkaGVs
 bG8ubmV0QGdtYWlsLmNvbQAKCRDHpOkbdUR6KJIiEACdMlFDsNNZ1bG5hpwLIRTN
 aK2y1L0sJDLvjjvXIR4VSjWHjazeIQqMCw+O3F90a2NAHHjGhHPTbHPgpiTnTeyd
 UUhCECHRVf3qFm+WvSsxFTbAwTeah4vKIe/X5kHuMNyxJNBXhvfCVjbFRKwktSGV
 +Oot5d5QR/cLsCJNrSyifwHS2AvXnSqR57p78oWNEmusnORYfZM5J/muRcbaxOhi
 FcFEBZAmpC1Kp+0QvTt4KGMjbbpzgWz5jm7NuyEhETNQPnXY9Uo6LppkSEZnRQwt
 rwzJkPKtGmFfwgey9YvTX6uXBQuugDPEIPL5pmRvOe4LNCTu1DKatpDg15HIBH+e
 JKtCjE4vDQCD22w9ARRkxJFiGUBhqyfiX/RJmNTeQyH7TQPP9cy5r6P4S2yNESDK
 yFe17J4GCBbe/L4fvqC0qPZxYI0lMV5n2oT21KTv5OwLK5b96EtsgDG53VEzrYsN
 zwUcpJYg/L5MlLX19UHZVNxay0ri7y2cdYMOhXYKN2/xuf/lbiweWOpODg5uzH8E
 ymoXc/Vu0k/ltVx9JqY1JFeNe9FDa2sf67n2XgiW/JZAGOwqnR0rt4dQ0iE9mDmn
 qqkWo/2xZymOZoV0IjruChAMYnB3jlpZbIGU9gUH/zurd1iu/seVfpK+VllcXS+p
 se6TLAwZkNybfy0eNsMGzw==
 =IHre
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.22.0-rnd3' of git://github.com/git-l10n/git-po

l10n-2.22.0-rnd3

* tag 'l10n-2.22.0-rnd3' of git://github.com/git-l10n/git-po: (25 commits)
  l10n: fr.po: Review French translation
  l10n: de.po: Update German translation
  l10n: de.po: improve description of 'git reset --quiet'
  l10n: TEAMS: Change German translation team leader
  l10n: bg.po: Updated Bulgarian translation (4581t)
  l10n: zh_CN: Revision for git v2.22.0 l10n
  l10n: zh_CN: for git v2.22.0 l10n round 1~3
  l10n: es: 2.22.0 round 3
  l10n: it.po: Updated Italian translation
  l10n: fr v2.22.0 rnd 3
  l10n: vi.po(4581t): Updated Vietnamese translation for v2.22.0 round 3
  l10n: git.pot: v2.22.0 round 3 (3 new, 2 removed)
  l10n: es: 2.22.0 round 2
  l10n: bg.po: Updated Bulgarian translation (4580t)
  l10n: vi.po(4580t): Updated Vietnamese translation for v2.22.0 round 2
  l10n: fr.po v2.22.0 round 2
  l10n: git.pot: v2.22.0 round 2 (6 new, 3 removed)
  l10n: bg.po: Updated Bulgarian translation (4577t)
  l10n: es: 2.22.0 round 1
  l10n: vi.po(4577t): Updated Vietnamese translation for v2.22.0 round 1
  ...
2019-06-07 09:36:32 -07:00
Jiang Xin 0cdb8d2db2 Merge branch 'fr_review' of git://github.com/jnavila/git
* 'fr_review' of git://github.com/jnavila/git:
  l10n: fr.po: Review French translation
2019-06-07 16:51:09 +08:00
Jiang Xin d014920079 Merge branch 'master' of git://github.com/alshopov/git-po
* 'master' of git://github.com/alshopov/git-po:
  l10n: bg.po: Updated Bulgarian translation (4581t)
2019-06-07 16:50:23 +08:00
Cédric Malard 82eb147dbb l10n: fr.po: Review French translation
Signed-off-by: Cédric Malard <c.malard-git@valdun.net>
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
2019-06-07 08:54:28 +02:00
Junio C Hamano 20fbf7dd42 Merge branch 'en/merge-directory-renames-fix'
Recent code restructuring of merge-recursive engine introduced a
regression dealing with rename/add conflict.

* en/merge-directory-renames-fix:
  merge-recursive: restore accidentally dropped setting of path
2019-06-06 14:03:36 -07:00
Matthias Rüster 219829ae83 l10n: de.po: Update German translation
Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
2019-06-06 07:03:26 +02:00
Ralf Thielow 8c18948b78 l10n: de.po: improve description of 'git reset --quiet'
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2019-06-06 07:03:25 +02:00
Matthias Rüster d314d77577 l10n: TEAMS: Change German translation team leader
Acked-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
2019-06-05 20:48:37 +02:00
Elijah Newren 481de8a293 merge-recursive: restore accidentally dropped setting of path
In commit 8daec1df03 ("merge-recursive: switch from (oid,mode) pairs
to a diff_filespec", 2019-04-05), we actually switched from
(oid,mode,path) triplets to a diff_filespec -- but most callsites in the
patch only needed to worry about oid and mode so the commit message
focused on that.  The oversight in the commit message apparently spilled
over to the code as well; one of the dozen or so callsites accidentally
dropped the setting of the path in the conversion.  Restore the path
setting in that location.

Also, this pointed out that our testsuite was lacking a good rename/add
test, at least one that involved the need for merge content with the
rename.  Add such a test, and since rename/add vs. add/rename could
possibly be important, redo the merge the opposite direction to make
sure we don't have issues with the direction of the merge.  These
testcases failed before restoring the setting of path, but with the
paths appropriately set the testcases both pass.

Reported-by: Ben Humphreys <behumphreys@atlassian.com>
Based-on-patch-by: SZEDER Gábor <szeder.dev@gmail.com>
Tested-by: Ben Humphreys <behumphreys@atlassian.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-05 09:30:40 -07:00
Alexander Shopov de2b0545ee l10n: bg.po: Updated Bulgarian translation (4581t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2019-06-05 08:51:15 +02:00
Fangyi Zhou 5b5336320b l10n: zh_CN: Revision for git v2.22.0 l10n
Revise 51 translations, improving consistency for some phrased.
Update email address for Fangyi Zhou

Signed-off-by: Fangyi Zhou <me@fangyi.io>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2019-06-05 08:37:30 +08:00
Jiang Xin d46c551928 l10n: zh_CN: for git v2.22.0 l10n round 1~3
Translate 274 new messages (4581t0f0u) for git 2.22.0.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2019-06-05 08:37:30 +08:00
Jiang Xin 914bd0923e Merge branch '2.22' of https://github.com/ChrisADR/git-po
* '2.22' of https://github.com/ChrisADR/git-po:
  l10n: es: 2.22.0 round 3
2019-06-05 08:35:35 +08:00
Jiang Xin 488ed582d3 Merge branch 'it-l10n-wip' of github.com:AlessandroMenti/git-po
* 'it-l10n-wip' of github.com:AlessandroMenti/git-po:
  l10n: it.po: Updated Italian translation
2019-06-05 08:17:28 +08:00
Christopher Diaz Riveros 922a0a7d98 l10n: es: 2.22.0 round 3
Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
2019-06-04 18:52:28 -05:00
Alessandro Menti bbc55709e7
l10n: it.po: Updated Italian translation
Signed-off-by: Alessandro Menti <alessandro.menti@alessandromenti.it>
2019-06-04 22:27:19 +02:00
Jean-Noël Avila 85b66ac50d l10n: fr v2.22.0 rnd 3
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2019-06-04 19:53:32 +02:00
Tran Ngoc Quan 77e1962193 l10n: vi.po(4581t): Updated Vietnamese translation for v2.22.0 round 3
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2019-06-04 08:13:53 +07:00
Jiang Xin 386544cd84 l10n: git.pot: v2.22.0 round 3 (3 new, 2 removed)
Generate po/git.pot from v2.22.0-rc3 for git v2.22.0 l10n round 3.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2019-06-04 08:27:36 +08:00
Jiang Xin b50e1c093c Merge branch 'master' of git://git.kernel.org/pub/scm/git/git
* 'master' of git://git.kernel.org/pub/scm/git/git:
  Git 2.22-rc3
  i18n: fix typos found during l10n for git 2.22.0
  RelNotes: minor typo fixes in 2.22.0 draft
  list-objects-filter: disable 'sparse:path' filters
2019-06-04 08:24:28 +08:00
Junio C Hamano 74583d8912 Git 2.22-rc3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-03 11:25:12 -07:00
Junio C Hamano 4a787f72f5 Merge branch 'cc/list-objects-filter-wo-sparse-path'
Disable "--filter=sparse:path=<path>" that would allow reading from
paths on the filesystem.

* cc/list-objects-filter-wo-sparse-path:
  list-objects-filter: disable 'sparse:path' filters
2019-06-03 11:18:54 -07:00
Jiang Xin 8a1569d655 i18n: fix typos found during l10n for git 2.22.0
Fix two typos introduced by the following commits:

+ 31fba9d3b4 (diff-parseopt: convert --[src|dst]-prefix, 2019-03-24)
+ ed8b4132c8 (remote-curl: mark all error messages for translation,
  2019-03-05)

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-03 11:10:53 -07:00
Todd Zullinger ee70b40e8d RelNotes: minor typo fixes in 2.22.0 draft
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-03 11:06:18 -07:00
Christopher Diaz Riveros 1c8ba5f1b3 l10n: es: 2.22.0 round 2
Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
2019-06-03 09:34:50 -05:00
Jiang Xin cb56cf3b2d Merge branch 'master' of https://github.com/vnwildman/git
* 'master' of https://github.com/vnwildman/git:
  l10n: vi.po(4580t): Updated Vietnamese translation for v2.22.0 round 2
2019-06-02 22:35:11 +08:00
Jiang Xin c181f4d2d7 Merge branch 'master' of git://github.com/alshopov/git-po
* 'master' of git://github.com/alshopov/git-po:
  l10n: bg.po: Updated Bulgarian translation (4580t)
2019-06-02 22:09:35 +08:00
Alexander Shopov 9c21d45420 l10n: bg.po: Updated Bulgarian translation (4580t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2019-06-02 09:26:52 +02:00
Tran Ngoc Quan 35655fe726 l10n: vi.po(4580t): Updated Vietnamese translation for v2.22.0 round 2
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2019-06-01 08:37:57 +07:00
Jean-Noël Avila fc8703c9f6 l10n: fr.po v2.22.0 round 2
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2019-05-31 10:46:21 +02:00
Jiang Xin c08fd7307c l10n: git.pot: v2.22.0 round 2 (6 new, 3 removed)
Generate po/git.pot from v2.22.0-rc2 for git v2.22.0 l10n round 2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2019-05-31 14:36:22 +08:00
Jiang Xin a17177ce3a Merge branch 'master' of git://git.kernel.org/pub/scm/git/git
* 'master' of git://git.kernel.org/pub/scm/git/git: (66 commits)
  Git 2.22-rc2
  ...
2019-05-31 14:34:26 +08:00
Jiang Xin ea8a8d04c3 Merge branch 'master' of https://github.com/Softcatala/git-po
* 'master' of https://github.com/Softcatala/git-po:
  l10n: Update Catalan translation
2019-05-31 14:32:35 +08:00
Junio C Hamano 874dd410ce Git 2.22-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-30 10:56:29 -07:00
Junio C Hamano 8feb8e27e7 Merge branch 'js/rebase-config-bitfix'
* js/rebase-config-bitfix:
  rebase: replace incorrect logical negation by correct bitwise one
2019-05-30 10:50:47 -07:00
Junio C Hamano c41b1197ec Merge branch 'es/doc-gitsubmodules-markup'
Doc markup fix.

* es/doc-gitsubmodules-markup:
  gitsubmodules: align html and nroff lists
2019-05-30 10:50:46 -07:00
Junio C Hamano 936dce6f93 Merge branch 'ja/diff-opt-typofix'
Typofix.

* ja/diff-opt-typofix:
  diff: fix mistake in translatable strings
2019-05-30 10:50:46 -07:00
Junio C Hamano 0e5387cd02 Merge branch 'jt/clone-server-option'
A brown-paper-bag bugfix to a change already in 'master'.

* jt/clone-server-option:
  fetch-pack: send server options after command
2019-05-30 10:50:46 -07:00
Junio C Hamano fa03d9c699 Merge branch 'sg/progress-off-by-one-fix'
A brown-paper-bag bugfix to a change already in 'master'.

* sg/progress-off-by-one-fix:
  progress: avoid empty line when breaking the progress line
2019-05-30 10:50:45 -07:00
Junio C Hamano 2656eceae7 Merge branch 'js/rebase-deprecate-preserve-merges'
A bit more leftover clean-up to deprepcate "rebase -p".

* js/rebase-deprecate-preserve-merges:
  rebase docs: recommend `-r` over `-p`
  docs: say that `--rebase=preserve` is deprecated
  tests: mark a couple more test cases as requiring `rebase -p`
2019-05-30 10:50:45 -07:00
Junio C Hamano 463dca6476 Merge branch 'sg/trace2-rename'
Rename environment variables that are used to control the "trace2"
mechanism to a more readable name.

* sg/trace2-rename:
  trace2: document the supported values of GIT_TRACE2* env variables
  trace2: rename environment variables to GIT_TRACE2*
2019-05-30 10:50:45 -07:00
Junio C Hamano 90f2d88e61 Merge branch 'jh/trace2'
* jh/trace2:
  trace2: fix tracing when NO_PTHREADS is defined
2019-05-30 10:50:45 -07:00
Junio C Hamano 20aa7c594f Merge branch 'nd/diff-parseopt'
A brown-paper-bag bugfix to a change already in 'master'.

* nd/diff-parseopt:
  parse-options: check empty value in OPT_INTEGER and OPT_ABBREV
  diff-parseopt: restore -U (no argument) behavior
  diff-parseopt: correct variable types that are used by parseopt
2019-05-30 10:50:44 -07:00
Christian Couder e693237e2b list-objects-filter: disable 'sparse:path' filters
If someone wants to use as a filter a sparse file that is in the
repository, something like "--filter=sparse:oid=<ref>:<path>"
already works.

So 'sparse:path' is only interesting if the sparse file is not in
the repository. In this case though the current implementation has
a big security issue, as it makes it possible to ask the server to
read any file, like for example /etc/password, and to explore the
filesystem, as well as individual lines of files.

If someone is interested in using a sparse file that is not in the
repository as a filter, then at the minimum a config option, such
as "uploadpack.sparsePathFilter", should be implemented first to
restrict the directory from which the files specified by
'sparse:path' can be read.

For now though, let's just disable 'sparse:path' filters.

Helped-by: Matthew DeVore <matvore@google.com>
Helped-by: Jeff Hostetler <git@jeffhostetler.com>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-29 11:05:34 -07:00
Nguyễn Thái Ngọc Duy f7e68a0878 parse-options: check empty value in OPT_INTEGER and OPT_ABBREV
When parsing the argument for OPT_INTEGER and OPT_ABBREV, we check if we
can parse the entire argument to a number with "if (*s)". There is one
missing check: if "arg" is empty to begin with, we fail to notice.

This could happen with long option by writing like

  git diff --inter-hunk-context= blah blah

Before 16ed6c97cc (diff-parseopt: convert --inter-hunk-context,
2019-03-24), --inter-hunk-context is handled by a custom parser
opt_arg() and does detect this correctly.

This restores the bahvior for --inter-hunk-context and make sure all
other integer options are handled the same (sane) way. For OPT_ABBREV
this is new behavior. But it makes it consistent with the rest.

PS. OPT_MAGNITUDE has similar code but git_parse_ulong() does detect
empty "arg". So it's good to go.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-29 11:04:33 -07:00
Nguyễn Thái Ngọc Duy 8ef05193bc diff-parseopt: restore -U (no argument) behavior
Before d473e2e0e8 (diff.c: convert -U|--unified, 2019-01-27), -U and
--unified are implemented with a custom parser opt_arg() in diff.c. I
didn't check this code carefully and not realize that it's the
equivalent of PARSE_OPT_NONEG | PARSE_OPT_OPTARG.

In other words, if -U is specified without any argument, the option
should be accepted, and the default value should be used. Without
PARSE_OPT_OPTARG, parse_options() will reject this case and cause a
regression.

Reported-by: Bryan Turner <bturner@atlassian.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-29 11:04:32 -07:00
Nguyễn Thái Ngọc Duy 7f125ff909 diff-parseopt: correct variable types that are used by parseopt
Most number-related OPT_ macros store the value in an 'int'
variable. Many of the variables in 'struct diff_options' have a
different type, but during the conversion to using parse_options() I
failed to notice and correct.

The problem was reported on s360x which is a big-endian
architechture. The variable to store '-w' option in this case is
xdl_opts, 'long' type, 8 bytes. But since parse_options() assumes
'int' (4 bytes), it will store bits in the wrong part of xdl_opts. The
problem was found on little-endian platforms because parse_options()
will accidentally store at the right part of xdl_opts.

There aren't much to say about the type change (except that 'int' for
xdl_opts should still be big enough, since Windows' long is the same
size as 'int' and nobody has complained so far). Some safety checks may
be implemented in the future to prevent class of bugs.

Reported-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-29 11:04:30 -07:00
Ævar Arnfjörð Bjarmason 3ff15040e2 send-email: fix regression in sendemail.identity parsing
Fix a regression in my recent 3494dfd3ee ("send-email: do defaults ->
config -> getopt in that order", 2019-05-09). I missed that the
$identity variable needs to be extracted from the command-line before
we do the config reading, as it determines which config variable we
should read first. See [1] for the report.

The sendemail.identity feature was added back in
34cc60ce2b ("send-email: Add support for SSL and SMTP-AUTH",
2007-09-03), there were no tests to assert that it worked properly.

So let's fix both the regression, and add some tests to assert that
this is being parsed properly. While I'm at it I'm adding a
--no-identity option to go with --[to|cc|bcc] variable, since the
semantics are similar. It's like to/cc/bcc except that unlike those we
don't support multiple identities, but we could now easily add it
support for it if anyone cares.

In just fixing the --identity command-line parsing bug I discovered
that a narrow fix to that wouldn't do. In read_config() we had a state
machine that would only set config values if they weren't set already,
and thus by proxy we wouldn't e.g. set "to" based on sendemail.to if
we'd seen sendemail.gmail.to before, with --identity=gmail.

I'd modified some of the relevant code in 3494dfd3ee, but just
reverting to that wouldn't do, since it would bring back the
regression fixed in that commit.

Refactor read_config() do what we actually mean here. We don't want to
set a given sendemail.VAR if a sendemail.$identity.VAR previously set
it. The old code was conflating this desire with the hardcoded
defaults for these variables, and as discussed in 3494dfd3ee that was
never going to work. Instead pass along the state of whether an
identity config set something before, as distinguished from the state
of the default just being false, or the default being a non-bool or
true (e.g. --transferencoding).

I'm still not happy with the test coverage here, e.g. there's nothing
testing sendemail.smtpEncryption, but I only have so much time to fix
this code.

1. https://public-inbox.org/git/5cddeb61.1c69fb81.47ed4.e648@mx.google.com/

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-29 10:33:39 -07:00