Commit graph

54969 commits

Author SHA1 Message Date
Junio C Hamano 8104ec994e Git 2.21
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-24 07:55:19 -08:00
Junio C Hamano 572e460b7a Merge branch 'yn/checkout-doc-fix'
Doc fix.

* yn/checkout-doc-fix:
  checkout doc: fix an unmatched double-quote pair
2019-02-24 07:18:00 -08:00
Jeff King 287ab28bfa diff: reuse diff setup for --no-index case
When "--no-index" is in effect (or implied by the arguments), git-diff
jumps early to a special code path to perform that diff. This means we
miss out on some settings like enabling --ext-diff and --textconv by
default.

Let's jump to the no-index path _after_ we've done more setup on
rev.diffopt. Since some of the options don't affect us (e.g., items
related to the index), let's re-order the setup into two blocks (see the
in-code comments).

Note that we also need to stop re-initializing the diffopt struct in
diff_no_index(). This should not be necessary, as it will already have
been initialized by cmd_diff() (and there are no other callers). That in
turn lets us drop the "repository" argument from diff_no_index (which
never made much sense, since the whole point is that you don't need a
repository).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-24 07:08:34 -08:00
Junio C Hamano a1997dad1f l10n-2.21.0-rnd2
-----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCgA3FiEET/4dIHc7EQTOoGRdx6TpG3VEeigFAlxyJB8ZHHdvcmxkaGVs
 bG8ubmV0QGdtYWlsLmNvbQAKCRDHpOkbdUR6KHP0D/98LexaqaOuXJJcJ6rqNtje
 PEzWoxz90XgbJxkRbV8bOxvWXW62YXSXICNhuAyN8o9DmdyXImRtJmYJMobHeliP
 L8+h0bS2jhak1+VEshUs7PR8K2y8UBGHeQGKyNMccsqCKUBTeZo4xlA7NW+VOC5j
 MzYcdSMG9MCV/eMgmT0KKle26IUM9JakZOSr/pfgSTtOsBQQUcI1RO/U4vobYtkc
 ExBWHh/+yl/Ear9FwyJEGfUJLfbfvDdbzeekoiGV7wR+syDb3ozbwgwOIH+RkT+k
 lRXtbHSwhH2wa2JlcOhieM2Z2cka50UkkI6ZqRXS3Tzczc5uUpOAdX4Ixs7gRLuX
 WPIWAxYyFRgVSBLbwUDcGYztrYpPIOF7BSxE1TlG9KplmjRa+w8FSarsdkKPD0hM
 ajRDmDjcaMNxbqi4t+TkBmK2Fgy162T/mRDA2nimyoPChE1DGuXoeFNrg0gNZ7tv
 u5q7mK4jljR2BCUWmCqSrG+pVFXjSEcoalt6Fhhq4AwU+njULpF/8zgIV+BNqLJi
 GrPiSEzrF+V1+UUof+rbyjFK7L24We0Hk9YREbuy2CMeqx+OCyCR1kBTYsmw+2IG
 AsEJRmcqOgdtv2wjWUicBlWd+a6Q4bxIfcTXVMBKtkCsmzj7ZHxTpQurfpu9yqt7
 obTGWSRTPvI8M3U1fB14hg==
 =2TXi
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.21.0-rnd2' of git://github.com/git-l10n/git-po

l10n-2.21.0-rnd2

* tag 'l10n-2.21.0-rnd2' of git://github.com/git-l10n/git-po:
  l10n: bg.po: Updated Bulgarian translation (4363t)
  l10n: update German translation
  l10n: zh_CN: Revision for git v2.21.0 l10n
  l10n: zh_CN: for git v2.21.0 l10n round 1~2
  l10n: bg.po: correct typo
  l10n: Update Swedish translation (4363t0f0u)
  l10n: de.po: fix grammar in message for tag.c
  l10n: de.po: fix a message for index-pack.c
  l10n: de.po: consistent translation of 'root commit'
  l10n: it: update the Italian translation
  l10n: es: 2.21.0 round 2
  l10n: el: add Greek l10n team and essential translations
  l10n: fr.po v2.21.0 rnd 2
  l10n: fr.po Fix some typos from round3
  l10n: fr.po Fix some typos
  l10n: Fixes to Catalan translation
  l10n: git.pot: v2.21.0 round 2 (3 new, 3 removed)
  l10n: git.pot: v2.21.0 round 1 (214 new, 38 removed)
  l10n: zh_CN: fix typo of submodule init message
  l10n: Update Catalan translation
2019-02-24 07:03:39 -08:00
Johannes Schindelin 39ffebd23b README: adjust for final Azure Pipeline ID
During the six months of development of the Azure Pipelines support, the
patches went through quite a few iterations of changes, and to test
those iterations, a temporary build definition was used.

In the meantime, Azure Pipelines support made it to `master`, and we now
have a regular Azure Pipeline, installed via the common GitHub App
workflow. This new pipeline has a different name (git.git instead of
test-git.git), and a new ID (11 instead of 2).

Let's adjust the badge in our README to reflect that final shape of the
Azure Pipeline.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-23 21:27:04 -08:00
Yoichi Nakayama c5c0a5ff1d checkout doc: fix an unmatched double-quote pair
Signed-off-by: Yoichi Nakayama <yoichi.nakayama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-23 21:24:25 -08:00
Alexander Shopov ab8f4f5d73 l10n: bg.po: Updated Bulgarian translation (4363t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2019-02-23 23:29:23 +02:00
Junio C Hamano c65a2884ea Merge branch 'ab/bsd-fixes'
Test portability fix.

* ab/bsd-fixes:
  commit-graph tests: fix unportable "dd" invocation
  tests: fix unportable "\?" and "\+" regex syntax
2019-02-22 21:20:19 -08:00
Junio C Hamano 60a3fbf500 Merge branch 'ab/workaround-dash-bug-in-test'
* ab/workaround-dash-bug-in-test:
  tests: avoid syntax triggering old dash bug
2019-02-22 21:20:19 -08:00
Jeff Hostetler a446f2dcc8 trace2: add for_each macros to clang-format
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 15:28:22 -08:00
Jeff Hostetler a15860dca3 trace2: t/helper/test-trace2, t0210.sh, t0211.sh, t0212.sh
Create unit tests for Trace2.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 15:28:22 -08:00
Jeff Hostetler b3a5d5a80c trace2:data: add subverb for rebase
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 15:28:21 -08:00
Jeff Hostetler c18b6c1a2b trace2:data: add subverb to reset command
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 15:28:21 -08:00
Jeff Hostetler e27dd8ae9f trace2:data: add subverb to checkout command
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 15:28:21 -08:00
Derrick Stolee ae417807b0 trace2:data: pack-objects: add trace2 regions
When studying the performance of 'git push' we would like to know
how much time is spent at various parts of the command. One area
that could cause performance trouble is 'git pack-objects'.

Add trace2 regions around the three main actions taken in this
command:

1. Enumerate objects.
2. Prepare pack.
3. Write pack-file.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 15:28:21 -08:00
Jeff Hostetler 42fee7a388 trace2:data: add trace2 instrumentation to index read/write
Add trace2 events to measure reading and writing the index.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 15:28:21 -08:00
Jeff Hostetler 6206286e49 trace2:data: add trace2 hook classification
Classify certain child processes as hooks.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 15:28:21 -08:00
Jeff Hostetler abd81a3d79 trace2:data: add trace2 transport child classification
Add trace2 child classification for transport processes.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 15:28:14 -08:00
Jeff Hostetler 0671b4d193 trace2:data: add trace2 sub-process classification
Add trace2 classification for long-running processes
started in sub-process.c

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 15:28:12 -08:00
Jeff Hostetler eee73d1dce trace2:data: add editor/pager child classification
Add trace2 process classification for editor and pager
child processes.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 15:27:59 -08:00
Jeff Hostetler 942b2740ff trace2:data: add trace2 regions to wt-status
Add trace2_region_enter() and trace2_region_leave() calls around the
various phases of a status scan.  This gives elapsed time for each
phase in the GIT_TR2_PERF and GIT_TR2_EVENT trace target.

Also, these Trace2 calls now use s->repo rather than the_repository.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 15:27:59 -08:00
Jeff Hostetler 353d3d77f4 trace2: collect Windows-specific process information
Add platform-specific interface to log information about the current
process.

On Windows, this interface is used to indicate whether the git process
is running under a debugger and list names of the process ancestors.

Information for other platforms is left for a future effort.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 15:27:59 -08:00
Jeff Hostetler ee4512ed48 trace2: create new combined trace facility
Create a new unified tracing facility for git.  The eventual intent is to
replace the current trace_printf* and trace_performance* routines with a
unified set of git_trace2* routines.

In addition to the usual printf-style API, trace2 provides higer-level
event verbs with fixed-fields allowing structured data to be written.
This makes post-processing and analysis easier for external tools.

Trace2 defines 3 output targets.  These are set using the environment
variables "GIT_TR2", "GIT_TR2_PERF", and "GIT_TR2_EVENT".  These may be
set to "1" or to an absolute pathname (just like the current GIT_TRACE).

* GIT_TR2 is intended to be a replacement for GIT_TRACE and logs command
  summary data.

* GIT_TR2_PERF is intended as a replacement for GIT_TRACE_PERFORMANCE.
  It extends the output with columns for the command process, thread,
  repo, absolute and relative elapsed times.  It reports events for
  child process start/stop, thread start/stop, and per-thread function
  nesting.

* GIT_TR2_EVENT is a new structured format. It writes event data as a
  series of JSON records.

Calls to trace2 functions log to any of the 3 output targets enabled
without the need to call different trace_printf* or trace_performance*
routines.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 15:27:59 -08:00
Jeff Hostetler e544221d97 trace2: Documentation/technical/api-trace2.txt
Created design document for Trace2 feature.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 15:27:59 -08:00
Nguyễn Thái Ngọc Duy c271dc28fd Delete check-racy.c
This is git-checy-racy command, added a long time ago [1] and was never
part of the default build. Naturally after some makefile changes [2],
git-check-racy was no longer recognized as a build target. Even if it
compiles to day, it will not link after the introduction of
common-main.c [3].

Racy index has not been a problem for a long time [4].  It's time to let
this code go. I briefly consider if check-racy should be part of
test-tool.  But I don't think it's worth the effort.

[1] 42f774063d (Add check program "git-check-racy" - 2006-08-15)
[2] c373991375 (Makefile: list generated object files in OBJECTS -
    2010-01-26)
[3] 3f2e2297b9 (add an extra level of indirection to main() -
    2016-07-01)
[4] I pretend I don't remember anything about the recent split-index's
    racy problem

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 15:24:32 -08:00
Jonathan Tan 78ad91728d remote-curl: refactor reading into rpc_state's buf
Currently, whenever remote-curl reads pkt-lines from its response file
descriptor, only the payload is written to its buf, not the 4 characters
denoting the length. A future patch will require the ability to also
write those 4 characters, so in preparation for that, refactor this read
into its own function.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 14:27:31 -08:00
Ævar Arnfjörð Bjarmason b9cc405612 commit-graph tests: fix unportable "dd" invocation
Change an unportable invocation of "dd" with count=0, that wanted to
truncate the commit-graph file.  In POSIX it is unspecified what
happens when count=0 is provided[1]. The NetBSD "dd" behavior
differs from GNU (and seemingly other BSDs), which has left this test
broken since d2b86fbaa1 ("commit-graph: fix buffer read-overflow",
2019-01-15).

Copying from /dev/null would seek/truncate to seek=$zero_pos and
stop immediately after that (without being able to copy anything),
which is the right way to truncate the file.

1. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/dd.html

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Helped-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22 11:20:56 -08:00
Jiang Xin e7bc80b7ea Merge branch 'master' of https://github.com/ralfth/git-po-de 2019-02-22 22:18:12 +08:00
Ralf Thielow e5a5d5c2c8 l10n: update German translation
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Reviewed-by: Matthias Rüster <matthias.ruester@gmail.com>
2019-02-22 08:47:26 +01:00
Ævar Arnfjörð Bjarmason 4abf20f004 tests: fix unportable "\?" and "\+" regex syntax
Fix widely supported but non-POSIX basic regex syntax introduced in
[1] and [2]. On GNU, NetBSD and FreeBSD the following works:

    $ echo xy >f
    $ grep 'xy\?' f; echo $?
    xy
    0

The same goes for "\+". The "?" and "+" syntax is not in the BRE
syntax, just in ERE, but on some implementations it can be invoked by
prefixing the meta-operator with "\", but not on OpenBSD:

    $ uname -a
    OpenBSD obsd.my.domain 6.2 GENERIC#132 amd64
    $ grep --version
    grep version 0.9
    $ grep 'xy\?' f; echo $?
    1

Let's fix this by moving to ERE syntax instead, where "?" and "+" are
universally supported:

    $ grep -E 'xy?' f; echo $?
    xy
    0

1. 2ed5c8e174 ("describe: setup working tree for --dirty", 2019-02-03)
2. c801170b0c ("t6120: test for describe with a bare repository",
   2019-02-03)

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 20:58:19 -08:00
Nguyễn Thái Ngọc Duy 87649a1674 diff-parseopt: convert --ignore-some-changes
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:59 -08:00
Nguyễn Thái Ngọc Duy 2e75f922f3 diff-parseopt: convert --[no-]minimal
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:59 -08:00
Nguyễn Thái Ngọc Duy 0b1c5b59f0 diff-parseopt: convert --relative
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:59 -08:00
Nguyễn Thái Ngọc Duy cdc43eb0b8 diff-parseopt: convert --no-renames|--[no--rename-empty
For --rename-empty, see 90d43b0768 (teach diffcore-rename to
optionally ignore empty content - 2012-03-22) for more information.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:59 -08:00
Nguyễn Thái Ngọc Duy bdd4741bfd diff-parseopt: convert --find-copies-harder
--no-find-copies-harder is also added on purpose (because I don't see
why we should not have the --no- version for this)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:59 -08:00
Nguyễn Thái Ngọc Duy 7f64850d36 diff-parseopt: convert -C|--find-copies
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:59 -08:00
Nguyễn Thái Ngọc Duy 1e5332968a diff-parseopt: convert -D|--irreversible-delete
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:59 -08:00
Nguyễn Thái Ngọc Duy f476308b27 diff-parseopt: convert -M|--find-renames
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:59 -08:00
Nguyễn Thái Ngọc Duy ced4e179fe diff-parseopt: convert -B|--break-rewrites
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:59 -08:00
Nguyễn Thái Ngọc Duy af2f368091 diff-parseopt: convert --output-*
This also validates that the user specifies a single character in
--output-indicator-*, not a string.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:59 -08:00
Nguyễn Thái Ngọc Duy 7d7942b796 diff-parseopt: convert --[no-]compact-summary
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:59 -08:00
Nguyễn Thái Ngọc Duy 84b5089e41 diff-parseopt: convert --stat*
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:59 -08:00
Nguyễn Thái Ngọc Duy e01df7a33d diff-parseopt: convert -s|--no-patch
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:59 -08:00
Nguyễn Thái Ngọc Duy a23874726b diff-parseopt: convert --name-status
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:58 -08:00
Nguyễn Thái Ngọc Duy 0e840e2af4 diff-parseopt: convert --name-only
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:58 -08:00
Nguyễn Thái Ngọc Duy e550f58551 diff-parseopt: convert --patch-with-stat
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:58 -08:00
Nguyễn Thái Ngọc Duy 70a304179a diff-parseopt: convert --summary
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:58 -08:00
Nguyễn Thái Ngọc Duy fc6af3e92a diff-parseopt: convert --check
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:58 -08:00
Nguyễn Thái Ngọc Duy 4ce7aab5a5 diff-parseopt: convert --dirstat and friends
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 15:16:58 -08:00
Josh Steadmon 90503a240b protocol-capabilities.txt: document symref
In 7171d8c15f ("upload-pack: send symbolic ref information as
capability"), we added a symref capability to the pack protocol, but it
was never documented. Adapt the patch notes from that commit and add
them to the capabilities documentation.

While we're at it, add a disclaimer to the top of
protocol-capabilities.txt noting that the doc only applies to v0/v1 of
the wire protocol.

Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-21 12:05:52 -08:00