Commit Graph

65277 Commits

Author SHA1 Message Date
Junio C Hamano
1d855a6b33 Merge branch 'ab/ci-updates' into next
Drop support for TravisCI and update test workflows at GitHub.

* ab/ci-updates:
  CI: don't run "make test" twice in one job
  CI: use "$runs_on_pool", not "$jobname" to select packages & config
  CI: rename the "Linux32" job to lower-case "linux32"
  CI: use shorter names that fit in UX tooltips
  CI: remove Travis CI support
2021-12-07 22:53:25 -08:00
Junio C Hamano
84d4e4b211 Merge branch 'hn/reflog-tests' into next
Prepare tests on ref API to help testing reftable backends.

* hn/reflog-tests:
  refs/debug: trim trailing LF from reflog message
  test-ref-store: tweaks to for-each-reflog-ent format
  t1405: check for_each_reflog_ent_reverse() more thoroughly
  test-ref-store: don't add newline to reflog message
  show-branch: show reflog message
2021-12-07 22:53:25 -08:00
Junio C Hamano
91039a781e Merge branch 'rj/receive-pack-avoid-sigpipe-during-status-reporting' into next
When the "git push" command is killed while the receiving end is
trying to report what happened to the ref update proposals, the
latter used to die, due to SIGPIPE.  The code now ignores SIGPIPE
to increase our chances to run the post-receive hook after it
happens.

* rj/receive-pack-avoid-sigpipe-during-status-reporting:
  receive-pack: ignore SIGPIPE while reporting status to client
2021-12-07 22:53:24 -08:00
Junio C Hamano
e7862a34c8 Merge branch 'es/pretty-describe-more' into next
Extend "git log --format=%(describe)" placeholder to allow passing
selected command-line options to the underlying "git describe"
command.

* es/pretty-describe-more:
  pretty: add abbrev option to %(describe)
  pretty: add tag option to %(describe)
  pretty.c: rework describe options parsing for better extensibility
2021-12-07 22:53:24 -08:00
Junio C Hamano
5c0bedf853 Merge branch 'ab/run-command' into next
API clean-up.

* ab/run-command:
  run-command API: remove "env" member, always use "env_array"
  difftool: use "env_array" to simplify memory management
  run-command API: remove "argv" member, always use "args"
  run-command API users: use strvec_push(), not argv construction
  run-command API users: use strvec_pushl(), not argv construction
  run-command tests: use strvec_pushv(), not argv assignment
  run-command API users: use strvec_pushv(), not argv assignment
  upload-archive: use regular "struct child_process" pattern
  worktree: stop being overly intimate with run_command() internals
2021-12-07 22:53:23 -08:00
Junio C Hamano
074438a4ba Merge branch 'hn/t1404-df-limitation-is-ref-files-only' into next
Test update.

* hn/t1404-df-limitation-is-ref-files-only:
  t1404: mark directory/file conflict tests with REFFILES
2021-12-07 22:53:23 -08:00
Junio C Hamano
baa3b24593 Merge branch 'en/zdiff3' into next
"Zealous diff3" style of merge conflict presentation has been added.

* en/zdiff3:
  update documentation for new zdiff3 conflictStyle
  xdiff: implement a zealous diff3, or "zdiff3"
2021-12-07 22:53:23 -08:00
Junio C Hamano
ebf31cbaad Merge branch 'ds/trace2-regions-in-tests' into next
The default setting for trace2 event nesting was too low to cause
test failures, which is worked around by bumping it up in the test
framework.

* ds/trace2-regions-in-tests:
  t/t*: remove custom GIT_TRACE2_EVENT_NESTING
  test-lib.sh: set GIT_TRACE2_EVENT_NESTING
2021-12-07 22:53:23 -08:00
Junio C Hamano
fc8a8e0006 Merge branch 'fs/test-prereq' into next
The test framework learns to list unsatisfied test prerequisites,
and optionally error out when prerequisites that are expected to be
satisfied are not.

* fs/test-prereq:
  test-lib: make BAIL_OUT() work in tests and prereq
  test-lib: introduce required prereq for test runs
  test-lib: show missing prereq summary
2021-12-07 22:53:22 -08:00
Junio C Hamano
8cdad7bc9a Merge branch 'pw/xdiff-classify-record-in-histogram' into next
"diff --histogram" optimization.

* pw/xdiff-classify-record-in-histogram:
  xdiff: drop unused flags parameter from recs_match
  xdiff: drop xpparam_t parameter from histogram cmp_recs()
  xdiff: drop CMP_ENV macro from xhistogram
2021-12-07 14:04:03 -08:00
Jeff King
1e45db1214 xdiff: drop unused flags parameter from recs_match
Since 6b13bc3232 (xdiff: simplify comparison, 2021-11-17), we do not
call xdl_recmatch() from xdiffi.c's recs_match(), so we no longer need
the "flags" parameter. That in turn lets us drop the flags parameters
from the group-slide functions which call it.

There's no functional change here; it's just making these functions a
little simpler.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-12-04 23:27:53 -08:00
Jeff King
25449450c0 xdiff: drop xpparam_t parameter from histogram cmp_recs()
Since 663c5ad035 (diff histogram: intern strings, 2021-11-17), our
cmp_recs() does not call xdl_recmatch(), and thus no longer needs an
xpparam_t struct from which to get the flags. We can drop the unused
parameter from the function, as well as the macro which wraps it.

There's no functional change here; it's just simplifying things (and
making -Wunused-parameter happier).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-12-04 23:27:53 -08:00
Jeff King
cf0b26d90c xdiff: drop CMP_ENV macro from xhistogram
This macro has been unused since 43ca7530df (xdiff/xhistogram: rely on
xdl_trim_ends(), 2011-08-01). The function that called it went away
there, and its use in the CMP() macro was inlined. It probably should
have been deleted then, but nobody noticed.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-12-04 23:27:53 -08:00
Junio C Hamano
a833829733 Merge branch 'en/rebase-x-fix' into next
"git rebase -x" added an unnecessary 'exec' instructions before
'noop', which has been corrected.

* en/rebase-x-fix:
  sequencer: avoid adding exec commands for non-commit creating commands
2021-12-03 14:59:21 -08:00
Junio C Hamano
8d4f16e620 Merge branch 'cb/add-p-single-key-fix' into next
The single-key-input mode in "git add -p" had some code to handle
keys that generate a sequence of input via ReadKey(), which did not
handle end-of-file correctly, which has been fixed.

* cb/add-p-single-key-fix:
  add -p: avoid use of undefined $key when ReadKey -> EOF
2021-12-03 14:59:21 -08:00
Junio C Hamano
785278d40e Merge branch 'cb/mingw-gmtime-r' into next
Build fix on Windows.

* cb/mingw-gmtime-r:
  mingw: avoid fallback for {local,gm}time_r()
2021-12-03 14:59:20 -08:00
Junio C Hamano
4f37a904a1 Merge branch 'yn/complete-date-format-options' into next
The completion script (in contrib/) learns that the "--date"
option of commands from the "git log" family takes "human" and
"auto" as valid values.

* yn/complete-date-format-options:
  completion: add human and auto: date format
2021-12-03 14:59:20 -08:00
Junio C Hamano
22ad721b52 Merge branch 'em/missing-pager' into next
When a non-existent program is given as the pager, we tried to
reuse an uninitialized child_process structure and crashed, which
has been fixed.

* em/missing-pager:
  pager: fix crash when pager program doesn't exist
2021-12-03 14:59:20 -08:00
Junio C Hamano
afc462a692 Merge branch 'mp/absorb-submodule-git-dir-upon-deinit' into next
"git submodule deinit" for a submodule whose .git metadata
directory is embedded in its working tree refused to work, until
the submodule gets converted to use the "absorbed" form where the
metadata directory is stored in superproject, and a gitfile at the
top-level of the working tree of the submodule points at it.  The
command is taught to convert such submodules to the absorbed form
as needed.

* mp/absorb-submodule-git-dir-upon-deinit:
  submodule: absorb git dir instead of dying on deinit
2021-12-03 14:59:19 -08:00
Junio C Hamano
57100223b2 Merge branch 'jc/c99-var-decl-in-for-loop' into next
Weather balloon to find compilers that do not grok variable
declaration in the for() loop.

* jc/c99-var-decl-in-for-loop:
  revision: use C99 declaration of variable in for() loop
2021-12-03 14:59:19 -08:00
Junio C Hamano
1d8c342dab Merge branch 'ab/mark-leak-free-tests-even-more' into next
More tests are marked as leak-free.

* ab/mark-leak-free-tests-even-more:
  leak tests: mark some fast-import tests as passing with SANITIZE=leak
  leak tests: mark some config tests as passing with SANITIZE=leak
  leak tests: mark some status tests as passing with SANITIZE=leak
  leak tests: mark some clone tests as passing with SANITIZE=leak
  leak tests: mark some add tests as passing with SANITIZE=leak
  leak tests: mark some diff tests as passing with SANITIZE=leak
  leak tests: mark some apply tests as passing with SANITIZE=leak
  leak tests: mark some notes tests as passing with SANITIZE=leak
  leak tests: mark some update-index tests as passing with SANITIZE=leak
  leak tests: mark some rev-parse tests as passing with SANITIZE=leak
  leak tests: mark some rev-list tests as passing with SANITIZE=leak
  leak tests: mark some misc tests as passing with SANITIZE=leak
  leak tests: mark most gettext tests as passing with SANITIZE=leak
  leak tests: mark "sort" test as passing SANITIZE=leak
  leak tests: mark a read-tree test as passing SANITIZE=leak
2021-12-03 14:59:18 -08:00
Junio C Hamano
767ec5d9b3 Merge branch 'hn/reftable' into next
The "reftable" backend for the refs API, without integrating into
the refs subsystem, has been added.

* hn/reftable:
  Add "test-tool dump-reftable" command.
  reftable: add dump utility
  reftable: implement stack, a mutable database of reftable files.
  reftable: implement refname validation
  reftable: add merged table view
  reftable: add a heap-based priority queue for reftable records
  reftable: reftable file level tests
  reftable: read reftable files
  reftable: generic interface to tables
  reftable: write reftable files
  reftable: a generic binary tree implementation
  reftable: reading/writing blocks
  Provide zlib's uncompress2 from compat/zlib-compat.c
  reftable: (de)serialization for the polymorphic record type.
  reftable: add blocksource, an abstraction for random access reads
  reftable: utility functions
  reftable: add error related functionality
  reftable: add LICENSE
  hash.h: provide constants for the hash IDs
2021-12-03 14:59:17 -08:00
Junio C Hamano
44ba10d671 revision: use C99 declaration of variable in for() loop
There are certain C99 features that might be nice to use in our code
base, but we've hesitated to do so in order to avoid breaking
compatibility with older compilers. But we don't actually know if
people are even using pre-C99 compilers these days.

One way to figure that out is to introduce a very small use of a
feature, and see if anybody complains, and we've done so to probe
the portability for a few features like "trailing comma in enum
declaration", "designated initializer for struct", and "designated
initializer for array".  A few years ago, we tried to use a handy

    for (int i = 0; i < n; i++)
	use(i);

to introduce a new variable valid only in the loop, but found that
some compilers we cared about didn't like it back then.  Two years
is a long-enough time, so let's try it again.

If this patch can survive a few releases without complaint, then we
can feel more confident that variable declaration in for() loop is
supported by the compilers our user base use.  And if we do get
complaints, then we'll have gained some data and we can easily
revert this patch.

Helped-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-12-03 10:16:00 -08:00
Junio C Hamano
76aa8bc2d0 Merge branch 'bc/require-c99' into next
Weather balloon to break people with compilers that do not support
C99.

* bc/require-c99:
  git-compat-util: add a test balloon for C99 support
2021-12-02 13:29:56 -08:00
Junio C Hamano
87ff49b776 Merge branch 'hn/create-reflog-simplify' into next
A small simplification of API.

* hn/create-reflog-simplify:
  refs: drop force_create argument of create_reflog API
2021-12-02 13:29:56 -08:00
Junio C Hamano
eac9f263ae Merge branch 'jt/midx-doc-fix' into next
Docfix.

* jt/midx-doc-fix:
  Doc: no midx and partial clone relation
2021-12-02 13:29:56 -08:00
Junio C Hamano
eefd61931f Merge branch 'jk/t7006-sigpipe-tests-fix' into next
The function to cull a child process and determine the exit status
had two separate code paths for normal callers and callers in a
signal handler, and the latter did not yield correct value when the
child has caught a signal.  The handling of the exit status has
been unified for these two code paths.  An existing test with
flakiness has also been corrected.

* jk/t7006-sigpipe-tests-fix:
  t7006: simplify exit-code checks for sigpipe tests
  t7006: clean up SIGPIPE handling in trace2 tests
  run-command: unify signal and regular logic for wait_or_whine()
2021-12-02 13:29:55 -08:00
Junio C Hamano
1025235670 Merge branch 'jk/refs-g11-workaround' into next
Workaround for a false-alarm by gcc-11

* jk/refs-g11-workaround:
  refs: work around gcc-11 warning with REF_HAVE_NEW
2021-12-02 13:29:55 -08:00
Junio C Hamano
e2cc1ae46a Merge branch 'jk/fetch-pack-avoid-sigpipe-to-index-pack' into next
"git fetch", when received a bad packfile, can fail with SIGPIPE.
This wasn't wrong per-se, but we now detect the situation and fail
in a more predictable way.

* jk/fetch-pack-avoid-sigpipe-to-index-pack:
  fetch-pack: ignore SIGPIPE when writing to index-pack
2021-12-02 13:29:54 -08:00
Junio C Hamano
971178fe99 Merge branch 'hk/ci-checkwhitespace-commentfix' into next
Comment fix.

* hk/ci-checkwhitespace-commentfix:
  ci(check-whitespace): update stale file top comments
2021-12-02 13:29:54 -08:00
Junio C Hamano
47b1095f39 Merge branch 'vd/sparse-reset' into next
Various operating modes of "git reset" have been made to work
better with the sparse index.

* vd/sparse-reset:
  unpack-trees: improve performance of next_cache_entry
  reset: make --mixed sparse-aware
  reset: make sparse-aware (except --mixed)
  reset: integrate with sparse index
  reset: expand test coverage for sparse checkouts
  sparse-index: update command for expand/collapse test
  reset: preserve skip-worktree bit in mixed reset
  reset: rename is_missing to !is_in_reset_tree
2021-12-02 13:29:54 -08:00
Junio C Hamano
0fae3ebdef Merge branch 'tl/midx-docfix' into next
Doc mark-up fix.

* tl/midx-docfix:
  midx: fix a formatting issue in "multi-pack-index.txt"
2021-12-02 13:29:53 -08:00
Junio C Hamano
489c5b0046 Merge branch 'po/size-t-for-vs' into next
* po/size-t-for-vs:
  object-file.c: LLP64 compatibility, upcast unity for left shift
  diffcore-delta.c: LLP64 compatibility, upcast unity for left shift
  repack.c: LLP64 compatibility, upcast unity for left shift
2021-12-02 13:29:52 -08:00
Junio C Hamano
0490b0ffbd Merge branch 'rs/mergesort' into next
Bitop fix for platforms whose "long" is 32-bit.

* rs/mergesort:
  mergesort: avoid left shift overflow
2021-12-02 13:29:52 -08:00
Junio C Hamano
1b49913760 Merge branch 'ah/advice-pull-has-no-preference-between-rebase-and-merge' into next
The advice message given by "git pull" when the user hasn't made a
choice between merge and rebase still said that the merge is the
default, which no longer is the case.  This has been corrected.

* ah/advice-pull-has-no-preference-between-rebase-and-merge:
  pull: don't say that merge is "the default strategy"
2021-12-02 13:29:51 -08:00
Junio C Hamano
5922388782 Merge branch 'ab/checkout-branch-info-leakfix' into next
Leakfix.

* ab/checkout-branch-info-leakfix:
  checkout: fix "branch info" memory leaks
2021-12-02 13:29:51 -08:00
Junio C Hamano
0ac4fd64aa Merge branch 'jk/t5319-midx-corruption-test-deflake' into next
Test fix.

* jk/t5319-midx-corruption-test-deflake:
  t5319: corrupt more bytes of the midx checksum
2021-12-02 13:29:51 -08:00
Junio C Hamano
c5b1e5ddec Merge branch 'js/trace2-avoid-recursive-errors' into next
trace2 error code path fix.

* js/trace2-avoid-recursive-errors:
  trace2: disable tr2_dst before warning on write errors
2021-12-02 13:29:51 -08:00
Junio C Hamano
5ccd12d09b Merge branch 'pw/xdiff-classify-record-in-histogram' into next
"diff --histogram" optimization.

* pw/xdiff-classify-record-in-histogram:
  xdiff: simplify comparison
  xdiff: avoid unnecessary memory allocations
  diff histogram: intern strings
2021-12-02 13:29:50 -08:00
Junio C Hamano
89c37479db Merge branch 'jt/pack-header-lshift-overflow' into next
The code to decode the length of packed object size has been
corrected.

* jt/pack-header-lshift-overflow:
  packfile: avoid overflowing shift during decode
2021-12-02 13:29:50 -08:00
Junio C Hamano
fea901973d Merge branch 'jk/jump-merge-with-pathspec' into next
The "merge" subcommand of "git jump" (in contrib/) silently ignored
pathspec and other parameters.

* jk/jump-merge-with-pathspec:
  git-jump: pass "merge" arguments to ls-files
2021-12-02 13:29:50 -08:00
Junio C Hamano
c273d402fb Merge branch 'jk/test-bitmap-fix' into next
Tighten code for testing pack-bitmap.

* jk/test-bitmap-fix:
  test_bitmap_hashes(): handle repository without bitmaps
2021-12-02 13:29:50 -08:00
Junio C Hamano
37a575b37f Merge branch 'ab/generate-command-list' into next
Build optimization.

* ab/generate-command-list:
  generate-cmdlist.sh: don't parse command-list.txt thrice
  generate-cmdlist.sh: replace "grep' invocation with a shell version
  generate-cmdlist.sh: do not shell out to "sed"
  generate-cmdlist.sh: stop sorting category lines
  generate-cmdlist.sh: replace for loop by printf's auto-repeat feature
  generate-cmdlist.sh: run "grep | sort", not "sort | grep"
  generate-cmdlist.sh: don't call get_categories() from category_list()
  generate-cmdlist.sh: spawn fewer processes
  generate-cmdlist.sh: trivial whitespace change
  command-list.txt: sort with "LC_ALL=C sort"
2021-12-02 13:29:50 -08:00
Junio C Hamano
944512852e Merge branch 'tw/var-default-branch' into next
"git var GIT_DEFAULT_BRANCH" is a way to see what name is used for
the newly created branch if "git init" is run.

* tw/var-default-branch:
  var: add GIT_DEFAULT_BRANCH variable
2021-12-02 13:29:50 -08:00
Junio C Hamano
d0b158d899 Merge branch 'jk/strbuf-addftime-seconds-since-epoch' into next
The "--date=format:<strftime>" gained a workaround for the lack of
system support for a non-local timezone to handle "%s" placeholder.

* jk/strbuf-addftime-seconds-since-epoch:
  strbuf_addftime(): handle "%s" manually
2021-12-02 13:29:49 -08:00
Junio C Hamano
bc756bc586 Merge branch 'js/ci-no-directional-formatting' into next
CI has been taught to catch some Unicode directional formatting
sequence that can be used in certain mischief.

* js/ci-no-directional-formatting:
  ci: disallow directional formatting
2021-12-02 13:29:48 -08:00
Junio C Hamano
43a5c1ec03 Merge branch 'jc/fix-first-object-walk' into next
Doc update.

* jc/fix-first-object-walk:
  docs: add headers in MyFirstObjectWalk
  docs: fix places that break compilation in MyFirstObjectWalk
2021-12-02 13:29:47 -08:00
Junio C Hamano
81213be9ac Merge branch 'if/redact-packfile-uri' into next
Redact the path part of packfile URI that appears in the trace output.

* if/redact-packfile-uri:
  http-fetch: redact url on die() message
  fetch-pack: redact packfile urls in traces
2021-12-02 13:29:46 -08:00
Junio C Hamano
f72204942f Merge branch 'ja/doc-cleanup' into next
Doc update.

* ja/doc-cleanup:
  init doc: --shared=0xxx does not give umask but perm bits
  doc: git-init: clarify file modes in octal.
  doc: git-http-push: describe the refs as pattern pairs
  doc: uniformize <URL> placeholders' case
  doc: use three dots for indicating repetition instead of star
  doc: git-ls-files: express options as optional alternatives
  doc: use only hyphens as word separators in placeholders
  doc: express grammar placeholders between angle brackets
  doc: split placeholders as individual tokens
  doc: fix git credential synopsis
2021-12-02 13:29:45 -08:00
Junio C Hamano
d7ea1696e5 Merge branch 'gc/remote-with-fewer-static-global-variables' into next
Code clean-up to eventually allow information on remotes defined
for an arbitrary repository to be read.

* gc/remote-with-fewer-static-global-variables:
  remote: die if branch is not found in repository
  remote: remove the_repository->remote_state from static methods
  remote: use remote_state parameter internally
  remote: move static variables into per-repository struct
  t5516: add test case for pushing remote refspecs
2021-12-02 13:29:44 -08:00