]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
2 years agoi18n: tag.c factorize i18n strings
Jean-Noël Avila [Wed, 5 Jan 2022 20:02:18 +0000 (20:02 +0000)] 
i18n: tag.c factorize i18n strings

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Reviewed-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agoi18n: standardize "cannot open" and "cannot read"
Jean-Noël Avila [Wed, 5 Jan 2022 20:02:17 +0000 (20:02 +0000)] 
i18n: standardize "cannot open" and "cannot read"

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Reviewed-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agoi18n: turn "options are incompatible" into "cannot be used together"
Jean-Noël Avila [Wed, 5 Jan 2022 20:02:16 +0000 (20:02 +0000)] 
i18n: turn "options are incompatible" into "cannot be used together"

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Reviewed-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agoi18n: refactor "%s, %s and %s are mutually exclusive"
Jean-Noël Avila [Wed, 5 Jan 2022 20:02:15 +0000 (20:02 +0000)] 
i18n: refactor "%s, %s and %s are mutually exclusive"

Use placeholders for constant tokens. The strings are turned into
"cannot be used together"

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Reviewed-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agoi18n: refactor "foo and bar are mutually exclusive"
Jean-Noël Avila [Wed, 5 Jan 2022 20:02:14 +0000 (20:02 +0000)] 
i18n: refactor "foo and bar are mutually exclusive"

Use static strings for constant parts of the sentences. They are all
turned into "cannot be used together".

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Reviewed-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agoThe fifth batch
Junio C Hamano [Thu, 23 Dec 2021 02:00:04 +0000 (18:00 -0800)] 
The fifth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agoMerge branch 'es/chainlint'
Junio C Hamano [Thu, 23 Dec 2021 06:48:11 +0000 (22:48 -0800)] 
Merge branch 'es/chainlint'

The chainlint test script linter in the test suite has been updated.

* es/chainlint:
  chainlint.sed: stop splitting "(..." into separate lines "(" and "..."
  chainlint.sed: swallow comments consistently
  chainlint.sed: stop throwing away here-doc tags
  chainlint.sed: don't mistake `<< word` in string as here-doc operator
  chainlint.sed: make here-doc "<<-" operator recognition more POSIX-like
  chainlint.sed: drop subshell-closing ">" annotation
  chainlint.sed: drop unnecessary distinction between ?!AMP?! and ?!SEMI?!
  chainlint.sed: tolerate harmless ";" at end of last line in block
  chainlint.sed: improve ?!SEMI?! placement accuracy
  chainlint.sed: improve ?!AMP?! placement accuracy
  t/Makefile: optimize chainlint self-test
  t/chainlint/one-liner: avoid overly intimate chainlint.sed knowledge
  t/chainlint/*.test: generalize self-test commentary
  t/chainlint/*.test: fix invalid test cases due to mixing quote types
  t/chainlint/*.test: don't use invalid shell syntax

2 years agoMerge branch 'jz/apply-quiet-and-allow-empty'
Junio C Hamano [Thu, 23 Dec 2021 06:48:11 +0000 (22:48 -0800)] 
Merge branch 'jz/apply-quiet-and-allow-empty'

"git apply" has been taught to ignore a message without a patch
with the "--allow-empty" option.  It also learned to honor the
"--quiet" option given from the command line.

* jz/apply-quiet-and-allow-empty:
  git-apply: add --allow-empty flag
  git-apply: add --quiet flag

2 years agoMerge branch 'jk/limit-developers-to-gnu99'
Junio C Hamano [Thu, 23 Dec 2021 06:48:11 +0000 (22:48 -0800)] 
Merge branch 'jk/limit-developers-to-gnu99'

Enable -std=gnu99 option in DEVELOPER builds.

* jk/limit-developers-to-gnu99:
  config.mak.dev: specify -std=gnu99 for gcc/clang

2 years agoMerge branch 'ab/common-main-cleanup'
Junio C Hamano [Thu, 23 Dec 2021 06:48:11 +0000 (22:48 -0800)] 
Merge branch 'ab/common-main-cleanup'

Code clean-up.

* ab/common-main-cleanup:
  common-main.c: call exit(), don't return

2 years agoMerge branch 'ab/fetch-set-upstream-while-detached'
Junio C Hamano [Thu, 23 Dec 2021 06:48:10 +0000 (22:48 -0800)] 
Merge branch 'ab/fetch-set-upstream-while-detached'

"git fetch --set-upstream" did not check if there is a current
branch, leading to a segfault when it is run on a detached HEAD,
which has been corrected.

* ab/fetch-set-upstream-while-detached:
  pull, fetch: fix segfault in --set-upstream option

2 years agoThe fourth batch
Junio C Hamano [Tue, 21 Dec 2021 23:03:23 +0000 (15:03 -0800)] 
The fourth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agoMerge branch 'js/scalar'
Junio C Hamano [Tue, 21 Dec 2021 23:03:17 +0000 (15:03 -0800)] 
Merge branch 'js/scalar'

Add pieces from "scalar" to contrib/.

* js/scalar:
  scalar: implement the `version` command
  scalar: implement the `delete` command
  scalar: teach 'reconfigure' to optionally handle all registered enlistments
  scalar: allow reconfiguring an existing enlistment
  scalar: implement the `run` command
  scalar: teach 'clone' to support the --single-branch option
  scalar: implement the `clone` subcommand
  scalar: implement 'scalar list'
  scalar: let 'unregister' handle a deleted enlistment directory gracefully
  scalar: 'unregister' stops background maintenance
  scalar: 'register' sets recommended config and starts maintenance
  scalar: create test infrastructure
  scalar: start documenting the command
  scalar: create a rudimentary executable
  scalar: add a README with a roadmap

2 years agoMerge branch 'ld/sparse-diff-blame'
Junio C Hamano [Tue, 21 Dec 2021 23:03:17 +0000 (15:03 -0800)] 
Merge branch 'ld/sparse-diff-blame'

Teach diff and blame to work well with sparse index.

* ld/sparse-diff-blame:
  blame: enable and test the sparse index
  diff: enable and test the sparse index
  diff: replace --staged with --cached in t1092 tests
  repo-settings: prepare_repo_settings only in git repos
  test-read-cache: set up repo after git directory
  commit-graph: return if there is no git directory
  git: ensure correct git directory setup with -h

2 years agoMerge branch 'en/name-rev-shorter-output'
Junio C Hamano [Tue, 21 Dec 2021 23:03:16 +0000 (15:03 -0800)] 
Merge branch 'en/name-rev-shorter-output'

"git name-rev" has been tweaked to give output that is shorter and
easier to understand.

* en/name-rev-shorter-output:
  name-rev: prefer shorter names over following merges

2 years agoMerge branch 'ak/protect-any-current-branch'
Junio C Hamano [Tue, 21 Dec 2021 23:03:16 +0000 (15:03 -0800)] 
Merge branch 'ak/protect-any-current-branch'

"git fetch" without the "--update-head-ok" option ought to protect
a checked out branch from getting updated, to prevent the working
tree that checks it out to go out of sync.  The code was written
before the use of "git worktree" got widespread, and only checked
the branch that was checked out in the current worktree, which has
been updated.
(originally called ak/fetch-not-overwrite-any-current-branch)

* ak/protect-any-current-branch:
  branch: protect branches checked out in all worktrees
  receive-pack: protect current branch for bare repository worktree
  receive-pack: clean dead code from update_worktree()
  fetch: protect branches checked out in all worktrees
  worktree: simplify find_shared_symref() memory ownership model
  branch: lowercase error messages
  receive-pack: lowercase error messages
  fetch: lowercase error messages

2 years agoMerge branch 'fs/ssh-signing-other-keytypes'
Junio C Hamano [Tue, 21 Dec 2021 23:03:16 +0000 (15:03 -0800)] 
Merge branch 'fs/ssh-signing-other-keytypes'

The cryptographic signing using ssh keys can specify literal keys
for keytypes whose name do not begin with the "ssh-" prefix by
using the "key::" prefix mechanism (e.g. "key::ecdsa-sha2-nistp256").

* fs/ssh-signing-other-keytypes:
  ssh signing: make sign/amend test more resilient
  ssh signing: support non ssh-* keytypes

2 years agoMerge branch 'fs/ssh-signing-key-lifetime'
Junio C Hamano [Tue, 21 Dec 2021 23:03:15 +0000 (15:03 -0800)] 
Merge branch 'fs/ssh-signing-key-lifetime'

Extend the signing of objects with SSH keys and learn to pay
attention to the key validity time range when verifying.

* fs/ssh-signing-key-lifetime:
  ssh signing: verify ssh-keygen in test prereq
  ssh signing: make fmt-merge-msg consider key lifetime
  ssh signing: make verify-tag consider key lifetime
  ssh signing: make git log verify key lifetime
  ssh signing: make verify-commit consider key lifetime
  ssh signing: add key lifetime test prereqs
  ssh signing: use sigc struct to pass payload
  t/fmt-merge-msg: make gpgssh tests more specific
  t/fmt-merge-msg: do not redirect stderr

2 years agoMerge branch 'jc/grep-patterntype-default-doc'
Junio C Hamano [Tue, 21 Dec 2021 23:03:15 +0000 (15:03 -0800)] 
Merge branch 'jc/grep-patterntype-default-doc'

Doc update.

* jc/grep-patterntype-default-doc:
  grep: clarify what `grep.patternType=default` means

2 years agoMerge branch 'jk/log-decorate-opts-with-implicit-decorate'
Junio C Hamano [Tue, 21 Dec 2021 23:03:15 +0000 (15:03 -0800)] 
Merge branch 'jk/log-decorate-opts-with-implicit-decorate'

When "git log" implicitly enabled the "decoration" processing
without being explicitly asked with "--decorate" option, it failed
to read and honor the settings given by the "--decorate-refs"
option.

* jk/log-decorate-opts-with-implicit-decorate:
  log: load decorations with --simplify-by-decoration
  log: handle --decorate-refs with userformat "%d"

2 years agoMerge branch 'en/rebase-x-wo-git-dir-env'
Junio C Hamano [Tue, 21 Dec 2021 23:03:15 +0000 (15:03 -0800)] 
Merge branch 'en/rebase-x-wo-git-dir-env'

"git rebase -x" by mistake started exporting the GIT_DIR and
GIT_WORK_TREE environment variables when the command was rewritten
in C, which has been corrected.

* en/rebase-x-wo-git-dir-env:
  sequencer: do not export GIT_DIR and GIT_WORK_TREE for 'exec'

2 years agoMerge branch 'jc/c99-var-decl-in-for-loop'
Junio C Hamano [Tue, 21 Dec 2021 23:03:15 +0000 (15:03 -0800)] 
Merge branch 'jc/c99-var-decl-in-for-loop'

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

2 years agoMerge branch 'pw/xdiff-classify-record-in-histogram'
Junio C Hamano [Tue, 21 Dec 2021 23:03:14 +0000 (15:03 -0800)] 
Merge branch 'pw/xdiff-classify-record-in-histogram'

"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
  xdiff: simplify comparison
  xdiff: avoid unnecessary memory allocations
  diff histogram: intern strings

2 years agoThe third batch
Junio C Hamano [Wed, 15 Dec 2021 17:40:11 +0000 (09:40 -0800)] 
The third batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agoMerge branch 'ab/die-with-bug'
Junio C Hamano [Wed, 15 Dec 2021 17:39:55 +0000 (09:39 -0800)] 
Merge branch 'ab/die-with-bug'

Code clean-up.

* ab/die-with-bug:
  object.c: use BUG(...) no die("BUG: ...") in lookup_object_by_type()
  pathspec: use BUG(...) not die("BUG:%s:%d....", <file>, <line>)
  strbuf.h: use BUG(...) not die("BUG: ...")
  pack-objects: use BUG(...) not die("BUG: ...")

2 years agoMerge branch 'hn/allow-bogus-oid-in-ref-tests'
Junio C Hamano [Wed, 15 Dec 2021 17:39:54 +0000 (09:39 -0800)] 
Merge branch 'hn/allow-bogus-oid-in-ref-tests'

The test helper for refs subsystem learned to write bogus and/or
nonexistent object name to refs to simulate error situations we
want to test Git in.

* hn/allow-bogus-oid-in-ref-tests:
  t1430: create valid symrefs using test-helper
  t1430: remove refs using test-tool
  refs: introduce REF_SKIP_REFNAME_VERIFICATION flag
  refs: introduce REF_SKIP_OID_VERIFICATION flag
  refs: update comment.
  test-ref-store: plug memory leak in cmd_delete_refs
  test-ref-store: parse symbolic flag constants
  test-ref-store: remove force-create argument for create-reflog

2 years agoMerge branch 'ab/parse-options-cleanup'
Junio C Hamano [Wed, 15 Dec 2021 17:39:54 +0000 (09:39 -0800)] 
Merge branch 'ab/parse-options-cleanup'

Change the type of an internal function to return an enum (instead
of int) and replace -2 that was used to signal an error with -1.

* ab/parse-options-cleanup:
  parse-options.c: use "enum parse_opt_result" for parse_nodash_opt()

2 years agoMerge branch 're/color-default-reset'
Junio C Hamano [Wed, 15 Dec 2021 17:39:53 +0000 (09:39 -0800)] 
Merge branch 're/color-default-reset'

"default" and "reset" colors have been added to our palette.

* re/color-default-reset:
  color: allow colors to be prefixed with "reset"
  color: support "default" to restore fg/bg color
  color: add missing GIT_COLOR_* white/black constants

2 years agoMerge branch 'jc/reflog-iterator-callback-doc'
Junio C Hamano [Wed, 15 Dec 2021 17:39:52 +0000 (09:39 -0800)] 
Merge branch 'jc/reflog-iterator-callback-doc'

Document the parameters given to the reflog entry iterator callback
functions.

* jc/reflog-iterator-callback-doc:
  refs: document callback for reflog-ent iterators

2 years agoMerge branch 'ew/test-wo-fsync'
Junio C Hamano [Wed, 15 Dec 2021 17:39:51 +0000 (09:39 -0800)] 
Merge branch 'ew/test-wo-fsync'

Allow running our tests while disabling fsync.

* ew/test-wo-fsync:
  tests: disable fsync everywhere

2 years agoMerge branch 'ew/cbtree-remove-unused-and-broken-cb-unlink'
Junio C Hamano [Wed, 15 Dec 2021 17:39:51 +0000 (09:39 -0800)] 
Merge branch 'ew/cbtree-remove-unused-and-broken-cb-unlink'

Code clean-up.

* ew/cbtree-remove-unused-and-broken-cb-unlink:
  cbtree: remove broken and unused cb_unlink

2 years agoMerge branch 'ds/sparse-deep-pattern-checkout-fix'
Junio C Hamano [Wed, 15 Dec 2021 17:39:50 +0000 (09:39 -0800)] 
Merge branch 'ds/sparse-deep-pattern-checkout-fix'

The sparse-index/sparse-checkout feature had a bug in its use of
the matching code to determine which path is in or outside the
sparse checkout patterns.

* ds/sparse-deep-pattern-checkout-fix:
  unpack-trees: use traverse_path instead of name
  t1092: add deeper changes during a checkout

2 years agoMerge branch 'tb/pack-revindex-on-disk-cleanup'
Junio C Hamano [Wed, 15 Dec 2021 17:39:50 +0000 (09:39 -0800)] 
Merge branch 'tb/pack-revindex-on-disk-cleanup'

Code clean-up.

* tb/pack-revindex-on-disk-cleanup:
  packfile: make `close_pack_revindex()` static

2 years agoMerge branch 'es/doc-stdout-vs-stderr'
Junio C Hamano [Wed, 15 Dec 2021 17:39:49 +0000 (09:39 -0800)] 
Merge branch 'es/doc-stdout-vs-stderr'

Coding guideline document has been updated to clarify what goes to
standard error in our system.

* es/doc-stdout-vs-stderr:
  CodingGuidelines: document which output goes to stdout vs. stderr

2 years agoMerge branch 'js/test-initial-branch-override-cleanup'
Junio C Hamano [Wed, 15 Dec 2021 17:39:49 +0000 (09:39 -0800)] 
Merge branch 'js/test-initial-branch-override-cleanup'

Many tests that used to need GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
mechanism to force "git" to use 'master' as the default name for
the initial branch no longer need it; the use of the mechanism from
them have been removed.

* js/test-initial-branch-override-cleanup:
  tests: set GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME only when needed

2 years agoMerge branch 'es/worktree-chatty-to-stderr'
Junio C Hamano [Wed, 15 Dec 2021 17:39:49 +0000 (09:39 -0800)] 
Merge branch 'es/worktree-chatty-to-stderr'

"git worktree add" showed "Preparing worktree" message to the
standard output stream, but when it failed, the message from die()
went to the standard error stream.  Depending on the order the
stdio streams are flushed at the program end, this resulted in
confusing output.  It has been corrected by sending all the chatty
messages to the standard error stream.

* es/worktree-chatty-to-stderr:
  git-worktree.txt: add missing `-v` to synopsis for `worktree list`
  worktree: send "chatty" messages to stderr

2 years agoMerge branch 'ab/ci-updates'
Junio C Hamano [Wed, 15 Dec 2021 17:39:49 +0000 (09:39 -0800)] 
Merge branch 'ab/ci-updates'

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

2 years agoMerge branch 'hn/reflog-tests'
Junio C Hamano [Wed, 15 Dec 2021 17:39:48 +0000 (09:39 -0800)] 
Merge branch 'hn/reflog-tests'

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

2 years agoMerge branch 'rj/receive-pack-avoid-sigpipe-during-status-reporting'
Junio C Hamano [Wed, 15 Dec 2021 17:39:48 +0000 (09:39 -0800)] 
Merge branch 'rj/receive-pack-avoid-sigpipe-during-status-reporting'

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

2 years agoMerge branch 'es/pretty-describe-more'
Junio C Hamano [Wed, 15 Dec 2021 17:39:48 +0000 (09:39 -0800)] 
Merge branch 'es/pretty-describe-more'

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

2 years agoMerge branch 'ab/run-command'
Junio C Hamano [Wed, 15 Dec 2021 17:39:47 +0000 (09:39 -0800)] 
Merge branch 'ab/run-command'

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

2 years agoMerge branch 'hn/t1404-df-limitation-is-ref-files-only'
Junio C Hamano [Wed, 15 Dec 2021 17:39:47 +0000 (09:39 -0800)] 
Merge branch 'hn/t1404-df-limitation-is-ref-files-only'

Test update.

* hn/t1404-df-limitation-is-ref-files-only:
  t1404: mark directory/file conflict tests with REFFILES

2 years agoMerge branch 'en/zdiff3'
Junio C Hamano [Wed, 15 Dec 2021 17:39:47 +0000 (09:39 -0800)] 
Merge branch 'en/zdiff3'

"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"

2 years agoMerge branch 'ds/trace2-regions-in-tests'
Junio C Hamano [Wed, 15 Dec 2021 17:39:46 +0000 (09:39 -0800)] 
Merge branch 'ds/trace2-regions-in-tests'

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

2 years agoMerge branch 'fs/test-prereq'
Junio C Hamano [Wed, 15 Dec 2021 17:39:46 +0000 (09:39 -0800)] 
Merge branch 'fs/test-prereq'

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

2 years agoMerge branch 'ab/mark-leak-free-tests-even-more'
Junio C Hamano [Wed, 15 Dec 2021 17:39:46 +0000 (09:39 -0800)] 
Merge branch 'ab/mark-leak-free-tests-even-more'

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

2 years agoMerge branch 'hn/reftable'
Junio C Hamano [Wed, 15 Dec 2021 17:39:45 +0000 (09:39 -0800)] 
Merge branch 'hn/reftable'

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

2 years agogit-apply: add --allow-empty flag
Jerry Zhang [Mon, 13 Dec 2021 22:03:27 +0000 (14:03 -0800)] 
git-apply: add --allow-empty flag

Some users or scripts will pipe "git diff"
output to "git apply" when replaying diffs
or commits. In these cases, they will rely
on the return value of "git apply" to know
whether the diff was applied successfully.

However, for empty commits, "git apply" will
fail. This complicates scripts since they
have to either buffer the diff and check
its length, or run diff again with "exit-code",
essentially doing the diff twice.

Add the "--allow-empty" flag to "git apply"
which allows it to handle both empty diffs
and empty commits created by "git format-patch
--always" by doing nothing and returning 0.

Add tests for both with and without --allow-empty.

Signed-off-by: Jerry Zhang <jerry@skydio.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agogit-apply: add --quiet flag
Jerry Zhang [Mon, 13 Dec 2021 22:03:26 +0000 (14:03 -0800)] 
git-apply: add --quiet flag

Replace OPT_VERBOSE with OPT_VERBOSITY.

This adds a --quiet flag to "git apply" so
the user can turn down the verbosity.

Signed-off-by: Jerry Zhang <jerry@skydio.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agochainlint.sed: stop splitting "(..." into separate lines "(" and "..."
Eric Sunshine [Mon, 13 Dec 2021 06:30:59 +0000 (01:30 -0500)] 
chainlint.sed: stop splitting "(..." into separate lines "(" and "..."

Because `sed` is line-oriented, for ease of implementation, when
chainlint.sed encounters an opening subshell in which the first command
is cuddled with the "(", it splits the line into two lines: one
containing only "(", and the other containing whatever follows "(".
This allows chainlint.sed to get by with a single set of regular
expressions for matching shell statements rather than having to
duplicate each expression (one set for matching non-cuddled statements,
and one set for matching cuddled statements).

However, although syntactically and semantically immaterial, this
transformation has no value to test authors and might even confuse them
into thinking that the linter is misbehaving by inserting (whitespace)
line-noise into the shell code it is validating. Moreover, it also
allows an implementation detail of chainlint.sed to seep into the
chainlint self-test "expect" files, which potentially makes it difficult
to reuse the self-tests should a more capable chainlint ever be
developed.

To address these concerns, stop splitting cuddled "(..." into two lines.

Note that, as an implementation artifact, due to sed's line-oriented
nature, this change inserts a blank line at output time just before the
"(..." line is emitted. It would be possible to suppress this blank line
but doing so would add a fair bit of complexity to chainlint.sed.
Therefore, rather than suppressing the extra blank line, the Makefile's
`check-chainlint` target which runs the chainlint self-tests is instead
modified to ignore blank lines when comparing chainlint output against
the self-test "expect" output. This is a reasonable compromise for two
reasons. First, the purpose of the chainlint self-tests is to verify
that the ?!AMP?! annotations are being correctly added; precise
whitespace is immaterial. Second, by necessity, chainlint.sed itself
already throws away all blank lines within subshells since, when
checking for a broken &&-chain, it needs to check the final _statement_
in a subshell, not the final _line_ (which might be blank), thus it has
never made any attempt to precisely reproduce blank lines in its output.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agochainlint.sed: swallow comments consistently
Eric Sunshine [Mon, 13 Dec 2021 06:30:58 +0000 (01:30 -0500)] 
chainlint.sed: swallow comments consistently

When checking for broken a &&-chain, chainlint.sed knows that the final
statement in a subshell should not end with `&&`, so it takes care to
make a distinction between the final line which is an actual statement
and any lines which may be mere comments preceding the closing ')'. As
such, it swallows comment lines so that they do not interfere with the
&&-chain check.

However, since `sed` does not provide any sort of real recursion,
chainlint.sed only checks &&-chains in subshells one level deep; it
doesn't do any checking in deeper subshells or in `{...}` blocks within
subshells. Furthermore, on account of potential implementation
complexity, it doesn't check &&-chains within `case` arms.

Due to an oversight, it also doesn't swallow comments inside deep
subshells, `{...}` blocks, or `case` statements, which makes its output
inconsistent (swallowing comments in some cases but not others).
Unfortunately, this inconsistency seeps into the chainlint self-test
"expect" files, which potentially makes it difficult to reuse the
self-tests should a more capable chainlint ever be developed. Therefore,
teach chainlint.sed to consistently swallow comments in all cases.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agochainlint.sed: stop throwing away here-doc tags
Eric Sunshine [Mon, 13 Dec 2021 06:30:57 +0000 (01:30 -0500)] 
chainlint.sed: stop throwing away here-doc tags

The purpose of chainlint is to highlight problems it finds in test code
by inserting annotations at the location of each problem. Arbitrarily
eliding bits of the code it is checking is not helpful, yet this is
exactly what chainlint.sed does by cavalierly and unnecessarily dropping
the here-doc operator and tag; i.e. `cat <<TAG` becomes simply `cat` in
the output. This behavior can make it more difficult for the test writer
to align the annotated output of chainlint.sed with the original test
code. Address this by retaining here-doc tags.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agochainlint.sed: don't mistake `<< word` in string as here-doc operator
Eric Sunshine [Mon, 13 Dec 2021 06:30:56 +0000 (01:30 -0500)] 
chainlint.sed: don't mistake `<< word` in string as here-doc operator

Tighten here-doc recognition to prevent it from being fooled by text
which looks like a here-doc operator but happens merely to be the
content of a string, such as this real-world case from t7201:

    echo "<<<<<<< ours" &&
    echo ourside &&
    echo "=======" &&
    echo theirside &&
    echo ">>>>>>> theirs"

This problem went unnoticed because chainlint.sed is not a real parser,
but rather applies heuristics to pretend to understand shell code. In
this case, it saw what it thought was a here-doc operator (`<< ours`),
and fell off the end of the test looking for the closing tag "ours"
which it never found, thus swallowed the remainder of the test without
checking it for &&-chain breakage.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agochainlint.sed: make here-doc "<<-" operator recognition more POSIX-like
Eric Sunshine [Mon, 13 Dec 2021 06:30:55 +0000 (01:30 -0500)] 
chainlint.sed: make here-doc "<<-" operator recognition more POSIX-like

According to POSIX, "<<" and "<<-" are distinct shell operators. For the
latter to be recognized, no whitespace is allowed before the "-", though
whitespace is allowed after the operator. However, the chainlint
patterns which identify here-docs are both too loose and too tight,
incorrectly allowing whitespace between "<<" and "-" but disallowing it
between "-" and the here-doc tag. Fix the patterns to better match
POSIX.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agochainlint.sed: drop subshell-closing ">" annotation
Eric Sunshine [Mon, 13 Dec 2021 06:30:54 +0000 (01:30 -0500)] 
chainlint.sed: drop subshell-closing ">" annotation

chainlint.sed inserts a ">" annotation at the beginning of a line to
signal that its heuristics have identified an end-of-subshell. This was
useful as a debugging aid during development of the script, but it has
no value to test writers and might even confuse them into thinking that
the linter is misbehaving by inserting line-noise into the shell code it
is validating. Moreover, its presence also potentially makes it
difficult to reuse the chainlint self-test "expect" output should a more
capable linter ever be developed. Therefore, drop the ">" annotation.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agochainlint.sed: drop unnecessary distinction between ?!AMP?! and ?!SEMI?!
Eric Sunshine [Mon, 13 Dec 2021 06:30:53 +0000 (01:30 -0500)] 
chainlint.sed: drop unnecessary distinction between ?!AMP?! and ?!SEMI?!

>From inception, when chainlint.sed encountered a line using semicolon to
separate commands rather than `&&`, it would insert a ?!SEMI?!
annotation at the beginning of the line rather ?!AMP?! even though the
&&-chain is also broken by the semicolon. Given a line such as:

    ?!SEMI?! cmd1; cmd2 &&

the ?!SEMI?! annotation makes it easier to see what the problem is than
if the output had been:

    ?!AMP?! cmd1; cmd2 &&

which might confuse the test author into thinking that the linter is
broken (since the line clearly ends with `&&`).

However, now that the ?!AMP?! an ?!SEMI?! annotations are inserted at
the point of breakage rather than at the beginning of the line, and
taking into account that both represent a broken &&-chain, there is
little reason to distinguish between the two. Using ?!AMP?! alone is
sufficient to point the test author at the problem. For instance, in:

    cmd1; ?!AMP?! cmd2 &&
    cmd3

it is clear that the &&-chain is broken between `cmd1` and `cmd2`.
Likewise, in:

    cmd1 && cmd2 ?!AMP?!
    cmd3

it is clear that the &&-chain is broken between `cmd2` and `cmd3`.
Finally, in:

    cmd1; ?!AMP?! cmd2 ?!AMP?!
    cmd3

it is clear that the &&-chain is broken between each command.

Hence, there is no longer a good reason to make a distinction between a
broken &&-chain due to a semicolon and a broken chain due to a missing
`&&` at end-of-line. Therefore, drop the ?!SEMI?! annotation and use
?!AMP?! exclusively.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agochainlint.sed: tolerate harmless ";" at end of last line in block
Eric Sunshine [Mon, 13 Dec 2021 06:30:52 +0000 (01:30 -0500)] 
chainlint.sed: tolerate harmless ";" at end of last line in block

chainlint.sed flags ";" when used as a command terminator since it
breaks the &&-chain, thus can allow failures to go undetected. However,
when a command terminated by ";" is the last command in the body of a
compound statement, such as `command-2` in:

    if test $# -gt 1
    then
        command-1 &&
        command-2;
    fi

then the ";" is harmless and the exit code from `command-2` is passed
through untouched and becomes the exit code of the compound statement,
as if the ";" was not present. Therefore, tolerate a trailing ";" in
this position rather than complaining about broken &&-chain.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agochainlint.sed: improve ?!SEMI?! placement accuracy
Eric Sunshine [Mon, 13 Dec 2021 06:30:51 +0000 (01:30 -0500)] 
chainlint.sed: improve ?!SEMI?! placement accuracy

When chainlint.sed detects commands separated by a semicolon rather than
by `&&`, it places a ?!SEMI?! annotation at the beginning of the line.
However, this is an unusual location for programmers accustomed to error
messages (from compilers, for instance) indicating the exact point of
the problem. Therefore, relocate the ?!SEMI?! annotation to the location
of the semicolon in order to better direct the programmer's attention to
the source of the problem.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agochainlint.sed: improve ?!AMP?! placement accuracy
Eric Sunshine [Mon, 13 Dec 2021 06:30:50 +0000 (01:30 -0500)] 
chainlint.sed: improve ?!AMP?! placement accuracy

When chainlint.sed detects a broken &&-chain, it places an ?!AMP?!
annotation at the beginning of the line. However, this is an unusual
location for programmers accustomed to error messages (from compilers,
for instance) indicating the exact point of the problem. Therefore,
relocate the ?!AMP?! annotation to the end of the line in order to
better direct the programmer's attention to the source of the problem.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agot/Makefile: optimize chainlint self-test
Eric Sunshine [Mon, 13 Dec 2021 06:30:49 +0000 (01:30 -0500)] 
t/Makefile: optimize chainlint self-test

Rather than running `chainlint` and `diff` once per self-test -- which
may become expensive as more tests are added -- instead run `chainlint`
a single time over all tests bodies collectively and compare the result
to the collective "expected" output.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agot/chainlint/one-liner: avoid overly intimate chainlint.sed knowledge
Eric Sunshine [Mon, 13 Dec 2021 06:30:48 +0000 (01:30 -0500)] 
t/chainlint/one-liner: avoid overly intimate chainlint.sed knowledge

The purpose of chainlint.sed is to detect &&-chain breakage only within
subshells (one level deep); it doesn't bother checking for top-level
&&-chain breakage since the &&-chain checker built into t/test-lib.sh
should detect broken &&-chains outside of subshells by making them
magically exit with code 117.

Unfortunately, one of the chainlint.sed self-tests has overly intimate
knowledge of this particular division of responsibilities and only cares
about what chainlint.sed itself will produce, while ignoring the fact
that a more all-encompassing linter would complain about a broken
&&-chain outside the subshell. This makes it difficult to re-use the
test with a more capable chainlint implementation should one ever be
developed. Therefore, adjust the test and its "expected" output to
avoid being specific to the tunnel-vision of this one implementation.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agot/chainlint/*.test: generalize self-test commentary
Eric Sunshine [Mon, 13 Dec 2021 06:30:47 +0000 (01:30 -0500)] 
t/chainlint/*.test: generalize self-test commentary

The purpose of chainlint.sed is to detect &&-chain breakage only within
subshells (one level deep); it doesn't bother checking for top-level
&&-chain breakage since the &&-chain checker built into t/test-lib.sh
should detect broken &&-chains outside of subshells by making them
magically exit with code 117. However, this division of labor may not
always be the case if a more capable chainlint implementation is ever
developed. Beyond that, due to being sed-based and due to its use of
heuristics, chainlint.sed has several limitations (such as being unable
to detect &&-chain breakage in subshells more than one level deep since
it only manually emulates recursion into a subshell).

Some of the comments in the chainlint self-tests unnecessarily reflect
the limitations of chainlint.sed even though those limitations are not
what is being tested. Therefore, simplify and generalize the comments to
explain only what is being tested, thus ensuring that they won't become
outdated if a more capable chainlint is ever developed.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agot/chainlint/*.test: fix invalid test cases due to mixing quote types
Eric Sunshine [Mon, 13 Dec 2021 06:30:46 +0000 (01:30 -0500)] 
t/chainlint/*.test: fix invalid test cases due to mixing quote types

The chainlint self-test code snippets are supposed to represent the body
of a test_expect_success() or test_expect_failure(), yet the contents of
a few tests would have caused the shell to report syntax errors had they
been real test bodies due to the mix of single- and double-quotes.
Although chainlint.sed, with its simplistic heuristics, is blind to this
problem, a future more robust chainlint implementation might not have
such a limitation. Therefore, stop mixing quote types haphazardly in
those tests and unify quoting throughout. While at it, drop chunks of
tests which merely repeat what is already tested elsewhere but with
alternative quotes.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agot/chainlint/*.test: don't use invalid shell syntax
Eric Sunshine [Mon, 13 Dec 2021 06:30:45 +0000 (01:30 -0500)] 
t/chainlint/*.test: don't use invalid shell syntax

The chainlint self-test code snippets are supposed to represent the body
of a test_expect_success() or test_expect_failure(), yet the contents of
these tests would have caused the shell to report syntax errors had they
been real test bodies. Although chainlint.sed, with its simplistic
heuristics, is blind to these syntactic problems, a future more robust
chainlint implementation might not have such a limitation, so make these
snippets syntactically valid.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 years agoThe second batch
Junio C Hamano [Fri, 10 Dec 2021 22:28:28 +0000 (14:28 -0800)] 
The second batch

2 years agoMerge branch 'en/rebase-x-fix'
Junio C Hamano [Fri, 10 Dec 2021 22:35:16 +0000 (14:35 -0800)] 
Merge branch 'en/rebase-x-fix'

"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

2 years agoMerge branch 'cb/add-p-single-key-fix'
Junio C Hamano [Fri, 10 Dec 2021 22:35:16 +0000 (14:35 -0800)] 
Merge branch 'cb/add-p-single-key-fix'

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

2 years agoMerge branch 'cb/mingw-gmtime-r'
Junio C Hamano [Fri, 10 Dec 2021 22:35:15 +0000 (14:35 -0800)] 
Merge branch 'cb/mingw-gmtime-r'

Build fix on Windows.

* cb/mingw-gmtime-r:
  mingw: avoid fallback for {local,gm}time_r()

2 years agoMerge branch 'yn/complete-date-format-options'
Junio C Hamano [Fri, 10 Dec 2021 22:35:15 +0000 (14:35 -0800)] 
Merge branch 'yn/complete-date-format-options'

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

2 years agoMerge branch 'em/missing-pager'
Junio C Hamano [Fri, 10 Dec 2021 22:35:15 +0000 (14:35 -0800)] 
Merge branch 'em/missing-pager'

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

2 years agoMerge branch 'mp/absorb-submodule-git-dir-upon-deinit'
Junio C Hamano [Fri, 10 Dec 2021 22:35:15 +0000 (14:35 -0800)] 
Merge branch 'mp/absorb-submodule-git-dir-upon-deinit'

"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

2 years agoMerge branch 'bc/require-c99'
Junio C Hamano [Fri, 10 Dec 2021 22:35:14 +0000 (14:35 -0800)] 
Merge branch 'bc/require-c99'

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

2 years agoMerge branch 'hn/create-reflog-simplify'
Junio C Hamano [Fri, 10 Dec 2021 22:35:13 +0000 (14:35 -0800)] 
Merge branch 'hn/create-reflog-simplify'

A small simplification of API.

* hn/create-reflog-simplify:
  refs: drop force_create argument of create_reflog API

2 years agoMerge branch 'jt/midx-doc-fix'
Junio C Hamano [Fri, 10 Dec 2021 22:35:13 +0000 (14:35 -0800)] 
Merge branch 'jt/midx-doc-fix'

Docfix.

* jt/midx-doc-fix:
  Doc: no midx and partial clone relation

2 years agoMerge branch 'jk/t7006-sigpipe-tests-fix'
Junio C Hamano [Fri, 10 Dec 2021 22:35:13 +0000 (14:35 -0800)] 
Merge branch 'jk/t7006-sigpipe-tests-fix'

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()

2 years agoMerge branch 'jk/refs-g11-workaround'
Junio C Hamano [Fri, 10 Dec 2021 22:35:12 +0000 (14:35 -0800)] 
Merge branch 'jk/refs-g11-workaround'

Workaround for a false-alarm by gcc-11

* jk/refs-g11-workaround:
  refs: work around gcc-11 warning with REF_HAVE_NEW

2 years agoMerge branch 'jk/fetch-pack-avoid-sigpipe-to-index-pack'
Junio C Hamano [Fri, 10 Dec 2021 22:35:12 +0000 (14:35 -0800)] 
Merge branch 'jk/fetch-pack-avoid-sigpipe-to-index-pack'

"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

2 years agoMerge branch 'hk/ci-checkwhitespace-commentfix'
Junio C Hamano [Fri, 10 Dec 2021 22:35:12 +0000 (14:35 -0800)] 
Merge branch 'hk/ci-checkwhitespace-commentfix'

Comment fix.

* hk/ci-checkwhitespace-commentfix:
  ci(check-whitespace): update stale file top comments

2 years agoMerge branch 'vd/sparse-reset'
Junio C Hamano [Fri, 10 Dec 2021 22:35:12 +0000 (14:35 -0800)] 
Merge branch 'vd/sparse-reset'

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

2 years agoMerge branch 'tl/midx-docfix'
Junio C Hamano [Fri, 10 Dec 2021 22:35:11 +0000 (14:35 -0800)] 
Merge branch 'tl/midx-docfix'

Doc mark-up fix.

* tl/midx-docfix:
  midx: fix a formatting issue in "multi-pack-index.txt"

2 years agoMerge branch 'po/size-t-for-vs'
Junio C Hamano [Fri, 10 Dec 2021 22:35:10 +0000 (14:35 -0800)] 
Merge branch 'po/size-t-for-vs'

On platforms where ulong is shorter than size_t, code paths that
shifted 1 or 1U to the left lacked the necessary cast to size_t,
which have been corrected.

* 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

2 years agoMerge branch 'rs/mergesort'
Junio C Hamano [Fri, 10 Dec 2021 22:35:10 +0000 (14:35 -0800)] 
Merge branch 'rs/mergesort'

Bitop fix for platforms whose "long" is 32-bit.

* rs/mergesort:
  mergesort: avoid left shift overflow

2 years agoMerge branch 'ah/advice-pull-has-no-preference-between-rebase-and-merge'
Junio C Hamano [Fri, 10 Dec 2021 22:35:09 +0000 (14:35 -0800)] 
Merge branch 'ah/advice-pull-has-no-preference-between-rebase-and-merge'

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"

2 years agoMerge branch 'ab/checkout-branch-info-leakfix'
Junio C Hamano [Fri, 10 Dec 2021 22:35:09 +0000 (14:35 -0800)] 
Merge branch 'ab/checkout-branch-info-leakfix'

Leakfix.

* ab/checkout-branch-info-leakfix:
  checkout: fix "branch info" memory leaks

2 years agoMerge branch 'jk/t5319-midx-corruption-test-deflake'
Junio C Hamano [Fri, 10 Dec 2021 22:35:08 +0000 (14:35 -0800)] 
Merge branch 'jk/t5319-midx-corruption-test-deflake'

Test fix.

* jk/t5319-midx-corruption-test-deflake:
  t5319: corrupt more bytes of the midx checksum

2 years agoMerge branch 'js/trace2-avoid-recursive-errors'
Junio C Hamano [Fri, 10 Dec 2021 22:35:08 +0000 (14:35 -0800)] 
Merge branch 'js/trace2-avoid-recursive-errors'

trace2 error code path fix.

* js/trace2-avoid-recursive-errors:
  trace2: disable tr2_dst before warning on write errors

2 years agoMerge branch 'jt/pack-header-lshift-overflow'
Junio C Hamano [Fri, 10 Dec 2021 22:35:08 +0000 (14:35 -0800)] 
Merge branch 'jt/pack-header-lshift-overflow'

The code to decode the length of packed object size has been
corrected.

* jt/pack-header-lshift-overflow:
  packfile: avoid overflowing shift during decode

2 years agoMerge branch 'jk/jump-merge-with-pathspec'
Junio C Hamano [Fri, 10 Dec 2021 22:35:08 +0000 (14:35 -0800)] 
Merge branch 'jk/jump-merge-with-pathspec'

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

2 years agoMerge branch 'jk/test-bitmap-fix'
Junio C Hamano [Fri, 10 Dec 2021 22:35:08 +0000 (14:35 -0800)] 
Merge branch 'jk/test-bitmap-fix'

Tighten code for testing pack-bitmap.

* jk/test-bitmap-fix:
  test_bitmap_hashes(): handle repository without bitmaps

2 years agoMerge branch 'ab/generate-command-list'
Junio C Hamano [Fri, 10 Dec 2021 22:35:08 +0000 (14:35 -0800)] 
Merge branch 'ab/generate-command-list'

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"

2 years agoMerge branch 'tw/var-default-branch'
Junio C Hamano [Fri, 10 Dec 2021 22:35:07 +0000 (14:35 -0800)] 
Merge branch 'tw/var-default-branch'

"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

2 years agoMerge branch 'jk/strbuf-addftime-seconds-since-epoch'
Junio C Hamano [Fri, 10 Dec 2021 22:35:07 +0000 (14:35 -0800)] 
Merge branch 'jk/strbuf-addftime-seconds-since-epoch'

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

2 years agoMerge branch 'js/ci-no-directional-formatting'
Junio C Hamano [Fri, 10 Dec 2021 22:35:06 +0000 (14:35 -0800)] 
Merge branch 'js/ci-no-directional-formatting'

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

2 years agoMerge branch 'jc/fix-first-object-walk'
Junio C Hamano [Fri, 10 Dec 2021 22:35:05 +0000 (14:35 -0800)] 
Merge branch 'jc/fix-first-object-walk'

Doc update.

* jc/fix-first-object-walk:
  docs: add headers in MyFirstObjectWalk
  docs: fix places that break compilation in MyFirstObjectWalk

2 years agoMerge branch 'if/redact-packfile-uri'
Junio C Hamano [Fri, 10 Dec 2021 22:35:04 +0000 (14:35 -0800)] 
Merge branch 'if/redact-packfile-uri'

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

2 years agoMerge branch 'ja/doc-cleanup'
Junio C Hamano [Fri, 10 Dec 2021 22:35:03 +0000 (14:35 -0800)] 
Merge branch 'ja/doc-cleanup'

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

2 years agoMerge branch 'gc/remote-with-fewer-static-global-variables'
Junio C Hamano [Fri, 10 Dec 2021 22:35:02 +0000 (14:35 -0800)] 
Merge branch 'gc/remote-with-fewer-static-global-variables'

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

2 years agoMerge branch 'vd/sparse-sparsity-fix-on-read'
Junio C Hamano [Fri, 10 Dec 2021 22:35:01 +0000 (14:35 -0800)] 
Merge branch 'vd/sparse-sparsity-fix-on-read'

Ensure that the sparseness of the in-core index matches the
index.sparse configuration specified by the repository immediately
after the on-disk index file is read.

* vd/sparse-sparsity-fix-on-read:
  sparse-index: update do_read_index to ensure correct sparsity
  sparse-index: add ensure_correct_sparsity function
  sparse-index: avoid unnecessary cache tree clearing
  test-read-cache.c: prepare_repo_settings after config init

2 years agoMerge branch 'cw/protocol-v2-doc-fix'
Junio C Hamano [Fri, 10 Dec 2021 22:35:00 +0000 (14:35 -0800)] 
Merge branch 'cw/protocol-v2-doc-fix'

Doc update.

* cw/protocol-v2-doc-fix:
  protocol-v2.txt: align delim-pkt spec with usage

2 years agossh signing: verify ssh-keygen in test prereq
Fabian Stelzer [Thu, 9 Dec 2021 08:52:49 +0000 (09:52 +0100)] 
ssh signing: verify ssh-keygen in test prereq

Do a full ssh signing, find-principals and verify operation in the test
prereq's to make sure ssh-keygen works as expected. Only generating the
keys and verifying its presence is not sufficient in some situations.
One example was ssh-keygen creating unusable ssh keys in cygwin because
of unsafe default permissions for the key files. The other a broken
openssh 8.7 that segfaulted on any find-principals operation. This
extended prereq check avoids future test breakages in case ssh-keygen or
any environment behaviour changes.

Signed-off-by: Fabian Stelzer <fs@gigacodes.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>