Commit graph

58796 commits

Author SHA1 Message Date
Junio C Hamano 7ae7e234c7 The fifth batch for 2.26
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-14 12:54:24 -08:00
Junio C Hamano 53c3be2c29 Merge branch 'tb/commit-graph-object-dir'
The code to compute the commit-graph has been taught to use a more
robust way to tell if two object directories refer to the same
thing.

* tb/commit-graph-object-dir:
  commit-graph.h: use odb in 'load_commit_graph_one_fd_st'
  commit-graph.c: remove path normalization, comparison
  commit-graph.h: store object directory in 'struct commit_graph'
  commit-graph.h: store an odb in 'struct write_commit_graph_context'
  t5318: don't pass non-object directory to '--object-dir'
2020-02-14 12:54:24 -08:00
Junio C Hamano 7b029ebaef Merge branch 'jk/index-pack-dupfix'
The index-pack code now diagnoses a bad input packstream that
records the same object twice when it is used as delta base; the
code used to declare a software bug when encountering such an
input, but it is an input error.

* jk/index-pack-dupfix:
  index-pack: downgrade twice-resolved REF_DELTA to die()
2020-02-14 12:54:24 -08:00
Junio C Hamano aa21cc97bd Merge branch 'jk/alloc-cleanups'
Misc code clean-ups.

* jk/alloc-cleanups:
  tree-walk.c: break circular dependency with unpack-trees
  traverse_trees(): use stack array for name entries
  walker_fetch(): avoid raw array length computation
  normalize_path_copy(): document "dst" size expectations
2020-02-14 12:54:23 -08:00
Junio C Hamano 883326077a Merge branch 'jh/notes-fanout-fix'
The code to automatically shrink the fan-out in the notes tree had
an off-by-one bug, which has been killed.

* jh/notes-fanout-fix:
  notes.c: fix off-by-one error when decreasing notes fanout
  t3305: check notes fanout more carefully and robustly
2020-02-14 12:54:23 -08:00
Junio C Hamano f2dcfcc21d Merge branch 'pk/status-of-uncloned-submodule'
The way "git submodule status" reports an initialized but not yet
populated submodule has not been reimplemented correctly when a
part of the "git submodule" command was rewritten in C, which has
been corrected.

* pk/status-of-uncloned-submodule:
  t7400: testcase for submodule status on unregistered inner git repos
  submodule: fix status of initialized but not cloned submodules
  t7400: add a testcase for submodule status on empty dirs
2020-02-14 12:54:23 -08:00
Junio C Hamano 78e67cda42 Merge branch 'mt/use-passed-repo-more-in-funcs'
Some codepaths were given a repository instance as a parameter to
work in the repository, but passed the_repository instance to its
callees, which has been cleaned up (somewhat).

* mt/use-passed-repo-more-in-funcs:
  sha1-file: allow check_object_signature() to handle any repo
  sha1-file: pass git_hash_algo to hash_object_file()
  sha1-file: pass git_hash_algo to write_object_file_prepare()
  streaming: allow open_istream() to handle any repo
  pack-check: use given repo's hash_algo at verify_packfile()
  cache-tree: use given repo's hash_algo at verify_one()
  diff: make diff_populate_filespec() honor its repo argument
2020-02-14 12:54:22 -08:00
Junio C Hamano df04a31617 Merge branch 'jk/diff-honor-wserrhighlight-in-plumbing'
The diff-* plumbing family of subcommands now pay attention to the
diff.wsErrorHighlight configuration, which has been ignored before;
this allows "git add -p" to also show the whitespace problems to
the end user.

* jk/diff-honor-wserrhighlight-in-plumbing:
  diff: move diff.wsErrorHighlight to "basic" config
2020-02-14 12:54:22 -08:00
Junio C Hamano 433b8aac2e Merge branch 'ds/sparse-checkout-harden'
Some rough edges in the sparse-checkout feature, especially around
the cone mode, have been cleaned up.

* ds/sparse-checkout-harden:
  sparse-checkout: fix cone mode behavior mismatch
  sparse-checkout: improve docs around 'set' in cone mode
  sparse-checkout: escape all glob characters on write
  sparse-checkout: use C-style quotes in 'list' subcommand
  sparse-checkout: unquote C-style strings over --stdin
  sparse-checkout: write escaped patterns in cone mode
  sparse-checkout: properly match escaped characters
  sparse-checkout: warn on globs in cone patterns
  sparse-checkout: detect short patterns
  sparse-checkout: cone mode does not recognize "**"
  sparse-checkout: fix documentation typo for core.sparseCheckoutCone
  clone: fix --sparse option with URLs
  sparse-checkout: create leading directories
  t1091: improve here-docs
  t1091: use check_files to reduce boilerplate
2020-02-14 12:54:22 -08:00
Junio C Hamano 4a77434bc8 Merge branch 'ld/p4-cleanup-processes'
p4 updates.

* ld/p4-cleanup-processes:
  git-p4: avoid leak of file handle when cloning
  git-p4: check for access to remote host earlier
  git-p4: cleanup better on error exit
  git-p4: create helper function importRevisions()
  git-p4: disable some pylint warnings, to get pylint output to something manageable
  git-p4: add P4CommandException to report errors talking to Perforce
  git-p4: make closeStreams() idempotent
2020-02-14 12:54:22 -08:00
Junio C Hamano 8fb3945037 Merge branch 'jt/connectivity-check-optim-in-partial-clone'
Unneeded connectivity check is now disabled in a partial clone when
fetching into it.

* jt/connectivity-check-optim-in-partial-clone:
  fetch: forgo full connectivity check if --filter
  connected: verify promisor-ness of partial clone
2020-02-14 12:54:21 -08:00
Junio C Hamano 09e48400a3 Merge branch 'jk/get-oid-error-message-i18n'
A low-level API function get_oid(), that accepts various ways to
name an object, used to issue end-user facing error messages
without l10n, which has been updated to be translatable.

* jk/get-oid-error-message-i18n:
  sha1-name: mark get_oid() error messages for translation
  t1506: drop space after redirection operator
  t1400: avoid "test" string comparisons
2020-02-14 12:54:21 -08:00
Junio C Hamano 4dbeecba27 Merge branch 'ag/edit-todo-drop-check'
Allow the rebase.missingCommitsCheck configuration to kick in when
"rebase --edit-todo" and "rebase --continue" restarts the procedure.

* ag/edit-todo-drop-check:
  rebase-interactive: warn if commit is dropped with `rebase --edit-todo'
  sequencer: move check_todo_list_from_file() to rebase-interactive.c
2020-02-14 12:54:21 -08:00
Junio C Hamano f7f43afb19 Merge branch 'dl/test-must-fail-fixes-2'
Test updates.

* dl/test-must-fail-fixes-2:
  t4124: only mark git command with test_must_fail
  t3507: use test_path_is_missing()
  t3507: fix indentation
  t3504: do check for conflict marker after failed cherry-pick
  t3419: stop losing return code of git command
  t3415: increase granularity of test_auto_{fixup,squash}()
  t3415: stop losing return codes of git commands
  t3310: extract common notes_merge_files_gone()
  t3030: use test_path_is_missing()
  t2018: replace "sha" with "oid"
  t2018: don't lose return code of git commands
  t2018: teach do_checkout() to accept `!` arg
  t2018: be more discerning when checking for expected exit codes
  t2018: improve style of if-statement
  t2018: add space between function name and ()
  t2018: remove trailing space from test description
2020-02-14 12:54:21 -08:00
Junio C Hamano d8b8d59054 Merge branch 'ag/rebase-avoid-unneeded-checkout'
"git rebase -i" (and friends) used to unnecessarily check out the
tip of the branch to be rebased, which has been corrected.

* ag/rebase-avoid-unneeded-checkout:
  rebase -i: stop checking out the tip of the branch to rebase
2020-02-14 12:54:21 -08:00
Junio C Hamano 251187084d Merge branch 'js/rebase-i-with-colliding-hash'
"git rebase -i" identifies existing commits in its todo file with
their abbreviated object name, which could become ambigous as it
goes to create new commits, and has a mechanism to avoid ambiguity
in the main part of its execution.  A few other cases however were
not covered by the protection against ambiguity, which has been
corrected.

* js/rebase-i-with-colliding-hash:
  rebase -i: also avoid SHA-1 collisions with missingCommitsCheck
  rebase -i: re-fix short SHA-1 collision
  parse_insn_line(): improve error message when parsing failed
2020-02-14 12:54:20 -08:00
Junio C Hamano c9a33e5e5d Merge branch 'kw/fsmonitor-watchman-racefix'
A new version of fsmonitor-watchman hook has been introduced, to
avoid races.

* kw/fsmonitor-watchman-racefix:
  fsmonitor: update documentation for hook version and watchman hooks
  fsmonitor: add fsmonitor hook scripts for version 2
  fsmonitor: handle version 2 of the hooks that will use opaque token
  fsmonitor: change last update timestamp on the index_state to opaque token
2020-02-14 12:54:20 -08:00
Junio C Hamano 56ceb64eb0 Merge branch 'mt/threaded-grep-in-object-store'
Traditionally, we avoided threaded grep while searching in objects
(as opposed to files in the working tree) as accesses to the object
layer is not thread-safe.  This limitation is getting lifted.

* mt/threaded-grep-in-object-store:
  grep: use no. of cores as the default no. of threads
  grep: move driver pre-load out of critical section
  grep: re-enable threads in non-worktree case
  grep: protect packed_git [re-]initialization
  grep: allow submodule functions to run in parallel
  submodule-config: add skip_if_read option to repo_read_gitmodules()
  grep: replace grep_read_mutex by internal obj read lock
  object-store: allow threaded access to object reading
  replace-object: make replace operations thread-safe
  grep: fix racy calls in grep_objects()
  grep: fix race conditions at grep_submodule()
  grep: fix race conditions on userdiff calls
2020-02-14 12:54:20 -08:00
Junio C Hamano 0da63da794 Merge branch 'jn/promote-proto2-to-default'
The transport protocol version 2 becomes the default one.

* jn/promote-proto2-to-default:
  fetch: default to protocol version 2
  protocol test: let protocol.version override GIT_TEST_PROTOCOL_VERSION
  test: request GIT_TEST_PROTOCOL_VERSION=0 when appropriate
  config doc: protocol.version is not experimental
  fetch test: use more robust test for filtered objects
2020-02-14 12:54:19 -08:00
Junio C Hamano a14aebeac3 Merge branch 'jk/packfile-reuse-cleanup'
The way "git pack-objects" reuses objects stored in existing pack
to generate its result has been improved.

* jk/packfile-reuse-cleanup:
  pack-bitmap: don't rely on bitmap_git->reuse_objects
  pack-objects: add checks for duplicate objects
  pack-objects: improve partial packfile reuse
  builtin/pack-objects: introduce obj_is_packed()
  pack-objects: introduce pack.allowPackReuse
  csum-file: introduce hashfile_total()
  pack-bitmap: simplify bitmap_has_oid_in_uninteresting()
  pack-bitmap: uninteresting oid can be outside bitmapped packfile
  pack-bitmap: introduce bitmap_walk_contains()
  ewah/bitmap: introduce bitmap_word_alloc()
  packfile: expose get_delta_base()
  builtin/pack-objects: report reused packfile objects
2020-02-14 12:54:19 -08:00
Junio C Hamano daef1b300b Merge branch 'hw/advice-add-nothing'
Two help messages given when "git add" notices the user gave it
nothing to add have been updated to use advise() API.

* hw/advice-add-nothing:
  add: change advice config variables used by the add API
  add: use advise function to display hints
2020-02-14 12:54:19 -08:00
Junio C Hamano 6141e0cc00 Merge branch 'js/convert-typofix' into maint
Typofix.

* js/convert-typofix:
  convert: fix typo
2020-02-14 12:42:34 -08:00
Junio C Hamano 4e52c1ae27 Merge branch 'js/ci-squelch-doc-warning' into maint
Squelch unhelpful warning message during documentation build.

* js/ci-squelch-doc-warning:
  ci: ignore rubygems warning in the "Documentation" job
2020-02-14 12:42:33 -08:00
Junio C Hamano 5cee4ffff8 Merge branch 'jb/multi-pack-index-docfix' into maint
Doc fix.

* jb/multi-pack-index-docfix:
  pack-format: correct multi-pack-index description
2020-02-14 12:42:33 -08:00
Junio C Hamano b907ca76f0 Merge branch 'ma/diff-doc-clarify-regexp-example' into maint
Doc clarification.

* ma/diff-doc-clarify-regexp-example:
  diff-options.txt: avoid "regex" overload in example
2020-02-14 12:42:33 -08:00
Junio C Hamano 7137d6089b Merge branch 'ms/doc-bundle-format' into maint
Technical details of the bundle format has been documented.
I think this is in a good enough shape.

* ms/doc-bundle-format:
  doc: describe Git bundle format
2020-02-14 12:42:32 -08:00
Junio C Hamano 52d620fdc6 Merge branch 'es/submodule-fetch-message-fix' into maint
Error message fix.

* es/submodule-fetch-message-fix:
  submodule: add newline on invalid submodule error
2020-02-14 12:42:32 -08:00
Junio C Hamano 0ecc7d62f4 Merge branch 'jb/parse-options-message-fix' into maint
Error message fix.

* jb/parse-options-message-fix:
  parse-options: lose an unnecessary space in an error message
2020-02-14 12:42:32 -08:00
Junio C Hamano 1ea6edfd55 Merge branch 'ma/filter-branch-doc-caret' into maint
Doc mark-up updates.

* ma/filter-branch-doc-caret:
  git-filter-branch.txt: wrap "maths" notation in backticks
2020-02-14 12:42:32 -08:00
Junio C Hamano cfa25e197d Merge branch 'km/submodule-doc-use-sm-path' into maint
Docfix.

* km/submodule-doc-use-sm-path:
  submodule foreach: replace $path with $sm_path in example
2020-02-14 12:42:32 -08:00
Junio C Hamano 153a1b46f1 Merge branch 'pb/do-not-recurse-grep-no-index' into maint
"git grep --no-index" should not get affected by the contents of
the .gitmodules file but when "--recurse-submodules" is given or
the "submodule.recurse" variable is set, it did.  Now these
settings are ignored in the "--no-index" mode.

* pb/do-not-recurse-grep-no-index:
  grep: ignore --recurse-submodules if --no-index is given
2020-02-14 12:42:31 -08:00
Junio C Hamano 8857657cc9 Merge branch 'jt/t5616-robustify' into maint
Futureproofing a test not to depend on the current implementation
detail.

* jt/t5616-robustify:
  t5616: make robust to delta base change
2020-02-14 12:42:31 -08:00
Junio C Hamano 1f7609b520 Merge branch 'en/fill-directory-fixes-more' into maint
Corner case bugs in "git clean" that stems from a (necessarily for
performance reasons) awkward calling convention in the directory
enumeration API has been corrected.

* en/fill-directory-fixes-more:
  dir: point treat_leading_path() warning to the right place
  dir: restructure in a way to avoid passing around a struct dirent
  dir: treat_leading_path() and read_directory_recursive(), round 2
  clean: demonstrate a bug with pathspecs
2020-02-14 12:42:31 -08:00
Junio C Hamano f468972671 Merge branch 'bc/misconception-doc' into maint
Doc updates.

* bc/misconception-doc:
  docs: mention when increasing http.postBuffer is valuable
  doc: dissuade users from trying to ignore tracked files
2020-02-14 12:42:31 -08:00
Junio C Hamano 6e69042e26 Merge branch 'bc/author-committer-doc' into maint
Clarify documentation on committer/author identities.

* bc/author-committer-doc:
  doc: provide guidance on user.name format
  docs: expand on possible and recommended user config options
  doc: move author and committer information to git-commit(1)
2020-02-14 12:42:31 -08:00
Junio C Hamano 650ed395be Merge branch 'ds/refmap-doc' into maint
"git fetch --refmap=" option has got a better documentation.

* ds/refmap-doc:
  fetch: document and test --refmap=""
2020-02-14 12:42:30 -08:00
Junio C Hamano 80b806f1a8 Merge branch 'bc/actualmente' into maint
Doc grammo fix.

* bc/actualmente:
  docs: use "currently" for the present time
2020-02-14 12:42:30 -08:00
Junio C Hamano eceff4ba12 Merge branch 'rt/submodule-i18n' into maint
Comments update.

* rt/submodule-i18n:
  submodule.c: mark more strings for translation
2020-02-14 12:42:30 -08:00
Junio C Hamano 8a17eb7972 Merge branch 'jk/test-fixes' into maint
Test fixes.

* jk/test-fixes:
  t7800: don't rely on reuse_worktree_file()
  t4018: drop "debugging" cat from hunk-header tests
2020-02-14 12:42:30 -08:00
Junio C Hamano 54bbadaeca Merge branch 'jk/asan-build-fix' into maint
Work around test breakages caused by custom regex engine used in
libasan, when address sanitizer is used with more recent versions
of gcc and clang.

* jk/asan-build-fix:
  Makefile: use compat regex with SANITIZE=address
2020-02-14 12:42:29 -08:00
Junio C Hamano 8dbeba198e Merge branch 'ds/sparse-cone' into maint
The code recently added in this release to move to the entry beyond
the ones in the same directory in the index in the sparse-cone mode
did not count the number of entries to skip over incorrectly, which
has been corrected.

* ds/sparse-cone:
  .mailmap: fix GGG authoship screwup
  unpack-trees: correctly compute result count
2020-02-14 12:42:29 -08:00
Junio C Hamano e361f36f61 Merge branch 'nd/switch-and-restore' into maint
"git restore --staged" did not correctly update the cache-tree
structure, resulting in bogus trees to be written afterwards, which
has been corrected.

* nd/switch-and-restore:
  restore: invalidate cache-tree when removing entries with --staged
2020-02-14 12:42:29 -08:00
Junio C Hamano 4a60c63a75 Merge branch 'jk/no-flush-upon-disconnecting-slrpc-transport' into maint
Reduce unnecessary round-trip when running "ls-remote" over the
stateless RPC mechanism.

* jk/no-flush-upon-disconnecting-slrpc-transport:
  transport: don't flush when disconnecting stateless-rpc helper
2020-02-14 12:42:28 -08:00
Junio C Hamano ad9c895463 Merge branch 'hw/tutorial-favor-switch-over-checkout' into maint
Complete an update to tutorial that encourages "git switch" over
"git checkout" that was done only half-way.

* hw/tutorial-favor-switch-over-checkout:
  doc/gitcore-tutorial: fix prose to match example command
2020-02-14 12:42:28 -08:00
Junio C Hamano 5ae057d9a8 Merge branch 'es/unpack-trees-oob-fix' into maint
The code that tries to skip over the entries for the paths in a
single directory using the cache-tree was not careful enough
against corrupt index file.

* es/unpack-trees-oob-fix:
  unpack-trees: watch for out-of-range index position
2020-02-14 12:42:28 -08:00
Junio C Hamano c17cf77e4e Merge branch 'bc/run-command-nullness-after-free-fix' into maint
C pedantry ;-) fix.

* bc/run-command-nullness-after-free-fix:
  run-command: avoid undefined behavior in exists_in_PATH
2020-02-14 12:42:27 -08:00
Junio C Hamano d0ebd645b1 Merge branch 'en/string-list-can-be-custom-sorted' into maint
API-doc update.

* en/string-list-can-be-custom-sorted:
  string-list: note in docs that callers can specify sorting function
2020-02-14 12:42:27 -08:00
Junio C Hamano 9eddeaece1 Merge branch 'jt/sha1-file-remove-oi-skip-cached' into maint
has_object_file() said "no" given an object registered to the
system via pretend_object_file(), making it inconsistent with
read_object_file(), causing lazy fetch to attempt fetching an
empty tree from promisor remotes.

* jt/sha1-file-remove-oi-skip-cached:
  sha1-file: remove OBJECT_INFO_SKIP_CACHED
2020-02-14 12:42:27 -08:00
Junio C Hamano 3bba763373 Merge branch 'hw/commit-advise-while-rejecting' into maint
"git commit" gives output similar to "git status" when there is
nothing to commit, but without honoring the advise.statusHints
configuration variable, which has been corrected.

* hw/commit-advise-while-rejecting:
  commit: honor advice.statusHints when rejecting an empty commit
2020-02-14 12:42:27 -08:00
Jeff King 3ab3185f99 pack-objects: support filters with bitmaps
Just as rev-list recently learned to combine filters and bitmaps, let's
do the same for pack-objects. The infrastructure is all there; we just
need to pass along our filter options, and the pack-bitmap code will
decide to use bitmaps or not.

This unsurprisingly makes things faster for partial clones of large
repositories (here we're cloning linux.git):

  Test                               HEAD^               HEAD
  ------------------------------------------------------------------------------
  5310.11: simulated partial clone   38.94(37.28+5.87)   11.06(11.27+4.07) -71.6%

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-14 10:46:22 -08:00