1
0
mirror of https://github.com/git/git.git synced 2024-10-20 22:48:24 +02:00
Commit Graph

60009 Commits

Author SHA1 Message Date
Junio C Hamano
5d4e13f6df Merge branch 'en/typofixes' into master
* en/typofixes:
  hashmap: fix typo in usage docs
  Remove doubled words in various comments
2020-07-30 21:34:30 -07:00
Junio C Hamano
add0a35caa Merge branch 'rs/grep-simpler-parse-object-or-die-call' into master
* rs/grep-simpler-parse-object-or-die-call:
  grep: avoid using oid_to_hex() with parse_object_or_die()
2020-07-30 21:34:30 -07:00
Junio C Hamano
5942edb4ed Merge branch 'ar/help-guides-doc' into master
* ar/help-guides-doc:
  git-help.txt: fix mentions of option --guides
2020-07-30 21:34:29 -07:00
Junio C Hamano
8a111fc01f Merge branch 'sk/typofixes' into master
* sk/typofixes:
  comment: fix spelling mistakes inside comments
2020-07-30 21:34:29 -07:00
Junio C Hamano
79bcaf0062 First batch post 2.28
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-30 13:20:36 -07:00
Junio C Hamano
82fafc77ba Merge branch 'en/fill-directory-exponential' into master
Fix to a regression introduced during 2.27 cycle.

* en/fill-directory-exponential:
  dir: check pathspecs before returning `path_excluded`
2020-07-30 13:20:36 -07:00
Junio C Hamano
be2dab9c80 Merge branch 'ct/mv-unmerged-path-error' into master
"git mv src dst", when src is an unmerged path, errored out
correctly but with an incorrect error message to claim that src is
not tracked, which has been clarified.

* ct/mv-unmerged-path-error:
  git-mv: improve error message for conflicted file
2020-07-30 13:20:35 -07:00
Junio C Hamano
c2796ac1c2 Merge branch 'bc/push-cas-cquoted-refname' into master
Pushing a ref whose name contains non-ASCII character with the
"--force-with-lease" option did not work over smart HTTP protocol,
which has been corrected.

* bc/push-cas-cquoted-refname:
  remote-curl: make --force-with-lease work with non-ASCII ref names
2020-07-30 13:20:34 -07:00
Junio C Hamano
be537062af Merge branch 'cc/pretty-contents-size' into master
"git for-each-ref --format=<>" learned %(contents:size).

* cc/pretty-contents-size:
  ref-filter: add support for %(contents:size)
  t6300: test refs pointing to tree and blob
  Documentation: clarify %(contents:XXXX) doc
2020-07-30 13:20:33 -07:00
Junio C Hamano
a20e20e4c8 Merge branch 'rs/add-index-entry-optim-fix' into master
Fix to an ancient bug caused by an over-eager attempt for
optimization.

* rs/add-index-entry-optim-fix:
  read-cache: remove bogus shortcut
2020-07-30 13:20:33 -07:00
Junio C Hamano
37f382a924 Merge branch 'jt/avoid-lazy-fetching-upon-have-check' into master
Fetching from a lazily cloned repository resulted at the server
side in attempts to lazy fetch objects that the client side has,
many of which will not be available from the third-party anyway.

* jt/avoid-lazy-fetching-upon-have-check:
  upload-pack: do not lazy-fetch "have" objects
2020-07-30 13:20:33 -07:00
Junio C Hamano
e163cff400 Merge branch 'dl/test-must-fail-fixes-6' into master
Dev support to limit the use of test_must_fail to only git commands.

* dl/test-must-fail-fixes-6:
  test-lib-functions: restrict test_must_fail usage
  t9400: don't use test_must_fail with cvs
  t9834: remove use of `test_might_fail p4`
  t7107: don't use test_must_fail()
  t5324: reorder `run_with_limited_open_files test_might_fail`
  t3701: stop using `env` in force_color()
2020-07-30 13:20:32 -07:00
Junio C Hamano
c28a2d0c12 Merge branch 'jk/reject-newer-extensions-in-v0' into master
With the base fix to 2.27 regresion, any new extensions in a v0
repository would still be silently honored, which is not quite
right.  Instead, complain and die loudly.

* jk/reject-newer-extensions-in-v0:
  verify_repository_format(): complain about new extensions in v0 repo
2020-07-30 13:20:32 -07:00
Junio C Hamano
3161cc6e6b Merge branch 'hn/reftable' into master
Preliminary clean-up of the refs API in preparation for adding a
new refs backend "reftable".

* hn/reftable:
  reflog: cleanse messages in the refs.c layer
  bisect: treat BISECT_HEAD as a pseudo ref
  t3432: use git-reflog to inspect the reflog for HEAD
  lib-t6000.sh: write tag using git-update-ref
2020-07-30 13:20:32 -07:00
Junio C Hamano
f175e9b845 Merge branch 'bw/fail-cloning-into-non-empty' into master
"git clone --separate-git-dir=$elsewhere" used to stomp on the
contents of the existing directory $elsewhere, which has been
taught to fail when $elsewhere is not an empty directory.

* bw/fail-cloning-into-non-empty:
  git clone: don't clone into non-empty directory
2020-07-30 13:20:32 -07:00
Junio C Hamano
5ca82e339e Merge branch 'pb/log-rev-list-doc' into master
"git help log" has been enhanced by sharing more material from the
documentation for the underlying "git rev-list" command.

* pb/log-rev-list-doc:
  git-log.txt: include rev-list-description.txt
  git-rev-list.txt: move description to separate file
  git-rev-list.txt: tweak wording in set operations
  git-rev-list.txt: fix Asciidoc syntax
  revisions.txt: describe 'rev1 rev2 ...' meaning for ranges
  git-log.txt: add links to 'rev-list' and 'diff' docs
2020-07-30 13:20:32 -07:00
Junio C Hamano
6fc5542564 Merge branch 'jk/tests-timestamp-fix' into master
The test framework has been updated so that most tests will run
with predictable (artificial) timestamps.

* jk/tests-timestamp-fix:
  t9100: stop depending on commit timestamps
  test-lib: set deterministic default author/committer date
  t9100: explicitly unset GIT_COMMITTER_DATE
  t5539: make timestamp requirements more explicit
  t9700: loosen ident timezone regex
  t6000: use test_tick consistently
2020-07-30 13:20:31 -07:00
Junio C Hamano
70cdbbe3a7 Merge branch 'ds/commit-graph-bloom-updates' into master
Updates to the changed-paths bloom filter.

* ds/commit-graph-bloom-updates:
  commit-graph: check all leading directories in changed path Bloom filters
  revision: empty pathspecs should not use Bloom filters
  revision.c: fix whitespace
  commit-graph: check chunk sizes after writing
  commit-graph: simplify chunk writes into loop
  commit-graph: unify the signatures of all write_graph_chunk_*() functions
  commit-graph: persist existence of changed-paths
  bloom: fix logic in get_bloom_filter()
  commit-graph: change test to die on parse, not load
  commit-graph: place bloom_settings in context
2020-07-30 13:20:31 -07:00
Junio C Hamano
de6dda0dc3 Merge branch 'sg/commit-graph-cleanups' into master
The changed-path Bloom filter is improved using ideas from an
independent implementation.

* sg/commit-graph-cleanups:
  commit-graph: simplify write_commit_graph_file() #2
  commit-graph: simplify write_commit_graph_file() #1
  commit-graph: simplify parse_commit_graph() #2
  commit-graph: simplify parse_commit_graph() #1
  commit-graph: clean up #includes
  diff.h: drop diff_tree_oid() & friends' return value
  commit-slab: add a function to deep free entries on the slab
  commit-graph-format.txt: all multi-byte numbers are in network byte order
  commit-graph: fix parsing the Chunk Lookup table
  tree-walk.c: don't match submodule entries for 'submod/anything'
2020-07-30 13:20:30 -07:00
Steve Kemp
84544f2ea3 comment: fix spelling mistakes inside comments
This commit fixes a couple of minor spelling mistakes inside
comments.

Signed-off-by: Steve Kemp <steve@steve.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-29 11:39:40 -07:00
Andrei Rybak
b17f411ab5 git-help.txt: fix mentions of option --guides
Fix typos introduced in commit a133737b80 ("doc: include --guide option
description for "git help"", 2013-04-02).

Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-29 11:28:14 -07:00
René Scharfe
98c6871fad grep: avoid using oid_to_hex() with parse_object_or_die()
parse_object_or_die() is passed an object ID and a name to show if the
object cannot be parsed.  If the name is NULL then it shows the
hexadecimal object ID.  Use that feature instead of preparing and
passing the hexadecimal representation to the function proactively.
That's shorter and a bit more efficient.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-28 15:26:12 -07:00
Elijah Newren
861c4ce141 hashmap: fix typo in usage docs
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-28 14:28:15 -07:00
Elijah Newren
6d12b533b7 Remove doubled words in various comments
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-28 14:28:14 -07:00
Junio C Hamano
47ae905ffb Git 2.28
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v2.28.0
2020-07-26 18:01:43 -07:00
Junio C Hamano
5c06d60fc5 l10n-2.28.0-rnd1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE37vMEzKDqYvVxs51k24VDd1FMtUFAl8dqyoACgkQk24VDd1F
 MtXdPQ//aSYf0cbPq9oqRIP+DevGiUMQ8D0khHe9xwp3NMyRLBLxvae7KgIS3NYY
 aKErD3lFBq1tgrm+9OzRXpVOzjKjMcIeSzuSIotVJB2IZt52UMvmh5fNkgcUXiz8
 Dl1EEmU8Jxl9fSAKImrWLMs5yEYCqy9pA1os3MqhU0ksDuOBcAyMVJAE6wTjfZq8
 02ka02IN60jhrdTkAM1yT1X7EuzXmnIHm/k3i0fIqb78+NC8n/aw1zOkQUp8A3HF
 c/1cwHylMo6SCT53ZQUdeUIHZIbBLhdsG0zVpCGCaDvZSPO3DdGvTW5d0Slh5ZAh
 Nc/xp0rBsuBFANiUREC1sqBGszEtE7mHRqSJlrYbyL59Ff+qFQoqyJpveowtfFI3
 E+1tsLSUj93D3ALWEzCrNAvFJyQnUrMV7bStkTNz+/9BqjLfFtz8L7O4WPPE9MHg
 hHzxHq+edeYn+T8N/2hgRe3eVsOm7097ZnEpK1+EGPexmFoy5i71vIHc8s07s+J0
 NcucUIxkd1fiDwqV/54M2JP+f/2KCF9ScL2c5Tt/Hsjcg0xK/IfBvC5LaIGMongo
 Ua5qhjZGPpmPUWtrnwIRNEgRaaE8uY+UHr6IM1NolDO4gPEp8rUEm7DK9ETxDLym
 uQD+0KNWTx4j0vvyfTyoj9vlO8WCjXXIy+A8+f19gVQYiKbHxNw=
 =UWGH
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.28.0-rnd1' of https://www.github.com/git-l10n/git-po into master

l10n-2.28.0-rnd1

* tag 'l10n-2.28.0-rnd1' of https://www.github.com/git-l10n/git-po:
  l10n: es: 2.28.0 round 1
  l10n: de.po: Update German translation for Git v2.28.0
  l10n: de.po: fix grammar
  l10n: zh_CN: for git v2.28.0 l10n round 1
  l10n: zh_TW.po: v2.28.0 round 1 (0 untranslated)
  l10n: vi.po: correct "ident line" translation
  l10n: vi.po(4931t): Updated translation for v2.28.0
  l10n: fr v2.28.0 round 1
  l10n: sv.po: Update Swedish translation (4931t0f0u)
  l10n: it.po: update the Italian translation for Git 2.28.0 round 1
  l10n: tr: v2.28.0 round 1
  l10n: git.pot: v2.28.0 round 1 (70 new, 14 removed)
  l10n: Update Catalan translation
2020-07-26 09:48:11 -07:00
Jiang Xin
05b3a3d730 Merge branch 'master' of github.com:Softcatala/git-po
* 'master' of github.com:Softcatala/git-po:
  l10n: Update Catalan translation
2020-07-27 00:05:41 +08:00
Christopher Diaz Riveros
7b0e326ba9 l10n: es: 2.28.0 round 1
Signed-off-by: Christopher Diaz Riveros <christopher.diaz.riv@gmail.com>
2020-07-26 10:12:01 -05:00
Junio C Hamano
418cca9555 Merge branch 'ps/ref-transaction-hook' into master
A new hook.

* ps/ref-transaction-hook:
  githooks.txt: use correct "reference-transaction" hook name
2020-07-24 15:54:06 -07:00
Bojun Chen
6c18d03eb8 githooks.txt: use correct "reference-transaction" hook name
The "reference transaction" hook was introduced in commit 6754159767
(refs: implement reference transaction hook, 2020-06-19). The name of
the hook is declared as "reference-transaction" in "refs.c" and
testcases, but the name declared in "githooks.txt" is different.

Signed-off-by: Bojun Chen <bojun.cbj@alibaba-inc.com>
Reviewed-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-24 13:53:58 -07:00
Matthias Rüster
45f83df1b5 l10n: de.po: Update German translation for Git v2.28.0
Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
2020-07-24 20:35:30 +02:00
Ralf Thielow
7112e051c7 l10n: de.po: fix grammar
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
2020-07-24 20:33:38 +02:00
Taylor Blau
3d20111cbd Documentation/RelNotes: fix a typo in 2.28's relnotes
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-22 14:10:20 -07:00
Junio C Hamano
b066807397 Git 2.28-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v2.28.0-rc2
2020-07-22 09:30:01 -07:00
Junio C Hamano
cfa7ae8b6e Merge branch 'en/sparse-status' into master
Fix to a "git prompt" regression during this development cycle.

* en/sparse-status:
  git-prompt: change == to = for zsh's sake
2020-07-21 14:19:10 -07:00
Jiang Xin
7157c2b5c9 l10n: zh_CN: for git v2.28.0 l10n round 1
Translate 70 new messages (4931t0f0u) for git 2.28.0.

Reviewed-by: Fangyi Zhou <me@fangyi.io>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2020-07-21 16:31:13 +08:00
Jiang Xin
0c5ead43fd Merge branch 'l10n/zh_TW/200716' of github.com:l10n-tw/git-po
* 'l10n/zh_TW/200716' of github.com:l10n-tw/git-po:
  l10n: zh_TW.po: v2.28.0 round 1 (0 untranslated)
2020-07-21 16:00:54 +08:00
brian m. carlson
cd85b447bf remote-curl: make --force-with-lease work with non-ASCII ref names
When we invoke a remote transport helper and pass an option with an
argument, we quote the argument as a C-style string if necessary.  This
is the case for the cas option, which implements the --force-with-lease
command-line flag, when we're passing a non-ASCII refname.

However, the remote curl helper isn't designed to parse such an
argument, meaning that if we try to use --force-with-lease with an HTTP
push and a non-ASCII refname, we get an error like this:

  error: cannot parse expected object name '0000000000000000000000000000000000000000"'

Note the double quote, which get_oid has reminded us is not valid in an
hex object ID.

Even if we had been able to parse it, we would send the wrong data to
the server: we'd send an escaped ref, which would not behave as the user
wanted and might accidentally result in updating or deleting a ref we
hadn't intended.

Since we need to expect a quoted C-style string here, just check if the
first argument is a double quote, and if so, unquote it.  Note that if
the refname contains a double quote, then we will have double-quoted it
already, so there is no ambiguity.

We test for this case only in the smart protocol, since the DAV-based
protocol is not capable of handling this capability.  We use UTF-8
because this is nicer in our tests and friendlier to Windows, but the
code should work for all non-ASCII refs.

While we're at it, since the name of the option is now well established
and isn't going to change, let's inline it instead of using the #define
constant.

Reported-by: Frej Bjon <frej.bjon@nemit.fi>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-20 21:05:16 -07:00
David J. Malan
e8882a87d9 git-prompt: change == to = for zsh's sake
When using git-prompt.sh with zsh, __git_ps1 currently errs
when inside a repo with:

__git_ps1:96: = not found

Avoid using non-portable "==" that is only understood by bash
and not zsh. Change to "=" so that the prompt script becomes
usable with zsh again.

Signed-off-by: David J. Malan <malan@harvard.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-20 17:37:20 -07:00
Chris Torek
9b906af657 git-mv: improve error message for conflicted file
'git mv' has always complained about renaming a conflicted
file, as it cannot handle multiple index entries for one file.
However, the error message it uses has been the same as the
one for an untracked file:

    fatal: not under version control, src=...

which is patently wrong.  Distinguish the two cases and
add a test to make sure we produce the correct message.

Signed-off-by: Chris Torek <chris.torek@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-20 14:35:43 -07:00
Martin Ågren
cada7308ad dir: check pathspecs before returning path_excluded
In 95c11ecc73 ("Fix error-prone fill_directory() API; make it only
return matches", 2020-04-01), we taught `fill_directory()`, or more
specifically `treat_path()`, to check against any pathspecs so that we
could simplify the callers.

But in doing so, we added a slightly-too-early return for the "excluded"
case. We end up not checking the pathspecs, meaning we return
`path_excluded` when maybe we should return `path_none`. As a result,
`git status --ignored -- pathspec` might show paths that don't actually
match "pathspec".

Move the "excluded" check down to after we've checked any pathspecs.

Reported-by: Andreas Schwab <schwab@linux-m68k.org>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-20 13:25:07 -07:00
Junio C Hamano
e7ae437ac1 Merge https://github.com/prati0100/git-gui into master
* https://github.com/prati0100/git-gui:
  git-gui: allow opening work trees from the startup dialog
2020-07-20 12:04:06 -07:00
Yi-Jyun Pan
6b77569371
l10n: zh_TW.po: v2.28.0 round 1 (0 untranslated)
Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
2020-07-20 18:39:27 +08:00
Đoàn Trần Công Danh
877c10b5e3 l10n: vi.po: correct "ident line" translation
While we're at it, fix some minor misspelling
and improve translation for 3-way-merging.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2020-07-20 08:55:12 +07:00
Tran Ngoc Quan
ebf9785bec l10n: vi.po(4931t): Updated translation for v2.28.0
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2020-07-20 08:54:50 +07:00
Junio C Hamano
ae46588be0 Merge branch 'dl/branch-cleanup' into master
Last minute fix-up to tests for portability.

* dl/branch-cleanup:
  t3200: don't grep for `strerror()` string
2020-07-18 16:35:22 -07:00
Junio C Hamano
00a7a21b97 Merge branch 'js/pu-to-seen' into master
Last minute fix-up to documentation.

* js/pu-to-seen:
  gitworkflows.txt: fix broken subsection underline
2020-07-18 16:35:22 -07:00
Junio C Hamano
d400cb0d1b Merge branch 'jc/relnotes-v0-extension-update' into master
Last minute fix-up to the release notes.

* jc/relnotes-v0-extension-update:
  RelNotes: update the v0 with extension situation
2020-07-18 16:35:20 -07:00
Martin Ågren
d223e85407 t3200: don't grep for strerror() string
In 6b7093064a ("t3200: test for specific errors", 2020-06-15), we
learned to grep stderr to ensure that the failing `git branch`
invocations fail for the right reason. In two of these tests, we grep
for "File exists", expecting the string to show up there since config.c
calls `error_errno()`, which ends up including `strerror(errno)` in the
error message.

But as we saw in 4605a73073 ("t1091: don't grep for `strerror()`
string", 2020-03-08), there exists at least one implementation where
`strerror()` yields a slightly different string than the one we're
grepping for. In particular, these tests fail on the NonStop platform.

Similar to 4605a73073, grep for the beginning of the string instead to
avoid relying on `strerror()` behavior.

Reported-by: Randall S. Becker <rsbecker@nexbridge.com>
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-18 13:47:05 -07:00
Martin Ågren
ca8bb509d2 gitworkflows.txt: fix broken subsection underline
AsciiDoctor renders the "~~~~~~~~~" literally. That's not our intention:
it is supposed to indicate a level 2 subsection. In 828197de8f ("docs:
adjust for the recent rename of `pu` to `seen`", 2020-06-25), the length
of this section header grew by two characters but we didn't adjust the
number of ~ characters accordingly. AsciiDoc handles this discrepancy ok
and still picks this up as a subsection title, but Asciidoctor is not as
forgiving.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-18 13:43:34 -07:00