]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
6 years agocompletion: don't override given stash subcommand with -p
Ville Skyttä [Thu, 21 May 2020 18:35:59 +0000 (21:35 +0300)] 
completion: don't override given stash subcommand with -p

df70b190 (completion: make stash -p and alias for stash push -p,
2018-04-20) wanted to make sure "git stash -p <TAB>" offers the same
completion as "git stash push -p <TAB>", but it did so by forcing the
$subcommand to be "push" whenever then "-p" option is found on the
command line.

This harms any subcommand that can take the "-p" option---even when the
subcommand is explicitly given, e.g. "git stash show -p", the code added
by the change would overwrite the $subcommand the user gave us.

Fix it by making sure that the defaulting to "push" happens only when
there is no $subcommand given yet.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoMerge https://github.com/prati0100/git-gui
Junio C Hamano [Thu, 21 May 2020 18:15:04 +0000 (11:15 -0700)] 
Merge https://github.com/prati0100/git-gui

* https://github.com/prati0100/git-gui:
  git-gui: Handle Ctrl + BS/Del in the commit msg
  Subject: git-gui: fix syntax error because of missing semicolon

6 years agofsck: detect more in-tree d/f conflicts
René Scharfe [Thu, 21 May 2020 09:52:54 +0000 (11:52 +0200)] 
fsck: detect more in-tree d/f conflicts

If the conflict candidate file name from the top of the stack is not a
prefix of the current candiate directory then we can discard it as no
matching directory can come up later.  But we are not done checking the
candidate directory -- the stack might still hold a matching file name,
so stay in the loop and check the next candidate file name.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot1450: demonstrate undetected in-tree d/f conflict
René Scharfe [Thu, 21 May 2020 09:52:43 +0000 (11:52 +0200)] 
t1450: demonstrate undetected in-tree d/f conflict

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot1450: increase test coverage of in-tree d/f detection
René Scharfe [Thu, 21 May 2020 09:52:28 +0000 (11:52 +0200)] 
t1450: increase test coverage of in-tree d/f detection

Exercise the case of putting a conflict candidate file name back on the
stack because a matching directory might yet come up later.

Do that by factoring out the test code into a function to allow for more
concise notation in the form of parameters indicating names of trees
(with trailing slash) and blobs (without trailing slash) in no
particular order (they are sorted by git mktree).  Then add the new test
case as a second function call.

Fix a typo in the test title while at it ("dublicate").

Reported-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agofsck: fix a typo in a comment
René Scharfe [Thu, 21 May 2020 09:52:04 +0000 (11:52 +0200)] 
fsck: fix a typo in a comment

Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agodoc: fix wrong 4-byte length of pkt-line message
Jiuyang Xie [Thu, 21 May 2020 11:32:38 +0000 (19:32 +0800)] 
doc: fix wrong 4-byte length of pkt-line message

The first four bytes of the line, the pkt-len, indicates the total
length of the pkt-line in hexadecimal. Fix wrong pkt-len headers of
some pkt-line messages in `http-protocol.txt` and `pack-protocol.txt`.

Reviewed-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Jiuyang Xie <jiuyang.xjy@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot2060: add a test for switch with --orphan and --discard-changes
brian m. carlson [Thu, 21 May 2020 02:07:12 +0000 (02:07 +0000)] 
t2060: add a test for switch with --orphan and --discard-changes

We have several code paths in the checkout code which are traversed only
in this case, due to switch having different defaults from checkout.
Let's add a test that the combination of options works and produces the
expected behavior.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agobuiltin/checkout: simplify metadata initialization
brian m. carlson [Thu, 21 May 2020 02:07:11 +0000 (02:07 +0000)] 
builtin/checkout: simplify metadata initialization

When we call init_checkout_metadata in reset_tree, we want to pass the
object ID of the commit in question so that it can be passed to filters,
or if there is no commit, the tree.  We anticipated this latter case,
which can occur elsewhere in the checkout code, but it cannot occur
here.  The only case in which we do not have a commit object is when
invoking git switch with --orphan.  Moreover, we can only hit this code
path without a commit object additionally with either --force or
--discard-changes.

In such a case, there is no point initializing the checkout metadata
with a commit or tree because (a) there is no commit, only the empty
tree, and (b) we will never use the data, since no files will be smudged
when checking out a branch with no files.  Pass the all-zeros object ID
in this case, since we just need some value which is a valid pointer.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoconfig: let feature.experimental imply protocol.version=2
Jonathan Nieder [Thu, 21 May 2020 02:15:33 +0000 (19:15 -0700)] 
config: let feature.experimental imply protocol.version=2

Git 2.26 used protocol v2 as its default protocol, but soon after
release, users noticed that the protocol v2 negotiation code was prone
to fail when fetching from some remotes that are far ahead of others
(such as linux-next.git versus Linus's linux.git).  That has been
fixed by 0b07eecf6ed (Merge branch 'jt/v2-fetch-nego-fix',
2020-05-01), but to be cautious, we are using protocol v0 as the
default in 2.27 to buy some time for any other unanticipated issues to
surface.

To that end, let's ensure that users requesting the bleeding edge
using the feature.experimental flag *do* get protocol v2.  This way,
we can gain experience with a wider audience for the new protocol
version and be more confident when it is time to enable it by default
for all users in some future Git version.

Implementation note: this isn't with the rest of the
feature.experimental options in repo-settings.c because those are tied
to a repository object, whereas this code path is used for operations
like "git ls-remote" that do not require a repository.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoMerge branch 'il/ctrl-bs-del'
Pratyush Yadav [Thu, 21 May 2020 12:55:32 +0000 (18:25 +0530)] 
Merge branch 'il/ctrl-bs-del'

Allow deleting words backwards and forwards using Ctrl + Backspace and
Delete in the commit message buffer.

* il/ctrl-bs-del:
  git-gui: Handle Ctrl + BS/Del in the commit msg

6 years agol10n: vi(4874t): Updated Vietnamses translation for 2.27.0
Tran Ngoc Quan [Thu, 21 May 2020 01:22:14 +0000 (08:22 +0700)] 
l10n: vi(4874t): Updated Vietnamses translation for 2.27.0

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
6 years agorefs: improve documentation for ref iterator
Han-Wen Nienhuys [Wed, 20 May 2020 17:36:09 +0000 (17:36 +0000)] 
refs: improve documentation for ref iterator

Document some of the flag options in refs_ref_iterator_begin, and explain how
ref_iterator_advance_fn should handle them.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot: use update-ref and show-ref to reading/writing refs
Han-Wen Nienhuys [Wed, 20 May 2020 17:36:08 +0000 (17:36 +0000)] 
t: use update-ref and show-ref to reading/writing refs

Reading and writing .git/refs/* assumes that refs are stored in the 'files'
ref backend.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agorefs.h: clarify reflog iteration order
Han-Wen Nienhuys [Wed, 20 May 2020 17:36:07 +0000 (17:36 +0000)] 
refs.h: clarify reflog iteration order

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agobisect: avoid tailing CR characters from revision in replay
Carlo Marcelo Arenas Belón [Wed, 20 May 2020 17:08:43 +0000 (10:08 -0700)] 
bisect: avoid tailing CR characters from revision in replay

6c722cbe5a (bisect: allow CRLF line endings in "git bisect replay"
input, 2020-05-07) includes CR as a field separator, but relies on
it not being included in the last field, which breaks at least when
running under OpenBSD 6.7's sh.

Instead of just assume the CR will get swallowed, read the rest of
the line into an otherwise unused variable and ignore it everywhere
except on the call for git bisect start, where it matters.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agocommand-list.txt: add gitfaq to the list of guides
Philippe Blain [Wed, 20 May 2020 14:44:48 +0000 (14:44 +0000)] 
command-list.txt: add gitfaq to the list of guides

When 'gitfaq.txt' was added in 2149b6748f (docs: add a FAQ, 2020-03-30),
it was added to the Makefile but not to command-list.txt.

Add it there also, so that the new FAQ is listed in the output of
`git help --guides`.

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot5520: avoid alternation in grep's BRE (not POSIX)
Carlo Marcelo Arenas Belón [Wed, 20 May 2020 03:44:44 +0000 (20:44 -0700)] 
t5520: avoid alternation in grep's BRE (not POSIX)

Instead of using a BRE, that broke tests 30-32, 37-39, 42 at least with
OpenBSD 6.7; use a simpler ERE.

Fixes: d9f15d37f1 (pull: pass --autostash to merge, 2020-04-07)
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot4216: avoid unnecessary subshell in test_bloom_filters_not_used
Carlo Marcelo Arenas Belón [Wed, 20 May 2020 03:44:42 +0000 (20:44 -0700)] 
t4216: avoid unnecessary subshell in test_bloom_filters_not_used

Seems to trigger a bug in at least OpenBSD's 6.7 sh where it is
interpreted as a history lookup and therefore fails 125-126, 128,
130.

Remove the subshell and get a space between ! and grep, so tests
pass successfully.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoGit 2.27-rc1 v2.27.0-rc1
Junio C Hamano [Wed, 20 May 2020 15:33:55 +0000 (08:33 -0700)] 
Git 2.27-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoMerge branch 'es/bugreport'
Junio C Hamano [Wed, 20 May 2020 15:33:29 +0000 (08:33 -0700)] 
Merge branch 'es/bugreport'

Doc fix.

* es/bugreport:
  git-bugreport.txt: adjust reference to strftime(3)

6 years agoMerge branch 'ak/slab-decl-cleanup'
Junio C Hamano [Wed, 20 May 2020 15:33:29 +0000 (08:33 -0700)] 
Merge branch 'ak/slab-decl-cleanup'

Code clean-up.

* ak/slab-decl-cleanup:
  commit-slab-decl.h: update include guard

6 years agoMerge branch 'jc/fix-tap-output-under-bash'
Junio C Hamano [Wed, 20 May 2020 15:33:29 +0000 (08:33 -0700)] 
Merge branch 'jc/fix-tap-output-under-bash'

A recent attempt to make the test output nicer to view on CI
systems broke TAP output under bash.  The effort has been reverted
to be re-attempted in the next cycle.

* jc/fix-tap-output-under-bash:
  Revert "tests: when run in Bash, annotate test failures with file name/line number"
  Revert "ci: add a problem matcher for GitHub Actions"
  Revert "t/test_lib: avoid naked bash arrays in file_lineno"

6 years agoMerge branch 'en/sparse-checkout'
Junio C Hamano [Wed, 20 May 2020 15:33:29 +0000 (08:33 -0700)] 
Merge branch 'en/sparse-checkout'

Consistency fix to a topic already in 'master'.

* en/sparse-checkout:
  unpack-trees: also allow get_progress() to work on a different index

6 years agoMerge branch 'ds/trace-log-progress-fix'
Junio C Hamano [Wed, 20 May 2020 15:33:28 +0000 (08:33 -0700)] 
Merge branch 'ds/trace-log-progress-fix'

Last-minute fix for our recent change to allow use of progress API
as a traceable region.

* ds/trace-log-progress-fix:
  progress: call trace2_region_leave() only after calling _enter()

6 years agoMerge branch 'js/ci-sdk-download-fix'
Junio C Hamano [Wed, 20 May 2020 15:33:27 +0000 (08:33 -0700)] 
Merge branch 'js/ci-sdk-download-fix'

Instead of downloading Windows SDK for CI jobs for windows builds
from an external site (wingit.blob.core.windows.net), use the one
created in the windows-build job, to work around quota issues at
the external site.

* js/ci-sdk-download-fix:
  ci: avoid pounding on the poor ci-artifacts container

6 years agoMerge branch 'en/merge-rename-rename-worktree-fix'
Junio C Hamano [Wed, 20 May 2020 15:33:27 +0000 (08:33 -0700)] 
Merge branch 'en/merge-rename-rename-worktree-fix'

When a binary file gets modified and renamed on both sides of history
to different locations, both files would be written to the working
tree but both would have the contents from "ours".  This has been
corrected so that the path from each side gets their original content.

* en/merge-rename-rename-worktree-fix:
  merge-recursive: fix rename/rename(1to2) for working tree with a binary

6 years agoMerge branch 'cb/no-more-gmtime'
Junio C Hamano [Wed, 20 May 2020 15:33:27 +0000 (08:33 -0700)] 
Merge branch 'cb/no-more-gmtime'

Code clean-up by removing a compatibility implementation of a
function we no longer use.

* cb/no-more-gmtime:
  compat: remove gmtime

6 years agoMerge branch 'dd/t1509-i18n-fix'
Junio C Hamano [Wed, 20 May 2020 15:33:26 +0000 (08:33 -0700)] 
Merge branch 'dd/t1509-i18n-fix'

A few tests were not i18n clean.

* dd/t1509-i18n-fix:
  t1509: correct i18n test

6 years agoMerge branch 'next' of github.com:ChrisADR/git-po
Jiang Xin [Wed, 20 May 2020 00:07:30 +0000 (08:07 +0800)] 
Merge branch 'next' of github.com:ChrisADR/git-po

* 'next' of github.com:ChrisADR/git-po:
  l10n: es: 2.27.0 round 1

6 years agofsck: use ERROR_MULTI_PACK_INDEX
Derrick Stolee [Tue, 19 May 2020 19:48:45 +0000 (19:48 +0000)] 
fsck: use ERROR_MULTI_PACK_INDEX

The multi-pack-index was added to the data verified by git-fsck in
ea5ae6c3 "fsck: verify multi-pack-index". This implementation was
based on the implementation for verifying the commit-graph, and a
copy-paste error kept the ERROR_COMMIT_GRAPH flag as the bit set
when an error appears in the multi-pack-index.

Add a new flag, ERROR_MULTI_PACK_INDEX, and use that instead.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot4067: make rename detection test output raw diff
Jonathan Tan [Tue, 19 May 2020 18:31:51 +0000 (11:31 -0700)] 
t4067: make rename detection test output raw diff

95acf11a3d ("diff: restrict when prefetching occurs", 2020-04-07) taught
diff to prefetch blobs in a more limited set of situations. These
limited situations include when the output format requires blob data,
and when inexact rename detection is needed.

There is an existing test case that tests inexact rename detection, but
it also uses an output format that requires blob data, resulting in the
inexact-rename-detection-only code not being tested. Update this test to
use the raw output format, which does not require blob data.

Thanks to Derrick Stolee for noticing this lapse in code coverage and
for doing the preliminary analysis [1].

[1] https://lore.kernel.org/git/853759d3-97c3-241f-98e1-990883cd204e@gmail.com/

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agopkt-line: extern packet_length()
Denton Liu [Tue, 19 May 2020 10:53:57 +0000 (06:53 -0400)] 
pkt-line: extern packet_length()

In a future commit, we will be manually processing packets and we will
need to access the length header. In order to simplify this, extern
packet_length() so that the logic can be reused.

Change the function parameter from `const char *linelen` to
`const char lenbuf_hex[4]`. Even though these two types behave
identically as function parameters, use the array notation to
semantically indicate exactly what this function is expecting as an
argument. Also, rename it from linelen to lenbuf_hex as the former
sounds like it should be an integral type which is misleading.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agotransport: extract common fetch_pack() call
Denton Liu [Tue, 19 May 2020 10:53:56 +0000 (06:53 -0400)] 
transport: extract common fetch_pack() call

In the switch statement, the difference between the `protocol_v2` and
`protocol_v{1,0}` arms is a preparatory call to die_if_server_options() in
the latter. The fetch_pack() call is identical in both arms. However,
since this fetch_pack() call has so many parameters, it is not
immediately obvious that the call is identical in both cases.

Extract the common fetch_pack() call out of the switch statement so that
code duplication is reduced and the logic is more clear for future
readers. While we're at it, rewrite the switch statement as an if-else
tower for increased clarity.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agomerge: optimization to skip evaluate_result for single strategy
Andrew Ng [Tue, 19 May 2020 13:05:35 +0000 (14:05 +0100)] 
merge: optimization to skip evaluate_result for single strategy

For a merge with a single strategy, the result of evaluate_result() is
effectively not used and therefore is not needed, so avoid altogether.

On Windows, this optimization can halve the time required to perform a
recursive merge of a single commit with the LLVM repo.

Signed-off-by: Andrew Ng <andrew.ng@sony.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot5703: replace "grep -a" usage by perl
Đoàn Trần Công Danh [Tue, 19 May 2020 00:50:46 +0000 (07:50 +0700)] 
t5703: replace "grep -a" usage by perl

On some platforms likes HP-UX, grep(1) doesn't understand "-a".
Let's switch to perl.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agogit-sparse-checkout.txt: add missing '
Martin Ågren [Sun, 17 May 2020 18:52:21 +0000 (20:52 +0200)] 
git-sparse-checkout.txt: add missing '

Where we explain the 'reapply' command, we don't properly wrap it in
single quote marks like we do with the other commands: We omit the
closing mark ("'reapply") and this ends up being rendered literally as
"'reapply". Add the missing "'".

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agogit-credential.txt: use list continuation
Martin Ågren [Sun, 17 May 2020 18:52:20 +0000 (20:52 +0200)] 
git-credential.txt: use list continuation

Use list continuation to avoid the second and third paragraphs
rendering with a different indentation from the first one where we
describe the "url" attribute.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agogit-commit-graph.txt: fix list rendering
Martin Ågren [Sun, 17 May 2020 18:52:19 +0000 (20:52 +0200)] 
git-commit-graph.txt: fix list rendering

The first list item follows immediately on the paragraph where we
introduce the list. This makes the "*" render literally as part of one
huge paragraph. (With AsciiDoc, everything is fine after that, but with
Asciidoctor, we get some minor follow-on errors.) Add an empty line --
with a list continuation ("+") -- to make the first list item render ok.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agogit-commit-graph.txt: fix grammo
Martin Ågren [Sun, 17 May 2020 18:52:18 +0000 (20:52 +0200)] 
git-commit-graph.txt: fix grammo

It's easy to mix up the possessive "its" and "it's" ("it is"). Correct
an instance of this.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agodate-formats.txt: fix list continuation
Martin Ågren [Sun, 17 May 2020 18:52:16 +0000 (20:52 +0200)] 
date-formats.txt: fix list continuation

The blank line before the lone "+" means it isn't detected as a list
continuation, but instead renders literally, at least with AsciiDoc.
Drop the empty line and, while at it, add a closing period to the
preceding paragraph.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot4210: detect REG_ILLSEQ dynamically and skip affected tests
Carlo Marcelo Arenas Belón [Mon, 18 May 2020 18:44:16 +0000 (11:44 -0700)] 
t4210: detect REG_ILLSEQ dynamically and skip affected tests

7187c7bbb8 (t4210: skip i18n tests that don't work on FreeBSD, 2019-11-27)
adds a REG_ILLSEQ prerequisite, and to do that copies the common branch in
test-lib and expands it to include it in a special case for FreeBSD.

Instead; test for it using a previously added extension to test-tool and
use that, together with a function that identifies when regcomp/regexec
will be called with broken patterns to avoid any test that would otherwise
rely on undefined behaviour.

The description of the first test which wasn't accurate has been corrected,
and the test rearranged for clarity, including a helper function that avoids
overly long lines.

Only the affected engines will have their tests suppressed, also including
"fixed" if the PCRE optimization that uses LIBPCRE2 since b65abcafc7
(grep: use PCRE v2 for optimized fixed-string search, 2019-07-01) is not
available.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot/helper: teach test-regex to report pattern errors (like REG_ILLSEQ)
Carlo Marcelo Arenas Belón [Mon, 18 May 2020 18:44:15 +0000 (11:44 -0700)] 
t/helper: teach test-regex to report pattern errors (like REG_ILLSEQ)

7187c7bbb8 (t4210: skip i18n tests that don't work on FreeBSD, 2019-11-27)
adds a REG_ILLSEQ prerequisite to avoid failures from the tests added in
4e2443b181 (log tests: test regex backends in "--encode=<enc>" tests,
2019-06-28), but hardcodes it to be only enabled in FreeBSD.

Instead of hardcoding the affected platform, teach the test-regex helper,
how to validate a pattern and report back, so it can be used to detect the
same issue in other affected systems (like DragonFlyBSD or macOS).

While at it, refactor the tool so it can report back the source of the
errors it founds, and can be invoked also in a --silent mode, when needed,
for backward compatibility.  A missing flag has been added and the code
reformatted, as well as updates to the way the parameters are handled, for
consistency.

To minimize changes, it is assumed the regcomp error is of the right type
since we control the only caller, and is also assumed to affect both basic
and extended syntax (only basic is tested, but both behave the same in all
three affected platforms since they use the same function).

Based-on-patch-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoupload-pack: use upload_pack_data fields in receive_needs()
Christian Couder [Fri, 15 May 2020 10:04:54 +0000 (12:04 +0200)] 
upload-pack: use upload_pack_data fields in receive_needs()

As we cleanup 'upload-pack.c' by using 'struct upload_pack_data'
more thoroughly, let's use fields from this struct in
receive_needs(), instead of local variables with the same name
and purpose.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoupload-pack: pass upload_pack_data to create_pack_file()
Christian Couder [Fri, 15 May 2020 10:04:53 +0000 (12:04 +0200)] 
upload-pack: pass upload_pack_data to create_pack_file()

As we cleanup 'upload-pack.c' by using 'struct upload_pack_data'
more thoroughly, let's pass that struct to create_pack_file(),
so that this function, and the function it calls, can use all
the fields of the struct.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoupload-pack: remove static variable 'stateless_rpc'
Christian Couder [Fri, 15 May 2020 10:04:52 +0000 (12:04 +0200)] 
upload-pack: remove static variable 'stateless_rpc'

As we cleanup 'upload-pack.c' by using 'struct upload_pack_data'
more thoroughly, let's remove the 'stateless_rpc' static
variable, as we can now use the field of 'struct upload_pack_data'
with the same name instead.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoupload-pack: pass upload_pack_data to check_non_tip()
Christian Couder [Fri, 15 May 2020 10:04:51 +0000 (12:04 +0200)] 
upload-pack: pass upload_pack_data to check_non_tip()

As we cleanup 'upload-pack.c' by using 'struct upload_pack_data'
more thoroughly, let's pass that struct to check_non_tip(), so
that this function and the functions it calls, can use all the
fields of the struct in followup commits.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoupload-pack: pass upload_pack_data to send_ref()
Christian Couder [Fri, 15 May 2020 10:04:50 +0000 (12:04 +0200)] 
upload-pack: pass upload_pack_data to send_ref()

As we cleanup 'upload-pack.c' by using 'struct upload_pack_data'
more thoroughly, let's pass that struct to send_ref(), so that
this function, and the functions it calls, can use all the
fields of the struct in followup commits.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoupload-pack: move symref to upload_pack_data
Christian Couder [Fri, 15 May 2020 10:04:49 +0000 (12:04 +0200)] 
upload-pack: move symref to upload_pack_data

As we cleanup 'upload-pack.c' by using 'struct upload_pack_data'
more thoroughly, we are passing around that struct to many
functions, so let's also pass 'struct string_list symref' around
at the same time by moving it from a local variable in
upload_pack() into a field of 'struct upload_pack_data'.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoupload-pack: use upload_pack_data writer in receive_needs()
Christian Couder [Fri, 15 May 2020 10:04:48 +0000 (12:04 +0200)] 
upload-pack: use upload_pack_data writer in receive_needs()

As we cleanup 'upload-pack.c' by using 'struct upload_pack_data'
more thoroughly, let's use the 'struct packet_writer writer'
field from 'struct upload_pack_data' in receive_needs(),
instead of a local 'struct packet_writer writer' variable.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoupload-pack: pass upload_pack_data to receive_needs()
Christian Couder [Fri, 15 May 2020 10:04:47 +0000 (12:04 +0200)] 
upload-pack: pass upload_pack_data to receive_needs()

As we cleanup 'upload-pack.c' by using 'struct upload_pack_data'
more thoroughly, let's pass 'struct upload_pack_data' to
receive_needs(), so that this function and the functions it
calls can use all the fields of that struct in followup commits.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoupload-pack: pass upload_pack_data to get_common_commits()
Christian Couder [Fri, 15 May 2020 10:04:46 +0000 (12:04 +0200)] 
upload-pack: pass upload_pack_data to get_common_commits()

As we cleanup 'upload-pack.c' by using 'struct upload_pack_data'
more thoroughly, let's pass 'struct upload_pack_data' to
get_common_commits(), so that this function and the functions
it calls can use all the fields of that struct in followup
commits.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoupload-pack: use 'struct upload_pack_data' in upload_pack()
Christian Couder [Fri, 15 May 2020 10:04:45 +0000 (12:04 +0200)] 
upload-pack: use 'struct upload_pack_data' in upload_pack()

As we cleanup 'upload-pack.c' by using 'struct upload_pack_data'
more thoroughly, let's use 'struct upload_pack_data' in
upload_pack().

This will make it possible in followup commits to remove a lot
of static variables and local variables that have the same name
and purpose as fields in 'struct upload_pack_data'. This will
also make upload_pack() work in a more similar way as
upload_pack_v2().

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoupload-pack: move 'struct upload_pack_data' around
Christian Couder [Fri, 15 May 2020 10:04:44 +0000 (12:04 +0200)] 
upload-pack: move 'struct upload_pack_data' around

As we cleanup 'upload-pack.c' by using 'struct upload_pack_data'
more thoroughly, let's move 'struct upload_pack_data' and the
related upload_pack_data_init() and upload_pack_data_clear()
functions towards the beginning of the file, so that this struct
and its related functions can then be used by upload_pack() in a
followup commit.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoupload-pack: move {want,have}_obj to upload_pack_data
Christian Couder [Fri, 15 May 2020 10:04:43 +0000 (12:04 +0200)] 
upload-pack: move {want,have}_obj to upload_pack_data

As we cleanup 'upload-pack.c' by using 'struct upload_pack_data'
more thoroughly, let's move the want_obj and have_obj object
arrays into 'struct upload_pack_data'.

These object arrays are used by both upload_pack() and
upload_pack_v2(), for example when these functions call
create_pack_file(). We are going to use
'struct upload_pack_data' in upload_pack() in a followup
commit.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoupload-pack: remove unused 'wants' from upload_pack_data
Christian Couder [Fri, 15 May 2020 10:04:42 +0000 (12:04 +0200)] 
upload-pack: remove unused 'wants' from upload_pack_data

As we cleanup 'upload-pack.c' by using 'struct upload_pack_data'
more thoroughly, let's remove 'struct object_array wants' from
'struct upload_pack_data', as it appears to be unused.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agogit-bugreport.txt: adjust reference to strftime(3)
Todd Zullinger [Mon, 18 May 2020 19:37:36 +0000 (15:37 -0400)] 
git-bugreport.txt: adjust reference to strftime(3)

The strftime(3) man page is outside of the Git suite.  Refererence it as
we do other external man pages and avoid creating a broken link when
generating the HTML documentation.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agocommit-graph: drop COMMIT_GRAPH_WRITE_CHECK_OIDS flag
Taylor Blau [Wed, 13 May 2020 21:59:55 +0000 (15:59 -0600)] 
commit-graph: drop COMMIT_GRAPH_WRITE_CHECK_OIDS flag

Since 7c5c9b9c57 (commit-graph: error out on invalid commit oids in
'write --stdin-commits', 2019-08-05), the commit-graph builtin dies on
receiving non-commit OIDs as input to '--stdin-commits'.

This behavior can be cumbersome to work around in, say, the case of
piping 'git for-each-ref' to 'git commit-graph write --stdin-commits' if
the caller does not want to cull out non-commits themselves. In this
situation, it would be ideal if 'git commit-graph write' wrote the graph
containing the inputs that did pertain to commits, and silently ignored
the remainder of the input.

Some options have been proposed to the effect of '--[no-]check-oids'
which would allow callers to have the commit-graph builtin do just that.
After some discussion, it is difficult to imagine a caller who wouldn't
want to pass '--no-check-oids', suggesting that we should get rid of the
behavior of complaining about non-commit inputs altogether.

If callers do wish to retain this behavior, they can easily work around
this change by doing the following:

     git for-each-ref --format='%(objectname) %(objecttype) %(*objecttype)' |
     awk '
       !/commit/ { print "not-a-commit:"$1 }
        /commit/ { print $1 }
     ' |
     git commit-graph write --stdin-commits

To make it so that valid OIDs that refer to non-existent objects are
indeed an error after loosening the error handling, perform an extra
lookup to make sure that object indeed exists before sending it to the
commit-graph internals.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot5318: reorder test below 'graph_read_expect'
Taylor Blau [Wed, 13 May 2020 21:59:51 +0000 (15:59 -0600)] 
t5318: reorder test below 'graph_read_expect'

In the subsequent commit, we will introduce a dependency on
'graph_read_expect' from t5318.7. Preemptively move it below
'graph_read_expect()'s definition so that the test can call it.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agocommit-graph.c: simplify 'fill_oids_from_commits'
Taylor Blau [Wed, 13 May 2020 21:59:47 +0000 (15:59 -0600)] 
commit-graph.c: simplify 'fill_oids_from_commits'

In the previous handful of commits, both 'git commit-graph write
--reachable' and '--stdin-commits' learned to peel tags down to the
commits which they refer to before passing them into the commit-graph
internals.

This makes the call to 'lookup_commit_reference_gently()' inside of
'fill_oids_from_commits()' a noop, since all OIDs are commits by that
point.

As such, remove the call entirely, as well as the progress meter, which
has been split and moved out to the callers in the aforementioned
earlier commits.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agobuiltin/commit-graph.c: dereference tags in builtin
Taylor Blau [Wed, 13 May 2020 21:59:44 +0000 (15:59 -0600)] 
builtin/commit-graph.c: dereference tags in builtin

When given a list of commits, the commit-graph machinery calls
'lookup_commit_reference_gently()' on each element in the set and treats
the resulting set of OIDs as the base over which to close for
reachability.

In an earlier collection of commits, the 'git commit-graph write
--reachable' case made the inner-most call to
'lookup_commit_reference_gently()' by peeling references before they
were passed over to the commit-graph internals.

Do the analog for 'git commit-graph write --stdin-commits' by calling
'lookup_commit_reference_gently()' outside of the commit-graph
machinery, making the inner-most call a noop.

Since this may incur additional processing time, surround
'read_one_commit' with a progress meter to provide output to the caller.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agobuiltin/commit-graph.c: extract 'read_one_commit()'
Taylor Blau [Mon, 18 May 2020 19:27:09 +0000 (13:27 -0600)] 
builtin/commit-graph.c: extract 'read_one_commit()'

With either '--stdin-commits' or '--stdin-packs', the commit-graph
builtin will read line-delimited input, and interpret it either as a
series of commit OIDs, or pack names.

In a subsequent commit, we will begin handling '--stdin-commits'
differently by processing each line as it comes in, instead of in one
shot at the end. To make adequate room for this additional logic, split
the '--stdin-commits' case from '--stdin-packs' by only storing the
input when '--stdin-packs' is given.

In the case of '--stdin-commits', feed each line to a new
'read_one_commit' helper, which (for now) will merely call
'parse_oid_hex'.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoremote-curl: remove label indentation
Denton Liu [Mon, 18 May 2020 15:47:19 +0000 (11:47 -0400)] 
remote-curl: remove label indentation

In the codebase, labels are aligned to the leftmost column. Remove the
space-indentation from `free_specs:` to conform to this.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoremote-curl: fix typo
Denton Liu [Mon, 18 May 2020 15:47:18 +0000 (11:47 -0400)] 
remote-curl: fix typo

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agocommit-slab-decl.h: update include guard
Abhishek Kumar [Mon, 18 May 2020 14:30:23 +0000 (20:00 +0530)] 
commit-slab-decl.h: update include guard

When a9f1f1f9f8 ("commit-slab.h: code split", 2018-05-19) split
commit-slab.h into commit-slab-decl.h and commit-slab-impl.h header
files, commit-slab-decl.h were left to use "COMMIT_SLAB_HDR_H",
while commit-slab-impl.h gained its own macro, "COMMIT_SLAB_IMPL_H".

As these two files use different include guards, there is nothing
broken, but let's update commit-slab-decl.h to match the convention
to name the include guard after the filename.

Signed-off-by: Abhishek Kumar <abhishekkumar8222@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoci/config: correct instruction for CI preferences
Đoàn Trần Công Danh [Mon, 18 May 2020 14:52:34 +0000 (21:52 +0700)] 
ci/config: correct instruction for CI preferences

From e76eec3554 (ci: allow per-branch config for GitHub Actions,
2020-05-07), we started to allow contributors decide which branch
they want to build with GitHub Actions
by checking for a file named "ci/config/allow-ref".

In order to assist those contributors,
we provided a sample in "ci/config/allow-refs.sample",
and instructed them to drop the ".sample",
then commit that file to their repository.

We've misspelt the filename in that change.
Let's fix the spelling.

While we're at it, also instruct our contributors introduce that new
file to Git before commit, in case of they've never told Git before.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agotests: skip small-stack tests on hppa architecture
Greg Price [Sat, 16 May 2020 05:33:38 +0000 (22:33 -0700)] 
tests: skip small-stack tests on hppa architecture

On hppa these tests crash because the allocated stack space is too
small, even after it was doubled in b9a190789 (and the data size
doubled to match) to make it work on powerpc.  For this arch just
skip these tests, which is enough to make the whole suite pass.

Fixes: https://bugs.debian.org/757402
Based-on-patch-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Greg Price <gnprice@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoMerge branch 'master' of github.com:Softcatala/git-po
Jiang Xin [Mon, 18 May 2020 01:26:05 +0000 (09:26 +0800)] 
Merge branch 'master' of github.com:Softcatala/git-po

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

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
6 years agol10n: es: 2.27.0 round 1
Christopher Diaz Riveros [Sun, 17 May 2020 23:51:17 +0000 (18:51 -0500)] 
l10n: es: 2.27.0 round 1

Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
6 years agoMerge branch 'master' of github.com:alshopov/git-po into git-po-master
Jiang Xin [Sun, 17 May 2020 01:39:00 +0000 (09:39 +0800)] 
Merge branch 'master' of github.com:alshopov/git-po into git-po-master

* 'master' of github.com:alshopov/git-po:
  l10n: bg.po: Updated Bulgarian translation (4868t)

6 years agoMerge branch 'fr_2.27.0_rnd1' of github.com:jnavila/git
Jiang Xin [Sun, 17 May 2020 01:28:44 +0000 (09:28 +0800)] 
Merge branch 'fr_2.27.0_rnd1' of github.com:jnavila/git

* 'fr_2.27.0_rnd1' of github.com:jnavila/git:
  l10n: fr v2.27.0 rnd 1

6 years agol10n: bg.po: Updated Bulgarian translation (4868t)
Alexander Shopov [Sat, 16 May 2020 11:08:00 +0000 (13:08 +0200)] 
l10n: bg.po: Updated Bulgarian translation (4868t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
6 years agol10n: fr v2.27.0 rnd 1
Jean-Noël Avila [Sun, 29 Mar 2020 14:34:51 +0000 (16:34 +0200)] 
l10n: fr v2.27.0 rnd 1

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
6 years agoMerge branch 'git-2.27-round-1' of github.com:bitigchi/git-po
Jiang Xin [Sat, 16 May 2020 10:30:57 +0000 (18:30 +0800)] 
Merge branch 'git-2.27-round-1' of github.com:bitigchi/git-po

* 'git-2.27-round-1' of github.com:bitigchi/git-po:
  l10n: tr: v2.27.0 round 1

6 years agoMerge branch 'master' of github.com:nafmo/git-l10n-sv
Jiang Xin [Sat, 16 May 2020 10:28:21 +0000 (18:28 +0800)] 
Merge branch 'master' of github.com:nafmo/git-l10n-sv

* 'master' of github.com:nafmo/git-l10n-sv:
  l10n: sv.po: Update Swedish translation (4839t0f0u)

6 years agoRevert "tests: when run in Bash, annotate test failures with file name/line number"
Junio C Hamano [Fri, 15 May 2020 16:47:51 +0000 (09:47 -0700)] 
Revert "tests: when run in Bash, annotate test failures with file name/line number"

This reverts commit 662f9cf1548cf069cb819e9e95f224657015fcf9,
to fix the TAP output broken for bash.

6 years agoRevert "ci: add a problem matcher for GitHub Actions"
Junio C Hamano [Fri, 15 May 2020 17:24:02 +0000 (10:24 -0700)] 
Revert "ci: add a problem matcher for GitHub Actions"

This reverts commit 676eb0c1ce0d380478eb16bdc5a3f2a7bc01c1d2;
as we will be reverting the change to show these extra output
tokens under bash, the pattern would not match anything.

Helped-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoRevert "t/test_lib: avoid naked bash arrays in file_lineno"
Junio C Hamano [Fri, 15 May 2020 16:47:18 +0000 (09:47 -0700)] 
Revert "t/test_lib: avoid naked bash arrays in file_lineno"

This reverts commit 303775a25f0b4ac5d6ad2e96eb4404c24209cad8;
instead of trying to salvage the tap-breaking change, let's
revert the whole thing for now.

6 years agoprogress: call trace2_region_leave() only after calling _enter()
Derrick Stolee [Fri, 15 May 2020 16:09:28 +0000 (09:09 -0700)] 
progress: call trace2_region_leave() only after calling _enter()

A user of progress API calls start_progress() conditionally and
depends on the display_progress() and stop_progress() functions to
become no-op when start_progress() hasn't been called.

As we added a call to trace2_region_enter() to start_progress(), the
calls to other trace2 API calls from the progress API functions must
make sure that these trace2 calls are skipped when start_progress()
hasn't been called on the progress struct.  Specifically, do not
call trace2_region_leave() from stop_progress() when we haven't
called start_progress(), which would have called the matching
trace2_region_enter().

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoci: avoid pounding on the poor ci-artifacts container
Johannes Schindelin [Fri, 15 May 2020 07:55:18 +0000 (07:55 +0000)] 
ci: avoid pounding on the poor ci-artifacts container

When this developer tested how the git-sdk-64-minimal artifact could be
served to all the GitHub workflow runs that need it, Azure Blobs looked
like a pretty good choice: it is reliable, fast and we already use it in
Git for Windows to serve components like OpenSSL, cURL, etc

It came as an unpleasant surprise just _how many_ times this artifact
was downloaded. It exploded the bandwidth to a point where the free tier
would no longer be enough, threatening to block other, essential Git for
Windows services.

Let's switch back to using the Build Artifacts of our trusty Azure
Pipeline for the time being.

To avoid unnecessary hammering of the Azure Pipeline artifacts, we use
the GitHub Action `actions/upload-artifact` in the `windows-build` job
and the GitHub Action `actions/download-artifact` in the `windows-test`
and `vs-test` jobs (the latter now depends on `windows-build` for that
reason, too).

Helped-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agounpack-trees: also allow get_progress() to work on a different index
Elijah Newren [Thu, 14 May 2020 19:53:22 +0000 (19:53 +0000)] 
unpack-trees: also allow get_progress() to work on a different index

commit b0a5a12a60 ("unpack-trees: allow check_updates() to work on a
different index", 2020-03-27) allowed check_updates() to work on a
different index, but it called get_progress() which was hardcoded to
work on o->result much like check_updates() had been.  Update it to also
accept an index parameter and have check_updates() pass that parameter
along so that both are working on the same index.

Noticed-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agol10n: sv.po: Update Swedish translation (4839t0f0u)
Peter Krefting [Fri, 15 May 2020 11:21:42 +0000 (12:21 +0100)] 
l10n: sv.po: Update Swedish translation (4839t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
6 years agol10n: tr: v2.27.0 round 1
Emir Sarı [Fri, 15 May 2020 11:16:43 +0000 (14:16 +0300)] 
l10n: tr: v2.27.0 round 1

Signed-off-by: Emir Sarı <bitigchi@me.com>
6 years agol10n: it.po: update the Italian translation for Git 2.27.0 round 1
Alessandro Menti [Fri, 15 May 2020 05:51:36 +0000 (07:51 +0200)] 
l10n: it.po: update the Italian translation for Git 2.27.0 round 1

Signed-off-by: Alessandro Menti <alessandro.menti@alessandromenti.it>
6 years agol10n: git.pot: v2.27.0 round 1 (72 new, 37 removed)
Jiang Xin [Fri, 15 May 2020 01:12:03 +0000 (09:12 +0800)] 
l10n: git.pot: v2.27.0 round 1 (72 new, 37 removed)

Generate po/git.pot from v2.27.0-rc0 for git v2.27.0 l10n round 1.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
6 years agoGit 2.27-rc0 v2.27.0-rc0
Junio C Hamano [Thu, 14 May 2020 21:39:28 +0000 (14:39 -0700)] 
Git 2.27-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoMerge branch 'es/trace-log-progress'
Junio C Hamano [Thu, 14 May 2020 21:39:45 +0000 (14:39 -0700)] 
Merge branch 'es/trace-log-progress'

Teach codepaths that show progress meter to also use the
start_progress() and the stop_progress() calls as a "region" to be
traced.

* es/trace-log-progress:
  trace2: log progress time and throughput

6 years agoMerge branch 'jt/t5500-unflake'
Junio C Hamano [Thu, 14 May 2020 21:39:45 +0000 (14:39 -0700)] 
Merge branch 'jt/t5500-unflake'

Test fix for a topic already in 'master' and meant for 'maint'.

* jt/t5500-unflake:
  t5500: count objects through stderr, not trace

6 years agoMerge branch 'sn/midx-repack-with-config'
Junio C Hamano [Thu, 14 May 2020 21:39:44 +0000 (14:39 -0700)] 
Merge branch 'sn/midx-repack-with-config'

"git multi-pack-index repack" has been taught to honor some
repack.* configuration variables.

* sn/midx-repack-with-config:
  multi-pack-index: respect repack.packKeptObjects=false
  midx: teach "git multi-pack-index repack" honor "git repack" configurations

6 years agoMerge branch 'ds/bloom-cleanup'
Junio C Hamano [Thu, 14 May 2020 21:39:44 +0000 (14:39 -0700)] 
Merge branch 'ds/bloom-cleanup'

Code cleanup and typofixes

* ds/bloom-cleanup:
  completion: offer '--(no-)patch' among 'git log' options
  bloom: use num_changes not nr for limit detection
  bloom: de-duplicate directory entries
  Documentation: changed-path Bloom filters use byte words
  bloom: parse commit before computing filters
  test-bloom: fix usage typo
  bloom: fix whitespace around tab length

6 years agoMerge branch 'rs/fsck-duplicate-names-in-trees'
Junio C Hamano [Thu, 14 May 2020 21:39:43 +0000 (14:39 -0700)] 
Merge branch 'rs/fsck-duplicate-names-in-trees'

"git fsck" ensures that the paths recorded in tree objects are
sorted and without duplicates, but it failed to notice a case where
a blob is followed by entries that sort before a tree with the same
name.  This has been corrected.

* rs/fsck-duplicate-names-in-trees:
  fsck: report non-consecutive duplicate names in trees

6 years agoMerge branch 'ao/p4-d-f-conflict-recover'
Junio C Hamano [Thu, 14 May 2020 21:39:43 +0000 (14:39 -0700)] 
Merge branch 'ao/p4-d-f-conflict-recover'

"git p4" learned to recover from a (broken) state where a directory
and a file are recorded at the same path in the Perforce repository
the same way as their clients do.

* ao/p4-d-f-conflict-recover:
  git-p4: recover from inconsistent perforce history

6 years agoMerge branch 'js/rebase-autosquash-double-fixup-fix'
Junio C Hamano [Thu, 14 May 2020 21:39:43 +0000 (14:39 -0700)] 
Merge branch 'js/rebase-autosquash-double-fixup-fix'

"rebase -i" segfaulted when rearranging a sequence that has a
fix-up that applies another fix-up (which may or may not be a
fix-up of yet another step).

* js/rebase-autosquash-double-fixup-fix:
  rebase --autosquash: fix a potential segfault

6 years agoMerge branch 'jc/codingstyle-compare-with-null'
Junio C Hamano [Thu, 14 May 2020 21:39:42 +0000 (14:39 -0700)] 
Merge branch 'jc/codingstyle-compare-with-null'

Doc update.

* jc/codingstyle-compare-with-null:
  CodingGuidelines: do not ==/!= compare with 0 or '\0' or NULL

6 years agoMerge branch 'cw/bisect-replay-with-dos'
Junio C Hamano [Thu, 14 May 2020 21:39:41 +0000 (14:39 -0700)] 
Merge branch 'cw/bisect-replay-with-dos'

"git bisect replay" had trouble with input files when they used
CRLF line ending, which has been corrected.

* cw/bisect-replay-with-dos:
  bisect: allow CRLF line endings in "git bisect replay" input

6 years agoMerge branch 'es/bugreport-with-hooks'
Junio C Hamano [Thu, 14 May 2020 21:39:40 +0000 (14:39 -0700)] 
Merge branch 'es/bugreport-with-hooks'

"git bugreport" learned to report enabled hooks in the repository.

* es/bugreport-with-hooks:
  bugreport: collect list of populated hooks

6 years agocompat: remove gmtime
Carlo Marcelo Arenas Belón [Thu, 14 May 2020 19:18:54 +0000 (12:18 -0700)] 
compat: remove gmtime

ccd469450a (date.c: switch to reentrant {gm,local}time_r, 2019-11-28)
removes the only gmtime() call we had and moves to gmtime_r() which
doesn't have the same portability problems.

Remove the compat gmtime code since it is no longer needed, and confirm
by successfull running t4212 in FreeBSD 9.3 amd64 (the oldest I could
get a hold off).

Further work might be needed to ensure 32bit time_t systems (like FreeBSD
i386) will handle correctly the overflows tested in t4212, but that is
orthogonal to this change, and it doesn't change the current behaviour
as neither gmtime() or gmtime_r() will ever return NULL on those systems
because time_t is unsigned.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agomerge-recursive: fix rename/rename(1to2) for working tree with a binary
Elijah Newren [Wed, 13 May 2020 23:56:32 +0000 (23:56 +0000)] 
merge-recursive: fix rename/rename(1to2) for working tree with a binary

With a rename/rename(1to2) conflict, we attempt to do a three-way merge
of the file contents, so that the correct contents can be placed in the
working tree at both paths.  If the file is a binary, however, no
content merging is possible and we should just use the original version
of the file at each of the paths.

Reported-by: Chunlin Zhang <zhangchunlin@gmail.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoDocumentation: document v1 protocol object-format capability
brian m. carlson [Wed, 13 May 2020 00:53:42 +0000 (00:53 +0000)] 
Documentation: document v1 protocol object-format capability

Document a capability that indicates which hash algorithms are in use by
both sides of a remote connection.  Use the term "object-format", since
this is the term used for the repository extension as well.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agocommit-graph.c: peel refs in 'add_ref_to_set'
Taylor Blau [Wed, 13 May 2020 21:59:37 +0000 (15:59 -0600)] 
commit-graph.c: peel refs in 'add_ref_to_set'

While iterating references (to discover the set of commits to write to
the commit-graph with 'git commit-graph write --reachable'),
'add_ref_to_set' can save 'fill_oids_from_commits()' some time by
peeling the references beforehand.

Move peeling out of 'fill_oids_from_commits()' and into
'add_ref_to_set()' to use 'peel_ref()' instead of 'deref_tag()'. Doing
so allows the commit-graph machinery to use the peeled value from
'$GIT_DIR/packed-refs' instead of having to load and parse tags.

While we're at it, discard non-commit objects reachable from ref tips.
This would be done automatically by 'fill_oids_from_commits()', but such
functionality will be removed in a subsequent patch after the call to
'lookup_commit_reference_gently' is dropped (at which point a non-commit
object in the commits oidset will become an error).

Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>