]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
4 years agot5551: test usage of chunked encoding explicitly
Jonathan Tan [Wed, 5 Jun 2019 19:26:24 +0000 (12:26 -0700)] 
t5551: test usage of chunked encoding explicitly

When run using GIT_TEST_PROTOCOL_VERSION=2, a test in t5551 fails
because 4 POSTs (probe, ls-refs, probe, fetch) are sent instead of 2
(probe, fetch).

One way to resolve this would be to relax the condition (from "= 2" to
greater than 1, say), but upon further inspection, the test probably
shouldn't be counting the number of POSTs. This test states that large
requests are split across POSTs, but this is not correct; the main
change is that chunked transfer encoding is used, but the request is
still contained within one POST. (The test coincidentally works because
Git indeed sends 2 POSTs in the case of a large request, but that is
because, as stated above, the first POST is a probing RPC - see
post_rpc() in remote-curl.c for more information.)

Therefore, instead of counting POSTs, check that chunked transfer
encoding is used. This also has the desirable side effect of passing
with GIT_TEST_PROTOCOL_VERSION=2.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Acked-by: Derrick Stolee <dstolee@microsoft.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agot5551: use 'test_i18ngrep' to check translated output
SZEDER Gábor [Mon, 24 Jun 2019 12:44:46 +0000 (14:44 +0200)] 
t5551: use 'test_i18ngrep' to check translated output

The two tests 'invalid Content-Type rejected' and 'server-side error
detected' in 't5551-http-fetch-smart.sh' use "plain" 'grep' to check
that 'git clone' failed with the expected error message, but the
messages they are checking are translated, and, consequently, these
tests fail when the test script is run with GIT_TEST_GETTEXT_POISON
enabled.

Use 'test_i18ngrep' instead.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agosubmodule foreach: fix recursion of options
Morian Sonnet [Mon, 24 Jun 2019 20:26:55 +0000 (22:26 +0200)] 
submodule foreach: fix recursion of options

Calling

    git submodule foreach --recursive <subcommand> --<option>

leads to an error stating that the option --<option> is unknown to
submodule--helper. That is of course only, when <option> is not a valid
option for git submodule foreach.

The reason for this is, that above call is internally translated into a
call to submodule--helper:

    git submodule--helper foreach --recursive \
        -- <subcommand> --<option>

This call starts by executing the subcommand with its option inside the
first level submodule and continues by calling the next iteration of
the submodule foreach call

    git --super-prefix <submodulepath> submodule--helper \
      foreach --recursive <subcommand> --<option>

inside the first level submodule. Note that the double dash in front of
the subcommand is missing.

This problem starts to arise only recently, as the
PARSE_OPT_KEEP_UNKNOWN flag for the argument parsing of git submodule
foreach was removed in commit a282f5a906. Hence, the unknown option is
complained about now, as the argument parsing is not properly ended by
the double dash.

This commit fixes the problem by adding the double dash in front of the
subcommand during the recursion.

Signed-off-by: Morian Sonnet <moriansonnet@googlemail.com>
Acked-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agopager: add a helper function to clear the last line in the terminal
SZEDER Gábor [Mon, 24 Jun 2019 18:13:16 +0000 (20:13 +0200)] 
pager: add a helper function to clear the last line in the terminal

There are a couple of places where we want to clear the last line on
the terminal, e.g. when a progress bar line is overwritten by a
shorter line, then the end of that progress line would remain visible,
unless we cover it up.

In 'progress.c' we did this by always appending a fixed number of
space characters to the next line (even if it was not shorter than the
previous), but as it turned out that fixed number was not quite large
enough, see the fix in 9f1fd84e15 (progress: clear previous progress
update dynamically, 2019-04-12).  From then on we've been keeping
track of the length of the last displayed progress line and appending
the appropriate number of space characters to the next line, if
necessary, but, alas, this approach turned out to be error prone, see
the fix in 1aed1a5f25 (progress: avoid empty line when breaking the
progress line, 2019-05-19).  The next patch in this series is about to
fix a case where we don't clear the last line, and on occasion do end
up with such garbage at the end of the line.  It would be great if we
could do that without the need to deal with that without meticulously
computing the necessary number of space characters.

So add a helper function to clear the last line on the terminal using
an ANSI escape sequence, which has the advantage to clear the whole
line no matter how wide it is, even after the terminal width changed.
Such an escape sequence is not available on dumb terminals, though, so
in that case fall back to simply print a whole terminal width (as
reported by term_columns()) worth of space characters.

In 'editor.c' launch_specified_editor() already used this ANSI escape
sequence, so replace it with a call to this function.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agot3404: make the 'rebase.missingCommitsCheck=ignore' test more focused
SZEDER Gábor [Mon, 24 Jun 2019 18:13:15 +0000 (20:13 +0200)] 
t3404: make the 'rebase.missingCommitsCheck=ignore' test more focused

The test 'rebase -i respects rebase.missingCommitsCheck = warn' is
mainly interested in the warning about the dropped commits, but it
checks the whole output of 'git rebase', including progress lines and
what not that are not at all relevant to 'rebase.missingCommitsCheck',
but make it necessary to update this test whenever e.g. the way we
show progress is updated (as it will happen in one of the later
patches of this series).

Modify the test to verify only the first four lines of 'git rebase's
output that contain all the important lines, notably the line
containing the "Warning:" itself and the oneline log of the dropped
commit.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agot3404: modernize here doc style
SZEDER Gábor [Mon, 24 Jun 2019 18:13:14 +0000 (20:13 +0200)] 
t3404: modernize here doc style

In 't3404-rebase-interactive.sh' the expected output of several tests
is prepared from here documents, which are outside of
'test_expect_success' blocks and have spaces around redirection
operators.

Move these here documents into the corresponding 'test_expect_success'
block and avoid spaces between filename and redition operators.
Furthermore, quote the here docs' delimiter word to prevent parameter
expansions and what not, where applicable.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agodoc: don't use git.kernel.org as example gitweb URL
Jakub Wilk [Sat, 22 Jun 2019 16:48:57 +0000 (18:48 +0200)] 
doc: don't use git.kernel.org as example gitweb URL

git.kernel.org uses cgit, not gitweb, these days:

    $ w3m -dump 'http://git.kernel.org/?p=git/git.git;a=tree;f=gitweb' | grep -w generated
    generated by cgit 1.2-0.3.lf.el7 (git 2.18.0) at 2019-06-22 16:14:38 +0000

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoconfig: simplify parsing of unit factors
René Scharfe [Sat, 22 Jun 2019 10:03:40 +0000 (12:03 +0200)] 
config: simplify parsing of unit factors

Just return the value of the factor or zero for unrecognized strings
instead of using an output reference and a separate return value to
indicate success.  This is shorter and simpler.

It basically reverts that function to before c8deb5a146 ("Improve error
messages when int/long cannot be parsed from config", 2007-12-25), while
keeping the better messages, so restore its old name, get_unit_factor(),
as well.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoconfig: don't multiply in parse_unit_factor()
René Scharfe [Sat, 22 Jun 2019 10:03:36 +0000 (12:03 +0200)] 
config: don't multiply in parse_unit_factor()

parse_unit_factor() multiplies the number that is passed to it with the
value of a recognized unit factor (K, M or G for 2^10, 2^20 and 2^30,
respectively).  All callers pass in 1 as a number, though, which allows
them to check the actual multiplication for overflow before they are
doing it themselves.

Ignore the passed in number and don't multiply, as this feature of
parse_unit_factor() is not used anymore.  Rename the output parameter to
reflect that it's not about the end result anymore, but just about the
unit factor.

Suggested-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoconfig: use unsigned_mult_overflows to check for overflows
René Scharfe [Sat, 22 Jun 2019 10:03:30 +0000 (12:03 +0200)] 
config: use unsigned_mult_overflows to check for overflows

parse_unit_factor() checks if a K, M or G is present after a number and
multiplies it by 2^10, 2^20 or 2^30, respectively.  One of its callers
checks if the result is smaller than the number alone to detect
overflows.  The other one passes 1 as the number and does multiplication
and overflow check itself in a similar manner.

This works, but is inconsistent, and it would break if we added support
for a bigger unit factor.  E.g. 16777217T is 2^64 + 2^40, i.e. too big
for a 64-bit number.  Modulo 2^64 we get 2^40 == 1TB, which is bigger
than the raw number 16777217 == 2^24 + 1, so the overflow would go
undetected by that method.

Let both callers pass 1 and handle overflow check and multiplication
themselves.  Do the check before the multiplication, using
unsigned_mult_overflows, which is simpler and can deal with larger unit
factors.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agot0001: fix on case-insensitive filesystems
Johannes Schindelin [Mon, 24 Jun 2019 17:40:05 +0000 (19:40 +0200)] 
t0001: fix on case-insensitive filesystems

On a case-insensitive filesystem, such as HFS+ or NTFS, it is possible
that the idea Bash has of the current directory differs in case from
what Git thinks it is. That's totally okay, though, and we should not
expect otherwise.

On Windows, for example, when you call

cd C:\GIT-SDK-64

in a PowerShell and there exists a directory called `C:\git-sdk-64`, the
current directory will be reported in all upper-case. Even in a Bash
that you might call from that PowerShell. Git, however, will have
normalized this via `GetFinalPathByHandle()`, and the expectation in
t0001 that the recorded gitdir will match what `pwd` says will be
violated.

Let's address this by comparing these paths in a case-insensitive
manner when `core.ignoreCase` is `true`.

Reported by Jameson Miller.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agodelta-islands: respect progress flag
Jeff King [Thu, 20 Jun 2019 08:58:32 +0000 (04:58 -0400)] 
delta-islands: respect progress flag

The delta island code always prints "Marked %d islands", even if
progress has been suppressed with --no-progress or by sending stderr to
a non-tty.

Let's pass a progress boolean to load_delta_islands(). We already do
the same thing for the progress meter in resolve_tree_islands().

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agostash: fix show referencing stash index
Thomas Gummerer [Sat, 15 Jun 2019 11:26:18 +0000 (12:26 +0100)] 
stash: fix show referencing stash index

In the conversion of 'stash show' to C in dc7bd382b1 ("stash: convert
show to builtin", 2019-02-25), 'git stash show <n>', where n is the
index of a stash got broken, if n is not a file or a valid revision by
itself.

'stash show' accepts any flag 'git diff' accepts for changing the
output format.  Internally we use 'setup_revisions()' to parse these
command line flags.  Currently we pass the whole argv through to
'setup_revisions()', which includes the stash index.

As the stash index is not a valid revision or a file in the working
tree in most cases however, this 'setup_revisions()' call (and thus
the whole command) ends up failing if we use this form of 'git stash
show'.

Instead of passing the whole argv to 'setup_revisions()', only pass
the flags (and the command name) through, while excluding the stash
reference.  The stash reference is parsed (and validated) in
'get_stash_info()' already.

This separate parsing also means that we currently do produce the
correct output if the command succeeds.

Reported-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agowt-status.h: drop stdio.h include
Jeff King [Tue, 18 Jun 2019 15:54:19 +0000 (11:54 -0400)] 
wt-status.h: drop stdio.h include

We started including stdio.h to pick up the declaration of "FILE" in
f26a001226 (Enable wt-status output to a given FILE pointer.,
2007-09-17). But there's no need, since headers can assume that
git-compat-util.h has been included, which covers stdio.

This should just be redundant, and not hurting anything (like pulling in
includes out of order) because C files are supposed to always include
git-compat-util.h first. But it's worth cleaning up to model good
behavior.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoverify-tag: drop signal.h include
Jeff King [Tue, 18 Jun 2019 15:54:09 +0000 (11:54 -0400)] 
verify-tag: drop signal.h include

There's no reason verify-tag.c needs to include signal.h. It's already
in git-compat-util.h, which we properly include as the first header.
And there doesn't seem to be a particular reason for this include; it's
just an artifact from the file creation in 2ae68fcb78 (Make verify-tag a
builtin., 2007-07-27).

Likewise verify-commit.c has the same issue, probably because it was
created using verify-tag as a template in d07b00b7f3 (verify-commit:
scriptable commit signature verification, 2014-06-23).

These includes are probably just redundant, and not hurting anything by
circumventing the order that git-compat-util.h tries to impose, since
we'll always have loaded git-compat-util by the time we get to these. So
this is just a cleanup, and shouldn't fix or break any platforms.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agowrapper: avoid undefined behaviour in macOS
Carlo Marcelo Arenas Belón [Sun, 16 Jun 2019 18:40:03 +0000 (11:40 -0700)] 
wrapper: avoid undefined behaviour in macOS

0620b39b3b ("compat: add a mkstemps() compatibility function", 2009-05-31)
included a function based on code from libiberty which would result in
undefined behaviour in platforms where timeval's tv_usec is a 32-bit signed
type as shown by:

wrapper.c:505:31: runtime error: left shift of 594546 by 16 places cannot be represented in type '__darwin_suseconds_t' (aka 'int')

interestingly the version of this code from gcc never had this bug and the
code had a cast that would had prevented the issue (at least in 64-bit
platforms) but was misapplied.

change the cast to uint64_t so it also works in 32-bit platforms.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agointerpret-trailers: load default config
Jeff King [Wed, 19 Jun 2019 03:37:28 +0000 (23:37 -0400)] 
interpret-trailers: load default config

The interpret-trailers program does not do the usual loading of config
via git_default_config(), and thus does not respect many of the usual
options. In particular, we will not load core.commentChar, even though
the underlying trailer code uses its value.

This can be seen in the accompanying test, where setting
core.commentChar to anything besides "#" results in a failure to treat
the comments correctly.

Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agouse COPY_ARRAY for copying arrays
René Scharfe [Sat, 15 Jun 2019 18:36:35 +0000 (20:36 +0200)] 
use COPY_ARRAY for copying arrays

Convert calls of memcpy(3) to use COPY_ARRAY, which shortens and
simplifies the code a bit.

Patch generated by Coccinelle and contrib/coccinelle/array.cocci.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agococcinelle: use COPY_ARRAY for copying arrays
René Scharfe [Sat, 15 Jun 2019 18:32:58 +0000 (20:32 +0200)] 
coccinelle: use COPY_ARRAY for copying arrays

The current semantic patch for COPY_ARRAY transforms memcpy(3) calls on
pointers, but Coccinelle distinguishes them from arrays.  It already
contains three rules to handle the options for sizeof (i.e. source,
destination and type), and handling arrays as source and destination
would require four times as many rules if we enumerated all cases.

We also don't handle array subscripts, and supporting that would
increase the number of rules by another factor of four.  (An isomorphism
telling Coccinelle that "sizeof x[...]" is equivalent to "sizeof *x"
would be nice..)

Support arrays and array subscripts, but keep the number of rules down
by adding normalization steps: First turn array subscripts into
derefences, then determine the types of expressions used with sizeof and
replace them with these types, and then convert the different possible
combinations of arrays and pointers with memcpy(3) to COPY_ARRAY.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agofsmonitor: avoid signed integer overflow / infinite loop
Carlo Marcelo Arenas Belón [Sat, 15 Jun 2019 16:11:35 +0000 (09:11 -0700)] 
fsmonitor: avoid signed integer overflow / infinite loop

883e248b8a ("fsmonitor: teach git to optionally utilize a file system
monitor to speed up detecting new or changed files.", 2017-09-22) uses
an int in a loop that would wrap if index_state->cache_nr (unsigned)
is bigger than INT_MAX

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot3404: fix a typo
Johannes Schindelin [Fri, 14 Jun 2019 12:16:08 +0000 (05:16 -0700)] 
t3404: fix a typo

This one slipped through the review of a9279c678588 (sequencer: do not
squash 'reword' commits when we hit conflicts, 2018-06-19).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocleanup: fix possible overflow errors in binary search, part 2
René Scharfe [Thu, 13 Jun 2019 17:51:56 +0000 (19:51 +0200)] 
cleanup: fix possible overflow errors in binary search, part 2

Calculating the sum of two array indexes to find the midpoint between
them can overflow, i.e. code like this is unsafe for big arrays:

mid = (first + last) >> 1;

Make sure the intermediate value stays within the boundaries instead,
like this:

mid = first + ((last - first) >> 1);

The loop condition of the binary search makes sure that 'last' is
always greater than 'first', so this is safe as long as 'first' is
not negative.  And that can be verified easily using the pre-context
of each change, except for name-hash.c, so add an assertion to that
effect there.

The unsafe calculations were found with:

git grep '(.*+.*) *>> *1'

This is a continuation of 19716b21a4 (cleanup: fix possible overflow
errors in binary search, 2017-10-08).

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoadd -p: fix checkout -p with pathological context
Phillip Wood [Wed, 12 Jun 2019 09:25:27 +0000 (02:25 -0700)] 
add -p: fix checkout -p with pathological context

Commit fecc6f3a68 ("add -p: adjust offsets of subsequent hunks when one is
skipped", 2018-03-01) fixed adding hunks in the correct place when a
previous hunk has been skipped. However it did not address patches that
are applied in reverse. In that case we need to adjust the pre-image
offset so that when apply reverses the patch the post-image offset is
adjusted correctly. We subtract rather than add the delta as the patch
is reversed (the easiest way to think about it is to consider a hunk of
deletions that is skipped - in that case we want to reduce offset so we
need to subtract).

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoconfig: avoid calling `labs()` on too-large data type
Johannes Schindelin [Thu, 13 Jun 2019 11:49:47 +0000 (04:49 -0700)] 
config: avoid calling `labs()` on too-large data type

The `labs()` function operates, as the initial `l` suggests, on `long`
parameters. However, in `config.c` we tried to use it on values of type
`intmax_t`.

This problem was found by GCC v9.x.

To fix it, let's just "unroll" the function (i.e. negate the value if it
is negative).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agowinansi: simplify loading the GetCurrentConsoleFontEx() function
Johannes Schindelin [Thu, 13 Jun 2019 11:49:46 +0000 (04:49 -0700)] 
winansi: simplify loading the GetCurrentConsoleFontEx() function

We introduced helper macros to simplify loading functions dynamically.
Might just as well use them.

This also side-steps a compiler warning when building with GCC v8.x: it
would complain about casting between incompatible function pointers.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agokwset: allow building with GCC 8
Johannes Schindelin [Thu, 13 Jun 2019 11:49:45 +0000 (04:49 -0700)] 
kwset: allow building with GCC 8

The kwset functionality makes use of the obstack code, which expects to
be handed a function that can allocate large chunks of data. It expects
that function to accept a `size` parameter of type `long`.

This upsets GCC 8 on Windows, because `long` does not have the same
bit size as `size_t` there.

Now, the proper thing to do would be to switch to `size_t`. But this
would make us deviate from the "upstream" code even further, making it
hard to synchronize with newer versions, and also it would be quite
involved because that `long` type is so invasive in that code.

Let's punt, and instead provide a super small wrapper around
`xmalloc()`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agopoll (mingw): allow compiling with GCC 8 and DEVELOPER=1
Johannes Schindelin [Thu, 13 Jun 2019 11:49:44 +0000 (04:49 -0700)] 
poll (mingw): allow compiling with GCC 8 and DEVELOPER=1

The return type of the `GetProcAddress()` function is `FARPROC` which
evaluates to `long long int (*)()`, i.e. it cannot be cast to the
correct function signature by GCC 8.

To work around that, we first cast to `void *` and go on with our merry
lives.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agopackfile: rename close_all_packs to close_object_store
Derrick Stolee [Fri, 17 May 2019 18:41:49 +0000 (11:41 -0700)] 
packfile: rename close_all_packs to close_object_store

The close_all_packs() method is now responsible for more than just pack-files.
It also closes the commit-graph and the multi-pack-index. Rename the function
to be more descriptive of its larger role. The name also fits because the
input parameter is a raw_object_store.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agopackfile: close commit-graph in close_all_packs
Derrick Stolee [Fri, 17 May 2019 18:41:48 +0000 (11:41 -0700)] 
packfile: close commit-graph in close_all_packs

The close_all_packs() method is used to close all read handles to
pack-files and the multi-pack-index before running 'git gc --auto'.
This is particularly important on the Windows platform, where read
handles block any writes to those files. Replacing one of these
files with a rename() will fail in this situation.

The commit-graph also performs a rename, so is susceptable to this
problem. We are careful to close the commit-graph before writing,
but that doesn't work when a 'git fetch' (or similar) process runs
'git gc --auto' which may write a commit-graph.

Here, close the commit-graph as part of close_all_packs().

Reported-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: use raw_object_store when closing
Derrick Stolee [Fri, 17 May 2019 18:41:47 +0000 (11:41 -0700)] 
commit-graph: use raw_object_store when closing

The close_commit_graph() method took a repository struct, but then
only uses the raw_object_store within. Change the function prototype
to make the method more flexible.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: extract write_commit_graph_file()
Derrick Stolee [Wed, 12 Jun 2019 13:29:45 +0000 (06:29 -0700)] 
commit-graph: extract write_commit_graph_file()

The write_commit_graph() method is too complex, so we are
extracting helper functions one by one.

Extract write_commit_graph_file() that takes all of the information
in the context struct and writes the data to a commit-graph file.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: extract copy_oids_to_commits()
Derrick Stolee [Wed, 12 Jun 2019 13:29:44 +0000 (06:29 -0700)] 
commit-graph: extract copy_oids_to_commits()

The write_commit_graph() method is too complex, so we are
extracting helper functions one by one.

Extract copy_oids_to_commits(), which fills the commits list
with the distinct commits from the oids list. During this loop,
it also counts the number of "extra" edges from octopus merges.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: extract count_distinct_commits()
Derrick Stolee [Wed, 12 Jun 2019 13:29:43 +0000 (06:29 -0700)] 
commit-graph: extract count_distinct_commits()

The write_commit_graph() method is too complex, so we are
extracting helper functions one by one.

Extract count_distinct_commits(), which sorts the oids list, then
iterates through to find duplicates.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: extract fill_oids_from_all_packs()
Derrick Stolee [Wed, 12 Jun 2019 13:29:42 +0000 (06:29 -0700)] 
commit-graph: extract fill_oids_from_all_packs()

The write_commit_graph() method is too complex, so we are
extracting helper functions one by one.

Extract fill_oids_from_all_packs() that reads all pack-files
for commits and fills the oid list in the context.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: extract fill_oids_from_commit_hex()
Derrick Stolee [Wed, 12 Jun 2019 13:29:42 +0000 (06:29 -0700)] 
commit-graph: extract fill_oids_from_commit_hex()

The write_commit_graph() method is too complex, so we are
extracting helper functions one by one.

Extract fill_oids_from_commit_hex() that reads the given commit
id list and fille the oid list in the context.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: extract fill_oids_from_packs()
Derrick Stolee [Wed, 12 Jun 2019 13:29:41 +0000 (06:29 -0700)] 
commit-graph: extract fill_oids_from_packs()

The write_commit_graph() method is too complex, so we are
extracting helper functions one by one.

This extracts fill_oids_from_packs() that reads the given
pack-file list and fills the oid list in the context.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: create write_commit_graph_context
Derrick Stolee [Wed, 12 Jun 2019 13:29:40 +0000 (06:29 -0700)] 
commit-graph: create write_commit_graph_context

The write_commit_graph() method is too large and complex. To simplify
it, we should extract several helper functions. However, we will risk
repeating a lot of declarations related to progress incidators and
object id or commit lists.

Create a new write_commit_graph_context struct that contains the
core data structures used in this process. Replace the other local
variables with the values inside the context object. Following this
change, we will start to lift code segments wholesale out of the
write_commit_graph() method and into helper functions.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: remove Future Work section
Derrick Stolee [Wed, 12 Jun 2019 13:29:39 +0000 (06:29 -0700)] 
commit-graph: remove Future Work section

The commit-graph feature began with a long list of planned
benefits, most of which are now complete. The future work
section has only a few items left.

As for making more algorithms aware of generation numbers,
some are only waiting for generation number v2 to ensure the
performance matches the existing behavior using commit date.

It is unlikely that we will ever send a commit-graph file
as part of the protocol, since we would need to verify the
data, and that is expensive. If we want to start trusting
remote content, then that item can be investigated again.

While there is more work to be done on the feature, having
a section of the docs devoted to a TODO list is wasteful and
hard to keep up-to-date.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: collapse parameters into flags
Derrick Stolee [Wed, 12 Jun 2019 13:29:38 +0000 (06:29 -0700)] 
commit-graph: collapse parameters into flags

The write_commit_graph() and write_commit_graph_reachable() methods
currently take two boolean parameters: 'append' and 'report_progress'.
As we update these methods, adding more parameters this way becomes
cluttered and hard to maintain.

Collapse these parameters into a 'flags' parameter, and adjust the
callers to provide flags as necessary.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: return with errors during write
Derrick Stolee [Wed, 12 Jun 2019 13:29:37 +0000 (06:29 -0700)] 
commit-graph: return with errors during write

The write_commit_graph() method uses die() to report failure and
exit when confronted with an unexpected condition. This use of
die() in a library function is incorrect and is now replaced by
error() statements and an int return type. Return zero on success
and a negative value on failure.

Now that we use 'goto cleanup' to jump to the terminal condition
on an error, we have new paths that could lead to uninitialized
values. New initializers are added to correct for this.

The builtins 'commit-graph', 'gc', and 'commit' call these methods,
so update them to check the return value. Test that 'git commit-graph
write' returns a proper error code when hitting a failure condition
in write_commit_graph().

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocompletion: do not cache if --git-completion-helper fails
Nguyễn Thái Ngọc Duy [Wed, 12 Jun 2019 08:56:06 +0000 (15:56 +0700)] 
completion: do not cache if --git-completion-helper fails

"git <cmd> --git-completion-helper" could fail if the command checks for
a repo before parse_options(). If the result is cached, later on when
the user moves to a worktree with repo, tab completion will still fail.

Avoid this by detecting errors and not cache the completion output. We
can try again and hopefully succeed next time (e.g. when a repo is
found).

Of course if --git-completion-helper fails permanently because of other
reasons (*), this will slow down completion. But I don't see any better
option to handle that case.

(*) one of those cases is if __gitcomp_builtin is called on a command
  that does not support --git-completion-helper. And we do have a
  generic call

    __git_complete_common "$command"

  but this case is protected with __git_support_parseopt_helper so we're
  good.

Reported-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot5616: cover case of client having delta base
Jonathan Tan [Tue, 11 Jun 2019 21:06:47 +0000 (14:06 -0700)] 
t5616: cover case of client having delta base

When fetching into a partial clone, Git first prefetches missing
REF_DELTA bases from the promisor remote. (This feature was introduced
in [1].) But as can be seen in a recent test coverage report [2], the
case in which a REF_DELTA base is already present is not covered by
tests.

Extend the tests slightly to cover this case.

[1] 8a30a1efd1 ("index-pack: prefetch missing REF_DELTA bases",
2019-05-15).
[2] https://public-inbox.org/git/396091fc-5572-19a5-4f18-61c258590dd5@gmail.com/

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot5616: use correct flag to check object is missing
Jonathan Tan [Tue, 11 Jun 2019 21:06:46 +0000 (14:06 -0700)] 
t5616: use correct flag to check object is missing

If we want to check whether an object is missing, the correct flag to
pass to rev-list is --ignore-missing; --exclude-promisor-objects will
exclude any object that came from the promisor remote, whether it is
present or missing. Use the correct flag.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoGit 2.22 v2.22.0
Junio C Hamano [Fri, 7 Jun 2019 16:39:21 +0000 (09:39 -0700)] 
Git 2.22

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge tag 'l10n-2.22.0-rnd3' of git://github.com/git-l10n/git-po
Junio C Hamano [Fri, 7 Jun 2019 16:36:32 +0000 (09:36 -0700)] 
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
  ...

5 years agoMerge branch 'fr_review' of git://github.com/jnavila/git
Jiang Xin [Fri, 7 Jun 2019 08:51:09 +0000 (16:51 +0800)] 
Merge branch 'fr_review' of git://github.com/jnavila/git

* 'fr_review' of git://github.com/jnavila/git:
  l10n: fr.po: Review French translation

5 years agoMerge branch 'master' of git://github.com/alshopov/git-po
Jiang Xin [Fri, 7 Jun 2019 08:50:23 +0000 (16:50 +0800)] 
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)

5 years agol10n: fr.po: Review French translation
Cédric Malard [Wed, 5 Jun 2019 21:33:52 +0000 (23:33 +0200)] 
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>
5 years agoMerge branch 'en/merge-directory-renames-fix'
Junio C Hamano [Thu, 6 Jun 2019 21:03:36 +0000 (14:03 -0700)] 
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

5 years agoconfig/alias.txt: document alias accepting non-command first word
Denton Liu [Wed, 5 Jun 2019 20:10:13 +0000 (16:10 -0400)] 
config/alias.txt: document alias accepting non-command first word

One can see that an alias that begins with a non-command first word,
such as `loud-rebase = -c commit.verbose=true rebase`, is permitted.
However, this isn't immediately obvious to users as alias instances
typically begin with a command.

Document the fact that an alias can begin with a non-command first word
so that users will be able to discover that this is a feature.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoconfig/alias.txt: change " and ' to `
Denton Liu [Wed, 5 Jun 2019 20:10:11 +0000 (16:10 -0400)] 
config/alias.txt: change " and ' to `

Before, the documentation would mix " and ' for code and config
snippets. Change these instances to ` so that they are marked up in
monospace.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agol10n: de.po: Update German translation
Matthias Rüster [Sat, 1 Jun 2019 12:32:49 +0000 (14:32 +0200)] 
l10n: de.po: Update German translation

Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
5 years agol10n: de.po: improve description of 'git reset --quiet'
Ralf Thielow [Thu, 28 Feb 2019 18:25:51 +0000 (19:25 +0100)] 
l10n: de.po: improve description of 'git reset --quiet'

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
5 years agol10n: TEAMS: Change German translation team leader
Matthias Rüster [Sat, 1 Jun 2019 12:32:44 +0000 (14:32 +0200)] 
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>
5 years agomerge-recursive: restore accidentally dropped setting of path
Elijah Newren [Tue, 4 Jun 2019 20:27:50 +0000 (13:27 -0700)] 
merge-recursive: restore accidentally dropped setting of path

In commit 8daec1df03de ("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>
5 years agol10n: bg.po: Updated Bulgarian translation (4581t)
Alexander Shopov [Wed, 5 Jun 2019 06:51:15 +0000 (08:51 +0200)] 
l10n: bg.po: Updated Bulgarian translation (4581t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
5 years agol10n: zh_CN: Revision for git v2.22.0 l10n
Fangyi Zhou [Sun, 2 Jun 2019 21:41:45 +0000 (22:41 +0100)] 
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>
5 years agol10n: zh_CN: for git v2.22.0 l10n round 1~3
Jiang Xin [Tue, 16 Apr 2019 00:56:12 +0000 (08:56 +0800)] 
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>
5 years agoMerge branch '2.22' of https://github.com/ChrisADR/git-po
Jiang Xin [Wed, 5 Jun 2019 00:35:35 +0000 (08:35 +0800)] 
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

5 years agoMerge branch 'it-l10n-wip' of github.com:AlessandroMenti/git-po
Jiang Xin [Wed, 5 Jun 2019 00:17:28 +0000 (08:17 +0800)] 
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

5 years agol10n: es: 2.22.0 round 3
Christopher Diaz Riveros [Tue, 4 Jun 2019 23:52:28 +0000 (18:52 -0500)] 
l10n: es: 2.22.0 round 3

Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
5 years agoclang-format: use git grep to generate the ForEachMacros list
Miguel Ojeda [Mon, 3 Jun 2019 22:48:14 +0000 (00:48 +0200)] 
clang-format: use git grep to generate the ForEachMacros list

The ForEachMacros list can reasonably be generated grepping
the C source code for macros with 'for_each' in their name.

Taken almost verbatim from the .clang-format file in the Linux kernel.

Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agourl: do not allow %00 to represent NUL in URLs
Matthew DeVore [Tue, 4 Jun 2019 17:57:05 +0000 (10:57 -0700)] 
url: do not allow %00 to represent NUL in URLs

There is no reason to allow %00 to terminate a string, so do not allow it.
Otherwise, we end up returning arbitrary content in the string (that which is
after the %00) which is effectively hidden from callers and can escape sanity
checks and validation, and possible be used in tandem with a security
vulnerability to introduce a payload.

Helped-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agourl: do not read past end of buffer
Matthew DeVore [Tue, 4 Jun 2019 17:57:04 +0000 (10:57 -0700)] 
url: do not read past end of buffer

url_decode_internal could have been tricked into reading past the length
of the **query buffer if there are fewer than 2 characters after a % (in
a null-terminated string, % would have to be the last character).
Prevent this from happening by checking len before decoding the %
sequence.

Helped-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agogitignore.txt: make slash-rules more readable
Dr. Adam Nielsen [Tue, 4 Jun 2019 17:34:46 +0000 (19:34 +0200)] 
gitignore.txt: make slash-rules more readable

Renew paragraphs relevant for pattern with slash.
Aim to make it more clear and to avoid possible
pitfalls for the reader. Add some examples.

Signed-off-by: Dr. Adam Nielsen <admin@in-ici.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agol10n: it.po: Updated Italian translation
Alessandro Menti [Sun, 19 May 2019 06:51:55 +0000 (08:51 +0200)] 
l10n: it.po: Updated Italian translation

Signed-off-by: Alessandro Menti <alessandro.menti@alessandromenti.it>
5 years agofetch: fix regression with transport helpers
Felipe Contreras [Tue, 4 Jun 2019 02:13:30 +0000 (21:13 -0500)] 
fetch: fix regression with transport helpers

Commit e198b3a740 changed the behavior of fetch with regards to tags.
Before, null oids where not ignored, now they are, regardless of whether
the refs have been explicitly cleared or not.

  e198b3a740 (fetch: replace string-list used as a look-up table with a hashmap)

When using a transport helper the oids can certainly be null. So now
tags are ignored and fetching them is impossible.

This patch fixes that by having a specific flag that is set only when we
explicitly want to ignore the refs, restoring the original behavior.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agofetch: make the code more understandable
Felipe Contreras [Tue, 4 Jun 2019 02:13:29 +0000 (21:13 -0500)] 
fetch: make the code more understandable

The comment makes it seem as if the condition is the other way around.
The exception is when the oid is null, so check for that.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agofetch: trivial cleanup
Felipe Contreras [Tue, 4 Jun 2019 02:13:28 +0000 (21:13 -0500)] 
fetch: trivial cleanup

Create a helper function to clear an item. The way items are cleared has
changed, and will change again soon.

No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot5801 (remote-helpers): add test to fetch tags
Felipe Contreras [Tue, 4 Jun 2019 02:13:27 +0000 (21:13 -0500)] 
t5801 (remote-helpers): add test to fetch tags

This used to work, but commit e198b3a740 broke it.

  e198b3a740 (fetch: replace string-list used as a look-up table with a hashmap)

Probably all remote helpers that use the import method are affected, but
we didn't catch the issue.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot5801 (remote-helpers): cleanup refspec stuff
Felipe Contreras [Tue, 4 Jun 2019 02:13:26 +0000 (21:13 -0500)] 
t5801 (remote-helpers): cleanup refspec stuff

The code is much simpler this way, specially thanks to:

  git fast-export --refspec

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agol10n: fr v2.22.0 rnd 3
Jean-Noël Avila [Tue, 4 Jun 2019 17:53:32 +0000 (19:53 +0200)] 
l10n: fr v2.22.0 rnd 3

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
5 years agol10n: vi.po(4581t): Updated Vietnamese translation for v2.22.0 round 3
Tran Ngoc Quan [Tue, 4 Jun 2019 01:10:46 +0000 (08:10 +0700)] 
l10n: vi.po(4581t): Updated Vietnamese translation for v2.22.0 round 3

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
5 years agol10n: git.pot: v2.22.0 round 3 (3 new, 2 removed)
Jiang Xin [Tue, 4 Jun 2019 00:27:36 +0000 (08:27 +0800)] 
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>
5 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/git/git
Jiang Xin [Tue, 4 Jun 2019 00:24:28 +0000 (08:24 +0800)] 
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

5 years agoGit 2.22-rc3 v2.22.0-rc3
Junio C Hamano [Mon, 3 Jun 2019 18:25:12 +0000 (11:25 -0700)] 
Git 2.22-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'cc/list-objects-filter-wo-sparse-path'
Junio C Hamano [Mon, 3 Jun 2019 18:18:54 +0000 (11:18 -0700)] 
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

5 years agoi18n: fix typos found during l10n for git 2.22.0
Jiang Xin [Sun, 2 Jun 2019 15:11:22 +0000 (23:11 +0800)] 
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>
5 years agoRelNotes: minor typo fixes in 2.22.0 draft
Todd Zullinger [Sat, 1 Jun 2019 15:51:06 +0000 (11:51 -0400)] 
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>
5 years agol10n: es: 2.22.0 round 2
Christopher Diaz Riveros [Mon, 3 Jun 2019 14:34:50 +0000 (09:34 -0500)] 
l10n: es: 2.22.0 round 2

Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
5 years agoMerge branch 'master' of https://github.com/vnwildman/git
Jiang Xin [Sun, 2 Jun 2019 14:35:11 +0000 (22:35 +0800)] 
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

5 years agoMerge branch 'master' of git://github.com/alshopov/git-po
Jiang Xin [Sun, 2 Jun 2019 14:09:35 +0000 (22:09 +0800)] 
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)

5 years agol10n: bg.po: Updated Bulgarian translation (4580t)
Alexander Shopov [Sun, 2 Jun 2019 07:26:52 +0000 (09:26 +0200)] 
l10n: bg.po: Updated Bulgarian translation (4580t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
5 years agol10n: vi.po(4580t): Updated Vietnamese translation for v2.22.0 round 2
Tran Ngoc Quan [Sat, 1 Jun 2019 01:36:37 +0000 (08:36 +0700)] 
l10n: vi.po(4580t): Updated Vietnamese translation for v2.22.0 round 2

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
5 years agosend-email: update documentation of required Perl modules
Chris Mayo [Thu, 30 May 2019 18:39:10 +0000 (19:39 +0100)] 
send-email: update documentation of required Perl modules

Improve and complete the list of required email related Perl modules,
clarifying which are core Perl modules and remove Net::SMTP::SSL.

git-send-email uses the TLS support in the Net::SMTP core module from
recent versions of Perl. Documenting the minimum version is complex
because of separate numbering for Perl (5.21.5~169), Net:SMTP (2.34)
and libnet (3.01). Version numbers from commit:
bfbfc9a953 ("send-email: Net::SMTP::starttls was introduced in v2.34",
2017-05-31).

Users of older Perl versions without Net::SMTP::SSL installed will get a
clear error message.

Signed-off-by: Chris Mayo <aklhfex@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agolist-objects-filter: correct usage of ALLOC_GROW
Matthew DeVore [Fri, 31 May 2019 18:46:06 +0000 (11:46 -0700)] 
list-objects-filter: correct usage of ALLOC_GROW

In the sparse filter data, array_frame array is used in a way such that
nr is the index of the last element. Fix this so that nr is actually the
number of elements in the array.

The filter_sparse_free function also has an unaddressed TODO to free the
memory associated with the sparse filter data. Address that TODO and fix
the memory leak.

Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agol10n: fr.po v2.22.0 round 2
Jean-Noël Avila [Fri, 31 May 2019 08:46:21 +0000 (10:46 +0200)] 
l10n: fr.po v2.22.0 round 2

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
5 years agol10n: git.pot: v2.22.0 round 2 (6 new, 3 removed)
Jiang Xin [Fri, 31 May 2019 06:36:22 +0000 (14:36 +0800)] 
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>
5 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/git/git
Jiang Xin [Fri, 31 May 2019 06:34:26 +0000 (14:34 +0800)] 
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
  ...

5 years agoMerge branch 'master' of https://github.com/Softcatala/git-po
Jiang Xin [Fri, 31 May 2019 06:32:35 +0000 (14:32 +0800)] 
Merge branch 'master' of https://github.com/Softcatala/git-po

* 'master' of https://github.com/Softcatala/git-po:
  l10n: Update Catalan translation

5 years agoGit 2.22-rc2 v2.22.0-rc2
Junio C Hamano [Thu, 30 May 2019 17:56:29 +0000 (10:56 -0700)] 
Git 2.22-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'js/rebase-config-bitfix'
Junio C Hamano [Thu, 30 May 2019 17:50:47 +0000 (10:50 -0700)] 
Merge branch 'js/rebase-config-bitfix'

* js/rebase-config-bitfix:
  rebase: replace incorrect logical negation by correct bitwise one

5 years agoMerge branch 'es/doc-gitsubmodules-markup'
Junio C Hamano [Thu, 30 May 2019 17:50:46 +0000 (10:50 -0700)] 
Merge branch 'es/doc-gitsubmodules-markup'

Doc markup fix.

* es/doc-gitsubmodules-markup:
  gitsubmodules: align html and nroff lists

5 years agoMerge branch 'ja/diff-opt-typofix'
Junio C Hamano [Thu, 30 May 2019 17:50:46 +0000 (10:50 -0700)] 
Merge branch 'ja/diff-opt-typofix'

Typofix.

* ja/diff-opt-typofix:
  diff: fix mistake in translatable strings

5 years agoMerge branch 'jt/clone-server-option'
Junio C Hamano [Thu, 30 May 2019 17:50:46 +0000 (10:50 -0700)] 
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

5 years agoMerge branch 'sg/progress-off-by-one-fix'
Junio C Hamano [Thu, 30 May 2019 17:50:45 +0000 (10:50 -0700)] 
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

5 years agoMerge branch 'js/rebase-deprecate-preserve-merges'
Junio C Hamano [Thu, 30 May 2019 17:50:45 +0000 (10:50 -0700)] 
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`

5 years agoMerge branch 'sg/trace2-rename'
Junio C Hamano [Thu, 30 May 2019 17:50:45 +0000 (10:50 -0700)] 
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*

5 years agoMerge branch 'jh/trace2'
Junio C Hamano [Thu, 30 May 2019 17:50:44 +0000 (10:50 -0700)] 
Merge branch 'jh/trace2'

* jh/trace2:
  trace2: fix tracing when NO_PTHREADS is defined

5 years agoMerge branch 'nd/diff-parseopt'
Junio C Hamano [Thu, 30 May 2019 17:50:44 +0000 (10:50 -0700)] 
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