1
0
mirror of https://github.com/git/git.git synced 2024-10-21 10:28:50 +02:00
Commit Graph

59664 Commits

Author SHA1 Message Date
Abhishek Kumar
9892dc83f6 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>
2020-05-18 10:33:00 -07:00
Đoàn Trần Công Danh
71800d31b5 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>
2020-05-18 10:18:34 -07:00
Greg Price
ddcfc7c67d 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>
2020-05-18 10:05:12 -07:00
Jiang Xin
3d5545ce16 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>
2020-05-18 09:26:24 +08:00
Christopher Diaz Riveros
848c9e1d9e l10n: es: 2.27.0 round 1
Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
2020-05-17 18:51:17 -05:00
Jiang Xin
0b214881c4 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)
2020-05-17 09:39:00 +08:00
Jiang Xin
722ab588c5 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
2020-05-17 09:28:44 +08:00
Alexander Shopov
5163ba92b1 l10n: bg.po: Updated Bulgarian translation (4868t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2020-05-16 13:08:00 +02:00
Jean-Noël Avila
dc46d27a5e l10n: fr v2.27.0 rnd 1
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2020-05-16 12:49:09 +02:00
Jiang Xin
2e8c27b3d3 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
2020-05-16 18:30:57 +08:00
Jiang Xin
4226ffa400 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)
2020-05-16 18:28:21 +08:00
Junio C Hamano
e31600b03f 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.
2020-05-15 10:25:58 -07:00
Junio C Hamano
4024295568 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>
2020-05-15 10:25:58 -07:00
Junio C Hamano
3d7b2b4196 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.
2020-05-15 09:47:18 -07:00
Derrick Stolee
3af029c484 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>
2020-05-15 09:41:30 -07:00
Johannes Schindelin
857341c1b7 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>
2020-05-15 08:02:30 -07:00
Elijah Newren
6c34239de6 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>
2020-05-15 07:59:27 -07:00
Peter Krefting
a6cfc0e3d6 l10n: sv.po: Update Swedish translation (4839t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2020-05-15 12:21:42 +01:00
Emir Sarı
3d38157284 l10n: tr: v2.27.0 round 1
Signed-off-by: Emir Sarı <bitigchi@me.com>
2020-05-15 14:16:43 +03:00
Alessandro Menti
6c82da1bd2
l10n: it.po: update the Italian translation for Git 2.27.0 round 1
Signed-off-by: Alessandro Menti <alessandro.menti@alessandromenti.it>
2020-05-15 08:39:23 +02:00
Jiang Xin
bfef3f9d23 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>
2020-05-15 09:12:03 +08:00
Junio C Hamano
efcab5b7a3 Git 2.27-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v2.27.0-rc0
2020-05-14 14:39:45 -07:00
Junio C Hamano
d98abce68f 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
2020-05-14 14:39:45 -07:00
Junio C Hamano
ac140beebe 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
2020-05-14 14:39:45 -07:00
Junio C Hamano
6baba94afc 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
2020-05-14 14:39:44 -07:00
Junio C Hamano
4b1e5e5d8c 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
2020-05-14 14:39:44 -07:00
Junio C Hamano
0498840b35 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
2020-05-14 14:39:44 -07:00
Junio C Hamano
f4507cea24 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
2020-05-14 14:39:43 -07:00
Junio C Hamano
a2a0942a16 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
2020-05-14 14:39:43 -07:00
Junio C Hamano
73d9f96b47 Merge branch 'jc/codingstyle-compare-with-null'
Doc update.

* jc/codingstyle-compare-with-null:
  CodingGuidelines: do not ==/!= compare with 0 or '\0' or NULL
2020-05-14 14:39:42 -07:00
Junio C Hamano
f9dbe28d62 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
2020-05-14 14:39:41 -07:00
Junio C Hamano
3583730758 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
2020-05-14 14:39:41 -07:00
Carlo Marcelo Arenas Belón
84b0115f0d 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>
2020-05-14 13:52:27 -07:00
Elijah Newren
95983da6b4 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>
2020-05-14 12:14:19 -07:00
Taylor Blau
630cd5194e 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>
2020-05-13 15:20:45 -07:00
Taylor Blau
d335ce8f24 commit-graph.c: show progress of finding reachable commits
When 'git commit-graph write --reachable' is invoked, the commit-graph
machinery calls 'for_each_ref()' to discover the set of reachable
commits.

Right now the 'add_ref_to_set' callback is not doing anything other than
adding an OID to the set of known-reachable OIDs. In a subsequent
commit, 'add_ref_to_set' will presumptively peel references. This
operation should be fast for repositories with an up-to-date
'$GIT_DIR/packed-refs', but may be slow in the general case.

So that it doesn't appear that 'git commit-graph write' is idling with
'--reachable' in the slow case, add a progress meter to provide some
output in the meantime.

In general, we don't expect a progress meter to appear at all, since
peeling references with a 'packed-refs' file is quick. If it's slow and
we do show a progress meter, the subsequent 'fill_oids_from_commits()'
will be fast, since all of the calls to
'lookup_commit_reference_gently()' will be no-ops.

Both progress meters are delayed, so it is unlikely that more than one
will appear. In either case, this intermediate state will go away in a
handful of patches, at which point there will be at most one progress
meter.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-05-13 15:20:45 -07:00
Junio C Hamano
172e8ff696 The ninth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-05-13 12:19:21 -07:00
Junio C Hamano
a0125885f5 Merge branch 'cc/upload-pack-v2-fetch-fix'
Serving a "git fetch" client over "git://" and "ssh://" protocols
using the on-wire protocol version 2 was buggy on the server end
when the client needs to make a follow-up request to
e.g. auto-follow tags.

* cc/upload-pack-v2-fetch-fix:
  upload-pack: clear filter_options for each v2 fetch command
2020-05-13 12:19:21 -07:00
Junio C Hamano
ce1adb1157 Merge branch 'ds/sparse-updates-oob-access-fix'
The code to skip unmerged paths in the index when sparse checkout
is in use would have made out-of-bound access of the in-core index
when the last path was unmerged, which has been corrected.

* ds/sparse-updates-oob-access-fix:
  unpack-trees: avoid array out-of-bounds error
2020-05-13 12:19:20 -07:00
Junio C Hamano
9e8ed173b4 Merge branch 'ss/submodule-set-url-in-c'
Rewriting various parts of "git submodule" in C continues.

* ss/submodule-set-url-in-c:
  submodule: port subcommand 'set-url' from shell to C
2020-05-13 12:19:20 -07:00
Junio C Hamano
2e72299ec6 Merge branch 'dd/bloom-sparse-fix'
Code clean-up.

* dd/bloom-sparse-fix:
  bloom: fix `make sparse` warning
2020-05-13 12:19:20 -07:00
Junio C Hamano
dd4a28790f Merge branch 'jk/ci-only-on-selected-branches'
Instead of always building all branches at GitHub via Actions,
users can specify which branches to build.

* jk/ci-only-on-selected-branches:
  ci: allow per-branch config for GitHub Actions
2020-05-13 12:19:19 -07:00
Junio C Hamano
94afbbb8de Merge branch 'ss/faq-fetch-pull'
Random bits of FAQ.

* ss/faq-fetch-pull:
  gitfaq: fetching and pulling a repository
2020-05-13 12:19:19 -07:00
Junio C Hamano
658624209a Merge branch 'ss/faq-ignore'
Random bits of FAQ.

* ss/faq-ignore:
  gitfaq: files in .gitignore are tracked
2020-05-13 12:19:19 -07:00
Junio C Hamano
3af459e48d Merge branch 'jc/auto-gc-quiet'
Teach "am", "commit", "merge" and "rebase", when they are run with
the "--quiet" option, to pass "--quiet" down to "gc --auto".

* jc/auto-gc-quiet:
  auto-gc: pass --quiet down from am, commit, merge and rebase
  auto-gc: extract a reusable helper from "git fetch"
2020-05-13 12:19:19 -07:00
Junio C Hamano
aa28171c27 Merge branch 'cb/credential-doc-fixes'
Minor in-code comments and documentation updates around credential
API.

* cb/credential-doc-fixes:
  credential: document protocol updates
  credential: update gitcredentials documentation
  credential: correct order of parameters for credential_match
  credential: update description for credential_from_url_gently
2020-05-13 12:19:19 -07:00
Junio C Hamano
69ae8ffa2a Merge branch 'tb/bitmap-walk-with-tree-zero-filter'
The object walk with object filter "--filter=tree:0" can now take
advantage of the pack bitmap when available.

* tb/bitmap-walk-with-tree-zero-filter:
  pack-bitmap: pass object filter to fill-in traversal
  pack-bitmap.c: support 'tree:0' filtering
  pack-bitmap.c: make object filtering functions generic
  list-objects-filter: treat NULL filter_options as "disabled"
2020-05-13 12:19:18 -07:00
Junio C Hamano
896833b268 Merge branch 'tb/shallow-cleanup'
Code cleanup.

* tb/shallow-cleanup:
  shallow: use struct 'shallow_lock' for additional safety
  shallow.h: document '{commit,rollback}_shallow_file'
  shallow: extract a header file for shallow-related functions
  commit: make 'commit_graft_pos' non-static
2020-05-13 12:19:18 -07:00
Đoàn Trần Công Danh
27e29f859d t1509: correct i18n test
git-init(1)'s messages is subjected to i18n.
They should be tested by test_i18n* family.

Fix them.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-05-13 09:59:00 -07:00
Emily Shaffer
4a4804edf4 bugreport: include user interactive shell
It's possible a user may complain about the way that Git interacts with
their interactive shell, e.g. autocompletion or shell prompt. In that
case, it's useful for us to know which shell they're using
interactively.

Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-05-12 22:02:20 -07:00