Carlo Marcelo Arenas Belón [Tue, 23 Jun 2020 18:42:22 +0000 (11:42 -0700)]
commit-reach: avoid is_descendant_of() shim
d91d6fbf26 (commit-reach: create repo_is_descendant_of(), 2020-06-17)
adds a repository aware version of is_descendant_of() and a backward
compatibility shim that is barely used.
Update all callers to directly use the new repo_is_descendant_of()
function instead; making the codebase simpler and pushing more
the_repository references higher up the stack.
Helped-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Derrick Stolee [Wed, 17 Jun 2020 17:24:29 +0000 (17:24 +0000)]
commit-reach: use fast logic in repo_in_merge_base
The repo_is_descendant_of() method is aware of the existence of the
commit-graph file. It checks for generation_numbers_enabled() before
deciding on using can_all_from_reach() or repo_in_merge_bases()
depending on the situation. The reason here is that can_all_from_reach()
uses a depth-first search that is limited by the minimum generation
number of the target commits, and that algorithm can be very slow when
generation numbers are not present. The alternative uses
paint_down_to_common() which will walk the entire merge-base boundary,
which is typically slower.
This method is used by commands like "git tag --contains" and "git
branch --contains" for very fast results when a commit-graph file
exists. Unfortunately, it is _not_ used in commands like "git merge-base
--is-ancestor" which is doing an even simpler request.
This issue was raised recently [1] with respect to a change to how
generation numbers are stored, but was also reported much earlier [2]
before commit-reach.c existed to simplify these reachability queries.
[1] https://lore.kernel.org/git/
20200607195347.GA8232@szeder.dev/
[2] https://lore.kernel.org/git/87608bawoa.fsf@evledraar.gmail.com/
The root cause is that builtin/merge-base.c has a method
handle_is_ancestor() that calls in_merge_bases(), an older version of
repo_in_merge_bases(). It would be better if we have every caller to
in_merge_bases() use the logic in can_all_from_reach() when possible.
This is where things get a little tricky: repo_is_descendant_of() calls
repo_in_merge_bases() in the non-generation numbers enabled case! If we
simply update repo_in_merge_bases() to call repo_is_descendant_of()
instead of repo_in_merge_bases_many(), then we will get a recursive call
loop. Thankfully, this is caught by the test suite in the default mode
(i.e. GIT_TEST_COMMIT_GRAPH=0).
The trick, then, is to make the non-generation number case for
repo_is_descendant_of() call repo_in_merge_bases_many() directly,
skipping the non-_many version. This allows us to take advantage of this
faster code path, when possible.
The easiest way to measure the performance impact is to test the
following command on the Linux kernel repository:
git merge-base --is-ancestor <A> <B>
| A | B | Time Before | Time After |
|------|------|-------------|------------|
| v3.0 | v5.7 | 0.459s | 0.028s |
| v4.0 | v5.7 | 0.267s | 0.021s |
| v5.0 | v5.7 | 0.074s | 0.013s |
Note that each of these samples return success. The old code performed
the same operation when <A> and <B> are swapped. However,
can_all_from_reach() will return immediately if the generation numbers
show that <A> has larger generation number than <B>. Thus, the time for
the swapped case is universally 0.004s in each case.
Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reported-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Derrick Stolee [Wed, 17 Jun 2020 17:24:28 +0000 (17:24 +0000)]
commit-reach: create repo_is_descendant_of()
The next change will make repo_in_merge_bases() depend on the logic in
is_descendant_of(), but we need to make the method independent of
the_repository first.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 12 Jun 2020 20:57:13 +0000 (13:57 -0700)]
Merge branch 'hn/refs-cleanup'
Preliminary clean-ups around refs API, plus file format
specification documentation for the reftable backend.
* hn/refs-cleanup:
reftable: define version 2 of the spec to accomodate SHA256
reftable: clarify how empty tables should be written
reftable: file format documentation
refs: improve documentation for ref iterator
t: use update-ref and show-ref to reading/writing refs
refs.h: clarify reflog iteration order
Han-Wen Nienhuys [Wed, 20 May 2020 17:36:12 +0000 (17:36 +0000)]
reftable: define version 2 of the spec to accomodate SHA256
Version appends a hash ID to the file header, making it slightly larger.
This commit also changes "SHA-1" into "object ID" in many places.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Wed, 20 May 2020 17:36:11 +0000 (17:36 +0000)]
reftable: clarify how empty tables should be written
The format allows for some ambiguity, as a lone footer also starts
with a valid file header. However, the current JGit code will barf on
this. This commit codifies this behavior into the standard.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder [Wed, 20 May 2020 17:36:10 +0000 (17:36 +0000)]
reftable: file format documentation
Shawn Pearce explains:
Some repositories contain a lot of references (e.g. android at 866k,
rails at 31k). The reftable format provides:
- Near constant time lookup for any single reference, even when the
repository is cold and not in process or kernel cache.
- Near constant time verification if a SHA-1 is referred to by at least
one reference (for allow-tip-sha1-in-want).
- Efficient lookup of an entire namespace, such as `refs/tags/`.
- Support atomic push `O(size_of_update)` operations.
- Combine reflog storage with ref storage.
This file format spec was originally written in July, 2017 by Shawn
Pearce. Some refinements since then were made by Shawn and by Han-Wen
Nienhuys based on experiences implementing and experimenting with the
format. (All of this was in the context of our work at Google and
Google is happy to contribute the result to the Git project.)
Imported from JGit[1]'s current version (
c217d33ff,
"Documentation/technical/reftable: improve repo layout", 2020-02-04)
of Documentation/technical/reftable.md and converted to asciidoc by
running
pandoc -t asciidoc -f markdown reftable.md >reftable.txt
using pandoc 2.2.1. The result required the following additional
minor changes:
- removed the [TOC] directive to add a table of contents, since
asciidoc does not support it
- replaced git-scm.com/docs links with linkgit: directives that link
to other pages within Git's documentation
[1] https://eclipse.googlesource.com/jgit/jgit
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 9 Jun 2020 00:50:01 +0000 (17:50 -0700)]
The second batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 9 Jun 2020 01:06:32 +0000 (18:06 -0700)]
Merge branch 'jt/curl-verbose-on-trace-curl'
Rewrite support for GIT_CURL_VERBOSE in terms of GIT_TRACE_CURL.
Looking good.
* jt/curl-verbose-on-trace-curl:
http, imap-send: stop using CURLOPT_VERBOSE
t5551: test that GIT_TRACE_CURL redacts password
Junio C Hamano [Tue, 9 Jun 2020 01:06:32 +0000 (18:06 -0700)]
Merge branch 'cc/upload-pack-data'
Code clean-up.
* cc/upload-pack-data:
upload-pack: use upload_pack_data fields in receive_needs()
upload-pack: pass upload_pack_data to create_pack_file()
upload-pack: remove static variable 'stateless_rpc'
upload-pack: pass upload_pack_data to check_non_tip()
upload-pack: pass upload_pack_data to send_ref()
upload-pack: move symref to upload_pack_data
upload-pack: use upload_pack_data writer in receive_needs()
upload-pack: pass upload_pack_data to receive_needs()
upload-pack: pass upload_pack_data to get_common_commits()
upload-pack: use 'struct upload_pack_data' in upload_pack()
upload-pack: move 'struct upload_pack_data' around
upload-pack: move {want,have}_obj to upload_pack_data
upload-pack: remove unused 'wants' from upload_pack_data
Junio C Hamano [Tue, 9 Jun 2020 01:06:31 +0000 (18:06 -0700)]
Merge branch 'cb/bisect-helper-parser-fix'
The code to parse "git bisect start" command line was lax in
validating the arguments.
* cb/bisect-helper-parser-fix:
bisect--helper: avoid segfault with bad syntax in `start --term-*`
Junio C Hamano [Tue, 9 Jun 2020 01:06:31 +0000 (18:06 -0700)]
Merge branch 'js/checkout-p-new-file'
"git checkout -p" did not handle a newly added path at all.
* js/checkout-p-new-file:
checkout -p: handle new files correctly
Junio C Hamano [Tue, 9 Jun 2020 01:06:30 +0000 (18:06 -0700)]
Merge branch 'dl/remote-curl-deadlock-fix'
On-the-wire protocol v2 easily falls into a deadlock between the
remote-curl helper and the fetch-pack process when the server side
prematurely throws an error and disconnects. The communication has
been updated to make it more robust.
* dl/remote-curl-deadlock-fix:
stateless-connect: send response end packet
pkt-line: define PACKET_READ_RESPONSE_END
remote-curl: error on incomplete packet
pkt-line: extern packet_length()
transport: extract common fetch_pack() call
remote-curl: remove label indentation
remote-curl: fix typo
Junio C Hamano [Tue, 9 Jun 2020 01:06:30 +0000 (18:06 -0700)]
Merge branch 'bc/filter-process'
Code simplification and test coverage enhancement.
* bc/filter-process:
t2060: add a test for switch with --orphan and --discard-changes
builtin/checkout: simplify metadata initialization
Junio C Hamano [Tue, 9 Jun 2020 01:06:29 +0000 (18:06 -0700)]
Merge branch 'vs/complete-stash-show-p-fix'
The command line completion script (in contrib/) tried to complete
"git stash -p" as if it were "git stash push -p", but it was too
aggressive and also affected "git stash show -p", which has been
corrected.
* vs/complete-stash-show-p-fix:
completion: don't override given stash subcommand with -p
Junio C Hamano [Tue, 9 Jun 2020 01:06:28 +0000 (18:06 -0700)]
Merge branch 'rs/fsck-duplicate-names-in-trees'
The check in "git fsck" to ensure that the tree objects are sorted
still had corner cases it missed unsorted entries.
* rs/fsck-duplicate-names-in-trees:
fsck: detect more in-tree d/f conflicts
t1450: demonstrate undetected in-tree d/f conflict
t1450: increase test coverage of in-tree d/f detection
fsck: fix a typo in a comment
Junio C Hamano [Tue, 9 Jun 2020 01:06:28 +0000 (18:06 -0700)]
Merge branch 'es/bugreport-shell'
"git bugreport" learns to report what shell is in use.
* es/bugreport-shell:
bugreport: include user interactive shell
help: add shell-path to --build-options
Junio C Hamano [Tue, 9 Jun 2020 01:06:27 +0000 (18:06 -0700)]
Merge branch 'tb/commit-graph-no-check-oids'
Clean-up the commit-graph codepath.
* tb/commit-graph-no-check-oids:
commit-graph: drop COMMIT_GRAPH_WRITE_CHECK_OIDS flag
t5318: reorder test below 'graph_read_expect'
commit-graph.c: simplify 'fill_oids_from_commits'
builtin/commit-graph.c: dereference tags in builtin
builtin/commit-graph.c: extract 'read_one_commit()'
commit-graph.c: peel refs in 'add_ref_to_set'
commit-graph.c: show progress of finding reachable commits
commit-graph.c: extract 'refs_cb_data'
Junio C Hamano [Tue, 9 Jun 2020 01:06:27 +0000 (18:06 -0700)]
Merge branch 'cb/t4210-illseq-auto-detect'
As FreeBSD is not the only platform whose regexp library reports
a REG_ILLSEQ error when fed invalid UTF-8, add logic to detect that
automatically and skip the affected tests.
* cb/t4210-illseq-auto-detect:
t4210: detect REG_ILLSEQ dynamically and skip affected tests
t/helper: teach test-regex to report pattern errors (like REG_ILLSEQ)
Junio C Hamano [Tue, 9 Jun 2020 01:06:26 +0000 (18:06 -0700)]
Merge branch 'ds/line-log-on-bloom'
"git log -L..." now takes advantage of the "which paths are touched
by this commit?" info stored in the commit-graph system.
* ds/line-log-on-bloom:
line-log: integrate with changed-path Bloom filters
line-log: try to use generation number-based topo-ordering
line-log: more responsive, incremental 'git log -L'
t4211-line-log: add tests for parent oids
line-log: remove unused fields from 'struct line_log_data'
Junio C Hamano [Tue, 2 Jun 2020 20:34:13 +0000 (13:34 -0700)]
Start the post 2.27 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 2 Jun 2020 20:35:05 +0000 (13:35 -0700)]
Merge branch 'en/fast-import-looser-date'
Some repositories in the wild have commits that record nonsense
committer timezone (e.g. rails.git); "git fast-import" learned an
option to pass these nonsense timestamps intact to allow recreating
existing repositories as-is.
* en/fast-import-looser-date:
fast-import: add new --date-format=raw-permissive format
Junio C Hamano [Tue, 2 Jun 2020 20:35:04 +0000 (13:35 -0700)]
Merge branch 'mt/zsh-completion-optim'
Command line completion (incontrib/) update.
* mt/zsh-completion-optim:
completion: use native ZSH array pattern matching
Junio C Hamano [Tue, 2 Jun 2020 20:35:04 +0000 (13:35 -0700)]
Merge branch 'la/diff-relative-config'
The commands in the "diff" family learned to honor "diff.relative"
configuration variable.
* la/diff-relative-config:
diff: add config option relative
Junio C Hamano [Tue, 2 Jun 2020 20:35:04 +0000 (13:35 -0700)]
Merge branch 'rs/checkout-b-track-error'
The error message from "git checkout -b foo -t bar baz" was
confusing.
* rs/checkout-b-track-error:
checkout: improve error messages for -b with extra argument
checkout: add tests for -b and --track
Junio C Hamano [Tue, 2 Jun 2020 20:35:03 +0000 (13:35 -0700)]
Merge branch 'lo/sparse-universal-zero-init'
We've adopted a convention that any on-stack structure can be
initialized to have zero values in all fields with "= { 0 }", even
when the first field happens to be a pointer, but sparse complained
that a null pointer should be spelled NULL for a long time. Start
using -Wno-universal-initializer option to squelch it.
* lo/sparse-universal-zero-init:
sparse: allow '{ 0 }' to be used without warnings
Junio C Hamano [Tue, 2 Jun 2020 20:35:03 +0000 (13:35 -0700)]
Merge branch 'cb/t5608-cleanup'
Test fixup.
* cb/t5608-cleanup:
t5608: avoid say() and use "skip_all" instead for consistency
Junio C Hamano [Tue, 2 Jun 2020 20:35:02 +0000 (13:35 -0700)]
Merge branch 'jx/pkt-line-doc-count-fix'
Docfix.
* jx/pkt-line-doc-count-fix:
doc: fix wrong 4-byte length of pkt-line message
Junio C Hamano [Tue, 2 Jun 2020 20:35:01 +0000 (13:35 -0700)]
Merge branch 'jn/experimental-opts-into-proto-v2'
"feature.experimental" configuration variable is to let volunteers
easily opt into a set of newer features, which use of the v2
transport protocol is now a part of.
* jn/experimental-opts-into-proto-v2:
config: let feature.experimental imply protocol.version=2
Junio C Hamano [Tue, 2 Jun 2020 20:35:01 +0000 (13:35 -0700)]
Merge branch 'bk/p4-prepare-p4-only-fix'
The "--prepare-p4-only" option is supposed to stop after replaying
one changeset, but kept going (by mistake?)
* bk/p4-prepare-p4-only-fix:
git-p4.py: fix --prepare-p4-only error with multiple commits
Junio C Hamano [Tue, 2 Jun 2020 20:35:01 +0000 (13:35 -0700)]
Merge branch 'an/merge-single-strategy-optim'
Code optimization for a common case.
* an/merge-single-strategy-optim:
merge: optimization to skip evaluate_result for single strategy
Junio C Hamano [Mon, 1 Jun 2020 06:03:57 +0000 (23:03 -0700)]
Git 2.27
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 31 May 2020 18:38:44 +0000 (11:38 -0700)]
Merge branch 'cb/test-use-ere-for-alternation'
Portability fix for tests added recently.
* cb/test-use-ere-for-alternation:
t: avoid alternation (not POSIX) in grep's BRE
Junio C Hamano [Sun, 31 May 2020 18:14:07 +0000 (11:14 -0700)]
Merge tag 'l10n-2.27.0-rnd2' of git://github.com/git-l10n/git-po
l10n-2.27.0-rnd2
* tag 'l10n-2.27.0-rnd2' of git://github.com/git-l10n/git-po: (23 commits)
l10n: zh_TW.po: v2.27.0 round 2 (0 untranslated)
l10n: zh_TW.po: v2.27.0 round 1 (0 untranslated)
l10n: de.po: Fix typo in the German translation of octopus
l10n: de.po: Update German translation for Git 2.27.0
l10n: it.po: update for Git 2.27.0 round #2
l10n: tr: v2.27.0 round 2
l10n: fr.po v2.27.0 rnd 2
l10n: bg.po: Updated Bulgarian translation (4875t)
l10n: Update Catalan translation
l10n: sv.po: Update Swedish translation (4875t0f0u)
l10n: vi(4875t): Updated Vietnamses translation for 2.27.0rd2
l10n: zh_CN: for git v2.27.0 l10n round 1~2
l10n: git.pot: v2.27.0 round 2 (+1)
l10n: Update Catalan translation
l10n: vi(4874t): Updated Vietnamses translation for 2.27.0
l10n: es: 2.27.0 round 1
l10n: bg.po: Updated Bulgarian translation (4868t)
l10n: fr v2.27.0 rnd 1
l10n: sv.po: Update Swedish translation (4839t0f0u)
l10n: tr: v2.27.0 round 1
...
Elijah Newren [Sat, 30 May 2020 20:25:57 +0000 (20:25 +0000)]
fast-import: add new --date-format=raw-permissive format
There are multiple repositories in the wild with random, invalid
timezones. Most notably is a commit from rails.git with a timezone of
"+051800"[1]. A few searches will find other repos with that same
invalid timezone as well. Further, Peff reports that GitHub relaxed
their fsck checks in August 2011 to accept any timezone value[2], and
there have been multiple reports to filter-repo about fast-import
crashing while trying to import their existing repositories since they
had timezone values such as "-
7349423" and "-
43455309"[3].
The existing check on timezone values inside fast-import may prove
useful for people who are crafting fast-import input by hand or with a
new script. For them, the check may help them avoid accidentally
recording invalid dates. (Note that this check is rather simplistic and
there are still several forms of invalid dates that fast-import does not
check for: dates in the future, timezone values with minutes that are
not divisible by 15, and timezone values with minutes that are 60 or
greater.) While this simple check may have some value for those users,
other users or tools will want to import existing repositories as-is.
Provide a --date-format=raw-permissive format that will not error out on
these otherwise invalid timezones so that such existing repositories can
be imported.
[1] https://github.com/rails/rails/commit/
4cf94979c9f4d6683c9338d694d5eb3106a4e734
[2] https://lore.kernel.org/git/
20200521195513.GA1542632@coredump.intra.peff.net/
[3] https://github.com/newren/git-filter-repo/issues/88
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jiang Xin [Sat, 30 May 2020 03:26:53 +0000 (11:26 +0800)]
Merge branch 'master' of github.com:ruester/git-po-de
* 'master' of github.com:ruester/git-po-de:
l10n: de.po: Fix typo in the German translation of octopus
l10n: de.po: Update German translation for Git 2.27.0
Jiang Xin [Sat, 30 May 2020 03:25:17 +0000 (11:25 +0800)]
Merge branch of github.com:AlessandroMenti/git-po
* 'update-italian-translation' of github.com:AlessandroMenti/git-po:
l10n: it.po: update for Git 2.27.0 round #2
Junio C Hamano [Fri, 29 May 2020 22:12:20 +0000 (15:12 -0700)]
Merge branch 'bc/sha-256-part-1-of-4'
Docfix.
* bc/sha-256-part-1-of-4:
Documentation: correct hash environment variable
Junio C Hamano [Fri, 29 May 2020 22:12:19 +0000 (15:12 -0700)]
Merge branch 'ma/rev-list-options-docfix'
Docfix.
* ma/rev-list-options-docfix:
rev-list-options.txt: start a list for `show-pulls`
Junio C Hamano [Fri, 29 May 2020 22:12:19 +0000 (15:12 -0700)]
Merge branch 'jk/ci-only-on-selected-branches'
Dev support.
* jk/ci-only-on-selected-branches:
ci/config: correct instruction for CI preferences
Carlo Marcelo Arenas Belón [Fri, 29 May 2020 08:20:08 +0000 (01:20 -0700)]
t: avoid alternation (not POSIX) in grep's BRE
f1e3df3169 (t: increase test coverage of signature verification output,
2020-03-04) adds GPG dependent tests to t4202 and t6200 that were found
problematic with at least OpenBSD 6.7.
Using an escaped '|' for alternations works only in some implementations
of grep (e.g. GNU and busybox).
It is not part of POSIX[1] and not supported by some BSD, macOS, and
possibly other POSIX compatible implementations.
Use `grep -E`, and write it using extended regular expression.
[1] https://pubs.opengroup.org/onlinepubs/
9699919799/basedefs/V1_chap09.html#tag_09_03
Helped-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Yi-Jyun Pan [Fri, 29 May 2020 16:37:53 +0000 (00:37 +0800)]
l10n: zh_TW.po: v2.27.0 round 2 (0 untranslated)
Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
Yi-Jyun Pan [Sat, 23 May 2020 13:26:15 +0000 (21:26 +0800)]
l10n: zh_TW.po: v2.27.0 round 1 (0 untranslated)
Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
Jan Engelhardt [Tue, 31 Mar 2020 20:37:26 +0000 (22:37 +0200)]
l10n: de.po: Fix typo in the German translation of octopus
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
Matthias Rüster [Sun, 24 May 2020 11:27:46 +0000 (13:27 +0200)]
l10n: de.po: Update German translation for Git 2.27.0
Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
Marco Trevisan (Treviño) [Tue, 26 May 2020 19:13:17 +0000 (19:13 +0000)]
completion: use native ZSH array pattern matching
When clearing the builtin operations on re-sourcing in the ZSH case we
can use the native ${parameters} associative array keys values to get
the currently `__gitcomp_builtin_*` operations using pattern matching
instead of using sed.
As also stated in commit
94408dc7, introducing this change the usage of
sed has some overhead implications, while ZSH can do this check just
using its native syntax.
Signed-off-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alessandro Menti [Wed, 27 May 2020 16:22:22 +0000 (18:22 +0200)]
l10n: it.po: update for Git 2.27.0 round #2
Signed-off-by: Alessandro Menti <alessandro.menti@alessandromenti.it>
Jiang Xin [Thu, 28 May 2020 02:46:04 +0000 (10:46 +0800)]
Merge branch 'fr_2.27.0rnd2' of github.com:jnavila/git
* 'fr_2.27.0rnd2' of github.com:jnavila/git:
l10n: fr.po v2.27.0 rnd 2
Jiang Xin [Thu, 28 May 2020 02:45:33 +0000 (10:45 +0800)]
Merge branch 'master' of github.com:bitigchi/git-po
* 'master' of github.com:bitigchi/git-po:
l10n: tr: v2.27.0 round 2
Jiang Xin [Thu, 28 May 2020 02:45:11 +0000 (10:45 +0800)]
Merge branch 'master' of github.com:alshopov/git-po
* 'master' of github.com:alshopov/git-po:
l10n: bg.po: Updated Bulgarian translation (4875t)
Jiang Xin [Thu, 28 May 2020 02:44:21 +0000 (10:44 +0800)]
Merge branch 'master' of github.com:Softcatala/git-po
* 'master' of github.com:Softcatala/git-po:
l10n: Update Catalan translation
Johannes Schindelin [Wed, 27 May 2020 21:09:06 +0000 (21:09 +0000)]
checkout -p: handle new files correctly
The original patch selection code was written for `git add -p`, and the
fundamental unit on which it works is a hunk.
We hacked around that to handle deletions back in
24ab81ae4d
(add-interactive: handle deletion of empty files, 2009-10-27). But `git
add -p` would never see a new file, since we only consider the set of
tracked files in the index.
However, since the same machinery was used for `git checkout -p` &
friends, we can see new files.
Handle this case specifically, adding a new prompt for it that is
modeled after the `deleted file` case.
This also fixes the problem where added _empty_ files could not be
staged via `git checkout -p`.
Reported-by: Merlin Büge <toni@bluenox07.de>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Toon Claes [Tue, 26 May 2020 18:37:20 +0000 (20:37 +0200)]
Documentation: correct hash environment variable
To set the default hash algorithm you can set the `GIT_DEFAULT_HASH`
environment variable. In the documentation this variable is named
`GIT_DEFAULT_HASH_ALGORITHM`, which is incorrect.
Signed-off-by: Toon Claes <toon@iotcl.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Emir Sarı [Wed, 27 May 2020 09:48:41 +0000 (12:48 +0300)]
l10n: tr: v2.27.0 round 2
Signed-off-by: Emir Sarı <bitigchi@me.com>
Jean-Noël Avila [Wed, 27 May 2020 09:18:48 +0000 (11:18 +0200)]
l10n: fr.po v2.27.0 rnd 2
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Alexander Shopov [Wed, 27 May 2020 07:44:12 +0000 (09:44 +0200)]
l10n: bg.po: Updated Bulgarian translation (4875t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Jordi Mas [Wed, 27 May 2020 06:59:48 +0000 (08:59 +0200)]
l10n: Update Catalan translation
Signed-off-by: Jordi Mas <jmas@softcatala.org>
Peter Krefting [Wed, 27 May 2020 06:41:28 +0000 (07:41 +0100)]
l10n: sv.po: Update Swedish translation (4875t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Tran Ngoc Quan [Wed, 27 May 2020 01:07:58 +0000 (08:07 +0700)]
l10n: vi(4875t): Updated Vietnamses translation for 2.27.0rd2
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
Jiang Xin [Sun, 11 Mar 2018 00:53:35 +0000 (08:53 +0800)]
l10n: zh_CN: for git v2.27.0 l10n round 1~2
Translate 73 new messages (4875t0f0u) for git 2.27.0.
Reviewed-by: 依云 <lilydjwg@gmail.com>
Reviewed-by: Fangyi Zhou <me@fangyi.io>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jiang Xin [Tue, 26 May 2020 23:24:01 +0000 (07:24 +0800)]
l10n: git.pot: v2.27.0 round 2 (+1)
Generate po/git.pot from v2.27.0-rc2 for git v2.27.0 l10n round 2.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jiang Xin [Tue, 26 May 2020 23:22:26 +0000 (07:22 +0800)]
Merge branch 'master' of github.com:git-l10n/git-po
* 'master' of github.com:git-l10n/git-po:
l10n: Update Catalan translation
l10n: vi(4874t): Updated Vietnamses translation for 2.27.0
l10n: es: 2.27.0 round 1
l10n: bg.po: Updated Bulgarian translation (4868t)
l10n: fr v2.27.0 rnd 1
l10n: sv.po: Update Swedish translation (4839t0f0u)
l10n: tr: v2.27.0 round 1
l10n: it.po: update the Italian translation for Git 2.27.0 round 1
l10n: git.pot: v2.27.0 round 1 (72 new, 37 removed)
l10n: Update Catalan translation
Junio C Hamano [Tue, 26 May 2020 16:38:13 +0000 (09:38 -0700)]
Git 2.27-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 26 May 2020 16:32:08 +0000 (09:32 -0700)]
Merge branch 'ss/faq-ignore'
Doc markup fix.
* ss/faq-ignore:
gitfaq: avoid validation error with older asciidoc
Martin Ågren [Mon, 25 May 2020 17:06:07 +0000 (19:06 +0200)]
rev-list-options.txt: start a list for `show-pulls`
The explanation of the `--show-pulls` option added in commit
8d049e182e
("revision: --show-pulls adds helpful merges", 2020-04-10) consists of
several paragraphs and we use "+" throughout to tie them together in one
long chain of list continuations. Only thing is, we're not in any kind
of list, so these pluses end up being rendered literally.
The preceding few paragraphs describe `--ancestry-path` and there we
*do* have a list, since we've started one with `--ancestry-path::`. In
fact, we have several such lists for all the various history-simplifying
options we're discussing earlier in this file.
Thus, we're missing a list both from a consistency point of view and
from a practical rendering standpoint.
Let's start a list for `--show-pulls` where we start actually discussing
the option, and keep the paragraphs preceding it out of that list. That
is, drop all those pluses before the new list we're adding here.
Helped-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Todd Zullinger [Tue, 19 May 2020 04:53:01 +0000 (00:53 -0400)]
gitfaq: avoid validation error with older asciidoc
When building with asciidoc-8.4.5 (as found on CentOS/Red Hat 6), the
period in the "[[files-in-.gitignore-are-tracked]]" anchor is not
properly parsed as a section:
WARNING: gitfaq.txt: line 245: missing [[files-in-.gitignore-are-tracked]] section
The resulting XML file fails to validate with xmlto:
xmlto: /git/Documentation/gitfaq.xml does not validate (status 3)
xmlto: Fix document syntax or use --skip-validation option
/git/Documentation/gitfaq.xml:3: element refentry: validity error :
Element refentry content does not follow the DTD, expecting
(beginpage? , indexterm* , refentryinfo? , refmeta? , (remark | link
| olink | ulink)* , refnamediv+ , refsynopsisdiv? , (refsect1+ |
refsection+)), got (refmeta refnamediv refsynopsisdiv refsect1
refsect1 refsect1 refsect1 variablelist refsect1 refsect1 )
Document /git/Documentation/gitfaq.xml does not validate
Let's avoid breaking users of platforms which ship an old version of
asciidoc, since the cost to do so is quite low.
Reported-by: Son Luong Ngoc <sluongng@gmail.com>
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 25 May 2020 01:13:53 +0000 (18:13 -0700)]
Hopefully final batch before 2.27-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 25 May 2020 02:39:40 +0000 (19:39 -0700)]
Merge branch 'dd/t5703-grep-a-fix'
Update an unconditional use of "grep -a" with a perl script in a test.
* dd/t5703-grep-a-fix:
t5703: replace "grep -a" usage by perl
Junio C Hamano [Mon, 25 May 2020 02:39:39 +0000 (19:39 -0700)]
Merge branch 'ds/multi-pack-verify'
Fix for a copy-and-paste error introduced during 2.20 era.
* ds/multi-pack-verify:
fsck: use ERROR_MULTI_PACK_INDEX
Junio C Hamano [Mon, 25 May 2020 02:39:38 +0000 (19:39 -0700)]
Merge branch 'ma/doc-fixes'
Various doc fixes.
* ma/doc-fixes:
git-sparse-checkout.txt: add missing '
git-credential.txt: use list continuation
git-commit-graph.txt: fix list rendering
git-commit-graph.txt: fix grammo
date-formats.txt: fix list continuation
Junio C Hamano [Mon, 25 May 2020 02:39:38 +0000 (19:39 -0700)]
Merge branch 'cb/bisect-replay-with-dos-fix'
Re-fix longstanding "edited bisect log may confuse bisect replay
with trailing carriage-return" issue.
* cb/bisect-replay-with-dos-fix:
bisect: avoid tailing CR characters from revision in replay
Junio C Hamano [Mon, 25 May 2020 02:39:38 +0000 (19:39 -0700)]
Merge branch 'gs/commit-graph-path-filter'
Test fix.
* gs/commit-graph-path-filter:
t4216: avoid unnecessary subshell in test_bloom_filters_not_used
Junio C Hamano [Mon, 25 May 2020 02:39:37 +0000 (19:39 -0700)]
Merge branch 'dl/merge-autostash'
Test fix.
* dl/merge-autostash:
t5520: avoid alternation in grep's BRE (not POSIX)
Junio C Hamano [Mon, 25 May 2020 02:39:36 +0000 (19:39 -0700)]
Merge branch 'bc/faq'
"git help guides" now includes the newly added FAQ document.
* bc/faq:
command-list.txt: add gitfaq to the list of guides
Junio C Hamano [Mon, 25 May 2020 02:39:35 +0000 (19:39 -0700)]
Merge branch 'jt/avoid-prefetch-when-able-in-diff'
Test-coverage enhancement.
* jt/avoid-prefetch-when-able-in-diff:
t4067: make rename detection test output raw diff
Junio C Hamano [Mon, 25 May 2020 02:39:35 +0000 (19:39 -0700)]
Merge branch 'gp/hppa-stack-test-fix'
Platform dependent tweak to a test for HP-PA.
* gp/hppa-stack-test-fix:
tests: skip small-stack tests on hppa architecture
Luc Van Oostenryck [Fri, 22 May 2020 00:25:02 +0000 (02:25 +0200)]
sparse: allow '{ 0 }' to be used without warnings
In standard C, '{ 0 }' can be used as an universal zero-initializer.
However, Sparse complains if this is used on a type where the first
member (possibly nested) is a pointer since Sparse purposely wants
to warn when '0' is used to initialize a pointer type.
Legitimaly, it's desirable to be able to use '{ 0 }' as an idiom
without these warnings [1,2]. To allow this, an option have now
been added to Sparse:
537e3e2dae univ-init: conditionally accept { 0 } without warnings
So, add this option to the SPARSE_FLAGS variable.
Note: The option have just been added to Sparse. So, to benefit
now from this patch it's needed to use the latest Sparse
source from kernel.org. The option will simply be ignored
by older versions of Sparse.
[1] https://lore.kernel.org/r/
e6796c60-a870-e761-3b07-
b680f934c537@ramsayjones.plus.com
[2] https://lore.kernel.org/r/xmqqd07xem9l.fsf@gitster.c.googlers.com
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 19 May 2020 10:54:00 +0000 (06:54 -0400)]
stateless-connect: send response end packet
Currently, remote-curl acts as a proxy and blindly forwards packets
between an HTTP server and fetch-pack. In the case of a stateless RPC
connection where the connection is terminated before the transaction is
complete, remote-curl will blindly forward the packets before waiting on
more input from fetch-pack. Meanwhile, fetch-pack will read the
transaction and continue reading, expecting more input to continue the
transaction. This results in a deadlock between the two processes.
This can be seen in the following command which does not terminate:
$ git -c protocol.version=2 clone https://github.com/git/git.git --shallow-since=
20151012
Cloning into 'git'...
whereas the v1 version does terminate as expected:
$ git -c protocol.version=1 clone https://github.com/git/git.git --shallow-since=
20151012
Cloning into 'git'...
fatal: the remote end hung up unexpectedly
Instead of blindly forwarding packets, make remote-curl insert a
response end packet after proxying the responses from the remote server
when using stateless_connect(). On the RPC client side, ensure that each
response ends as described.
A separate control packet is chosen because we need to be able to
differentiate between what the remote server sends and remote-curl's
control packets. By ensuring in the remote-curl code that a server
cannot send response end packets, we prevent a malicious server from
being able to perform a denial of service attack in which they spoof a
response end packet and cause the described deadlock to happen.
Reported-by: Force Charlie <charlieio@outlook.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 19 May 2020 10:53:59 +0000 (06:53 -0400)]
pkt-line: define PACKET_READ_RESPONSE_END
In a future commit, we will use PACKET_READ_RESPONSE_END to separate
messages proxied by remote-curl. To prepare for this, add the
PACKET_READ_RESPONSE_END enum value.
In switch statements that need a case added, die() or BUG() when a
PACKET_READ_RESPONSE_END is unexpected. Otherwise, mirror how
PACKET_READ_DELIM is implemented (especially in cases where packets are
being forwarded).
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 19 May 2020 10:53:58 +0000 (06:53 -0400)]
remote-curl: error on incomplete packet
Currently, remote-curl acts as a proxy and blindly forwards packets
between an HTTP server and fetch-pack. In the case of a stateless RPC
connection where the connection is terminated with a partially written
packet, remote-curl will blindly send the partially written packet
before waiting on more input from fetch-pack. Meanwhile, fetch-pack will
read the partial packet and continue reading, expecting more input. This
results in a deadlock between the two processes.
For a stateless connection, inspect packets before sending them and
error out if a packet line packet is incomplete.
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Laurent Arnoud [Fri, 22 May 2020 10:46:18 +0000 (12:46 +0200)]
diff: add config option relative
The `diff.relative` boolean option set to `true` shows only changes in
the current directory/value specified by the `path` argument of the
`relative` option and shows pathnames relative to the aforementioned
directory.
Teach `--no-relative` to override earlier `--relative`
Add for git-format-patch(1) options documentation `--relative` and
`--no-relative`
Signed-off-by: Laurent Arnoud <laurent@spkdev.net>
Acked-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Carlo Marcelo Arenas Belón [Fri, 22 May 2020 18:42:14 +0000 (11:42 -0700)]
t5608: avoid say() and use "skip_all" instead for consistency
Printing a message directly to stdout could affect TAP processing
and is not really needed, as there is a standard way to skip all
tests that could be used instead, while printing an equivalent
message.
While at it; update the message to better reflect that since
a85efb5985 (t5608-clone-2gb.sh: turn GIT_TEST_CLONE_2GB into a bool,
2019-11-22), the enabling variable should be a recognized boolean
(ex: true, false, 1, 0) and get rid of the prerequisite that used
to guard all the tests, since "skip_all" is just much faster and
idempotent.
Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Sun, 24 May 2020 07:23:00 +0000 (09:23 +0200)]
checkout: improve error messages for -b with extra argument
When we try to create a branch "foo" based on "origin/master" and give
git commit -b an extra unsupported argument "bar", it confusingly
reports:
$ git checkout -b foo origin/master bar
fatal: 'bar' is not a commit and a branch 'foo' cannot be created from it
$ git checkout --track -b foo origin/master bar
fatal: 'bar' is not a commit and a branch 'foo' cannot be created from it
That's wrong, because it very well understands that "origin/master" is
supposed to be the start point for the new branch and not "bar". Check
if we got a commit and show more fitting messages in that case instead:
$ git checkout -b foo origin/master bar
fatal: Cannot update paths and switch to branch 'foo' at the same time.
$ git checkout --track -b foo origin/master bar
fatal: '--track' cannot be used with updating paths
Original-patch-by: Jeff King <peff@peff.net>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Sun, 24 May 2020 07:22:51 +0000 (09:22 +0200)]
checkout: add tests for -b and --track
Test git checkout -b with and without --track and demonstrate unexpected
error messages when it's given an extra (i.e. unsupported) path
argument. In both cases it reports:
$ git checkout -b foo origin/master bar
fatal: 'bar' is not a commit and a branch 'foo' cannot be created from it
The problem is that the start point we gave for the new branch is
"origin/master" and "bar" is just some extra argument -- it could even
be a valid commit, which would make the message even more confusing. We
have more fitting error messages in git commit, but get confused; use
the text of the rights ones in the tests.
Reported-by: Dana Dahlstrom <dahlstrom@google.com>
Original-test-by: Jeff King <peff@peff.net>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Carlo Marcelo Arenas Belón [Wed, 20 May 2020 23:26:27 +0000 (16:26 -0700)]
bisect--helper: avoid segfault with bad syntax in `start --term-*`
06f5608c14 (bisect--helper: `bisect_start` shell function partially in C,
2019-01-02) adds a lax parser for `git bisect start` which could result
in a segfault under a bad syntax call for start with custom terms.
Detect if there are enough arguments left in the command line to use for
--term-{old,good,new,bad} and abort with the same syntax error the original
implementation will show if not.
While at it, remove an unnecessary (and incomplete) check for unknown
arguments and make sure to add a test to avoid regressions.
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Acked-by: Christian Couder <christian.couder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jordi Mas [Fri, 22 May 2020 05:59:22 +0000 (07:59 +0200)]
l10n: Update Catalan translation
Signed-off-by: Jordi Mas <jmas@softcatala.org>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>