Commit graph

52472 commits

Author SHA1 Message Date
Samuel Maftoul 560ae1c164 branch: support configuring --sort via .gitconfig
Add support for configuring default sort ordering for git branches. Command
line option will override this configured value, using the exact same
syntax.

Signed-off-by: Samuel Maftoul <samuel.maftoul@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-16 11:17:10 -07:00
Junio C Hamano 63749b2dea Sixth batch for 2.19 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-15 15:13:39 -07:00
Junio C Hamano b160b6e69d Merge branch 'jt/connectivity-check-after-unshallow'
"git fetch" sometimes failed to update the remote-tracking refs,
which has been corrected.

* jt/connectivity-check-after-unshallow:
  fetch-pack: unify ref in and out param
2018-08-15 15:08:28 -07:00
Junio C Hamano 6be44b59fc Merge branch 'sg/travis-retrieve-trash-upon-failure'
The Travis CI scripts were taught to ship back the test data from
failed tests.

* sg/travis-retrieve-trash-upon-failure:
  travis-ci: include the trash directories of failed tests in the trace log
2018-08-15 15:08:28 -07:00
Junio C Hamano 11ea82ae37 Merge branch 'rs/remote-mv-leakfix'
Leakfix.

* rs/remote-mv-leakfix:
  remote: clear string_list after use in mv()
2018-08-15 15:08:28 -07:00
Junio C Hamano c5c26f7cc2 Merge branch 'es/mw-to-git-chain-fix'
Test fix.

* es/mw-to-git-chain-fix:
  mw-to-git/t9360: fix broken &&-chain
2018-08-15 15:08:27 -07:00
Junio C Hamano dca64ed397 Merge branch 'ms/http-proto-doc'
Doc fix.

* ms/http-proto-doc:
  doc: fix want-capability separator
2018-08-15 15:08:27 -07:00
Junio C Hamano 2e2c24f82a Merge branch 'nd/pack-objects-threading-doc'
Doc fix.

* nd/pack-objects-threading-doc:
  pack-objects: document about thread synchronization
2018-08-15 15:08:27 -07:00
Junio C Hamano ab539208b2 Merge branch 'jn/subtree-test-fixes'
Test fix.

* jn/subtree-test-fixes:
  subtree test: simplify preparation of expected results
  subtree test: add missing && to &&-chain
2018-08-15 15:08:27 -07:00
Junio C Hamano dd4ab3eaaa Merge branch 'cb/p4-pre-submit-hook'
"git p4 submit" learns to ask its own pre-submit hook if it should
continue with submitting.

* cb/p4-pre-submit-hook:
  git-p4: add the `p4-pre-submit` hook
2018-08-15 15:08:27 -07:00
Junio C Hamano 30cf1911e2 Merge branch 'js/vscode'
Add a script (in contrib/) to help users of VSCode work better with
our codebase.

* js/vscode:
  vscode: let cSpell work on commit messages, too
  vscode: add a dictionary for cSpell
  vscode: use 8-space tabs, no trailing ws, etc for Git's source code
  vscode: wrap commit messages at column 72 by default
  vscode: only overwrite C/C++ settings
  mingw: define WIN32 explicitly
  cache.h: extract enum declaration from inside a struct declaration
  vscode: hard-code a couple defines
  contrib: add a script to initialize VS Code configuration
2018-08-15 15:08:26 -07:00
Junio C Hamano 88f240734f Merge branch 'bb/redecl-enum-fix'
Compilation fix.

* bb/redecl-enum-fix:
  packfile: ensure that enum object_type is defined
2018-08-15 15:08:26 -07:00
Junio C Hamano e28daf222f Merge branch 'jk/banned-function'
It is too easy to misuse system API functions such as strcat();
these selected functions are now forbidden in this codebase and
will cause a compilation failure.

* jk/banned-function:
  banned.h: mark strncpy() as banned
  banned.h: mark sprintf() as banned
  banned.h: mark strcat() as banned
  automatically ban strcpy()
2018-08-15 15:08:26 -07:00
Junio C Hamano e4095da40e Merge branch 'en/merge-recursive-skip-fix'
When the sparse checkout feature is in use, "git cherry-pick" and
other mergy operations lost the skip_worktree bit when a path that
is excluded from checkout requires content level merge, which is
resolved as the same as the HEAD version, without materializing the
merge result in the working tree, which made the path appear as
deleted.  This has been corrected by preserving the skip_worktree
bit (and not materializing the file in the working tree).

* en/merge-recursive-skip-fix:
  merge-recursive: preserve skip_worktree bit when necessary
  t3507: add a testcase showing failure with sparse checkout
2018-08-15 15:08:26 -07:00
Junio C Hamano d6628c99fa Merge branch 'jt/tag-following-with-proto-v2-fix'
The wire-protocol v2 relies on the client to send "ref prefixes" to
limit the bandwidth spent on the initial ref advertisement.  "git
fetch $remote branch:branch" that asks tags that point into the
history leading to the "branch" automatically followed sent to
narrow prefix and broke the tag following, which has been fixed.

* jt/tag-following-with-proto-v2-fix:
  fetch: send "refs/tags/" prefix upon CLI refspecs
  t5702: test fetch with multiple refspecs at a time
2018-08-15 15:08:25 -07:00
Junio C Hamano 7d020f5a78 Merge branch 'jk/size-t'
Code clean-up to use size_t/ssize_t when they are the right type.

* jk/size-t:
  strbuf_humanise: use unsigned variables
  pass st.st_size as hint for strbuf_readlink()
  strbuf_readlink: use ssize_t
  strbuf: use size_t for length in intermediate variables
  reencode_string: use size_t for string lengths
  reencode_string: use st_add/st_mult helpers
2018-08-15 15:08:25 -07:00
Junio C Hamano bce8031d9a Merge branch 'sg/coccicheck-updates'
Update the way we use Coccinelle to find out-of-style code that
need to be modernised.

* sg/coccicheck-updates:
  coccinelle: extract dedicated make target to clean Coccinelle's results
  coccinelle: put sane filenames into output patches
  coccinelle: exclude sha1dc source files from static analysis
  coccinelle: use $(addsuffix) in 'coccicheck' make target
  coccinelle: mark the 'coccicheck' make target as .PHONY
2018-08-15 15:08:25 -07:00
Junio C Hamano 57fbd8efb0 Merge branch 'sb/histogram-less-memory'
"git diff --histogram" had a bad memory usage pattern, which has
been rearranged to reduce the peak usage.

* sb/histogram-less-memory:
  xdiff/histogram: remove tail recursion
  xdiff/xhistogram: move index allocation into find_lcs
  xdiff/xhistogram: factor out memory cleanup into free_index()
  xdiff/xhistogram: pass arguments directly to fall_back_to_classic_diff
2018-08-15 15:08:25 -07:00
Junio C Hamano 4bea8485e3 Merge branch 'nd/i18n'
Many more strings are prepared for l10n.

* nd/i18n: (23 commits)
  transport-helper.c: mark more strings for translation
  transport.c: mark more strings for translation
  sha1-file.c: mark more strings for translation
  sequencer.c: mark more strings for translation
  replace-object.c: mark more strings for translation
  refspec.c: mark more strings for translation
  refs.c: mark more strings for translation
  pkt-line.c: mark more strings for translation
  object.c: mark more strings for translation
  exec-cmd.c: mark more strings for translation
  environment.c: mark more strings for translation
  dir.c: mark more strings for translation
  convert.c: mark more strings for translation
  connect.c: mark more strings for translation
  config.c: mark more strings for translation
  commit-graph.c: mark more strings for translation
  builtin/replace.c: mark more strings for translation
  builtin/pack-objects.c: mark more strings for translation
  builtin/grep.c: mark strings for translation
  builtin/config.c: mark more strings for translation
  ...
2018-08-15 15:08:23 -07:00
Junio C Hamano 3ec5ebee15 Merge branch 'hs/gpgsm'
Teach "git tag -s" etc. a few configuration variables (gpg.format
that can be set to "openpgp" or "x509", and gpg.<format>.program
that is used to specify what program to use to deal with the format)
to allow x.509 certs with CMS via "gpgsm" to be used instead of
openpgp via "gnupg".

* hs/gpgsm:
  gpg-interface t: extend the existing GPG tests with GPGSM
  gpg-interface: introduce new signature format "x509" using gpgsm
  gpg-interface: introduce new config to select per gpg format program
  gpg-interface: do not hardcode the key string len anymore
  gpg-interface: introduce an abstraction for multiple gpg formats
  t/t7510: check the validation of the new config gpg.format
  gpg-interface: add new config to select how to sign a commit
2018-08-15 15:08:23 -07:00
Junio C Hamano 2d7a20258f Merge branch 'bw/clone-ref-prefixes'
The wire-protocol v2 relies on the client to send "ref prefixes" to
limit the bandwidth spent on the initial ref advertisement.  "git
clone" when learned to speak v2 forgot to do so, which has been
corrected.

* bw/clone-ref-prefixes:
  clone: send ref-prefixes when using protocol v2
2018-08-15 15:08:23 -07:00
Junio C Hamano 1689c22c1c Merge branch 'jk/core-use-replace-refs'
A new configuration variable core.usereplacerefs has been added,
primarily to help server installations that want to ignore the
replace mechanism altogether.

* jk/core-use-replace-refs:
  add core.usereplacerefs config option
  check_replace_refs: rename to read_replace_refs
  check_replace_refs: fix outdated comment
2018-08-15 15:08:23 -07:00
Junio C Hamano a14a9bfc13 Merge branch 'jh/json-writer'
Preparatory code to later add json output for telemetry data.

* jh/json-writer:
  json_writer: new routines to create JSON data
2018-08-15 15:08:22 -07:00
Junio C Hamano 8cabe16d9f Merge branch 'bb/make-developer-pedantic'
"make DEVELOPER=1 DEVOPTS=pedantic" allows developers to compile
with -pedantic option, which may catch more problematic program
constructs and potential bugs.

* bb/make-developer-pedantic:
  Makefile: add a DEVOPTS flag to get pedantic compilation
2018-08-15 15:08:22 -07:00
Junio C Hamano 706b0b5e8d Merge branch 'es/diff-color-moved-fix'
One of the "diff --color-moved" mode "dimmed_zebra" that was named
in an unusual way has been deprecated and replaced by
"dimmed-zebra".

* es/diff-color-moved-fix:
  diff: --color-moved: rename "dimmed_zebra" to "dimmed-zebra"
2018-08-15 15:08:22 -07:00
Junio C Hamano 1ba2fc603f Merge branch 'bw/protocol-v2'
Doc update.

* bw/protocol-v2:
  pack-protocol: mention and point to docs for protocol v2
2018-08-15 15:08:21 -07:00
Junio C Hamano 94f879c239 Merge branch 'sg/travis-cocci-diagnose-failure'
Update the way we run static analysis tool at TravisCI to make it
easier to use its findings.

* sg/travis-cocci-diagnose-failure:
  travis-ci: fail if Coccinelle static analysis found something to transform
  travis-ci: run Coccinelle static analysis with two parallel jobs
2018-08-15 15:08:21 -07:00
Junio C Hamano 10639c395a Merge branch 'js/t7406-recursive-submodule-update-order-fix'
Test fix.

* js/t7406-recursive-submodule-update-order-fix:
  t7406: avoid failures solely due to timing issues
2018-08-15 15:08:21 -07:00
Junio C Hamano ea30f539ef Merge branch 'bw/fetch-pack-i18n'
i18n updates.

* bw/fetch-pack-i18n:
  fetch-pack: mark die strings for translation
2018-08-15 15:08:20 -07:00
Junio C Hamano 1638a625ca Merge branch 'sg/fast-import-dump-refs-on-checkpoint-fix'
Test update.

* sg/fast-import-dump-refs-on-checkpoint-fix:
  t9300: wait for background fast-import process to die after killing it
2018-08-15 15:08:20 -07:00
Junio C Hamano ae4e3f4ae2 Merge branch 'sb/trailers-docfix'
Doc update.

* sb/trailers-docfix:
  Documentation/git-interpret-trailers: explain possible values
2018-08-15 15:08:19 -07:00
Junio C Hamano 5a6693089f Merge branch 'jk/ui-color-always-to-auto'
Doc formatting fix.

* jk/ui-color-always-to-auto:
  Documentation: fix --color option formatting
2018-08-15 15:08:19 -07:00
Junio C Hamano 1d89318c48 Fifth batch for 2.19 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-02 15:38:09 -07:00
Junio C Hamano 78a72ad4f8 Merge branch 'jt/commit-graph-per-object-store'
The singleton commit-graph in-core instance is made per in-core
repository instance.

* jt/commit-graph-per-object-store:
  commit-graph: add repo arg to graph readers
  commit-graph: store graph in struct object_store
  commit-graph: add free_commit_graph
  commit-graph: add missing forward declaration
  object-store: add missing include
  commit-graph: refactor preparing commit graph
2018-08-02 15:30:47 -07:00
Junio C Hamano cfec6133cf Merge branch 'es/chain-lint-in-subshell'
Look for broken "&&" chains that are hidden in subshell, many of
which have been found and corrected.

* es/chain-lint-in-subshell:
  t/chainlint.sed: drop extra spaces from regex character class
  t/chainlint: add chainlint "specialized" test cases
  t/chainlint: add chainlint "complex" test cases
  t/chainlint: add chainlint "cuddled" test cases
  t/chainlint: add chainlint "loop" and "conditional" test cases
  t/chainlint: add chainlint "nested subshell" test cases
  t/chainlint: add chainlint "one-liner" test cases
  t/chainlint: add chainlint "whitespace" test cases
  t/chainlint: add chainlint "basic" test cases
  t/Makefile: add machinery to check correctness of chainlint.sed
  t/test-lib: teach --chain-lint to detect broken &&-chains in subshells
2018-08-02 15:30:46 -07:00
Junio C Hamano 09ca613049 Merge branch 'jt/tags-to-promised-blobs-fix'
The lazy clone support had a few places where missing but promised
objects were not correctly tolerated, which have been fixed.

* jt/tags-to-promised-blobs-fix:
  tag: don't warn if target is missing but promised
  revision: tolerate promised targets of tags
2018-08-02 15:30:46 -07:00
Junio C Hamano 7c85ee6c58 Merge branch 'jt/fetch-negotiator-skipping'
Add a server-side knob to skip commits in exponential/fibbonacci
stride in an attempt to cover wider swath of history with a smaller
number of iterations, potentially accepting a larger packfile
transfer, instead of going back one commit a time during common
ancestor discovery during the "git fetch" transaction.

* jt/fetch-negotiator-skipping:
  negotiator/skipping: skip commits during fetch
2018-08-02 15:30:46 -07:00
Junio C Hamano d6873a396e Merge branch 'jm/send-email-tls-auth-on-batch'
"git send-email" when using in a batched mode that limits the
number of messages sent in a single SMTP session lost the contents
of the variable used to choose between tls/ssl, unable to send the
second and later batches, which has been fixed.

* jm/send-email-tls-auth-on-batch:
  send-email: fix tls AUTH when sending batch
2018-08-02 15:30:46 -07:00
Junio C Hamano cd3f067815 Merge branch 'bc/sequencer-export-work-tree-as-well'
"git rebase" started exporting GIT_DIR environment variable and
exposing it to hook scripts when part of it got rewritten in C.
Instead of matching the old scripted Porcelains' behaviour,
compensate by also exporting GIT_WORK_TREE environment as well to
lessen the damage.  This can harm existing hooks that want to
operate on different repository, but the current behaviour is
already broken for them anyway.

* bc/sequencer-export-work-tree-as-well:
  sequencer: pass absolute GIT_WORK_TREE to exec commands
2018-08-02 15:30:45 -07:00
Junio C Hamano c99033060f Merge branch 'en/t7405-recursive-submodule-conflicts'
Tests to cover conflict cases that involve submodules have been
added for merge-recursive.

* en/t7405-recursive-submodule-conflicts:
  t7405: verify 'merge --abort' works after submodule/path conflicts
  t7405: add a directory/submodule conflict
  t7405: add a file/submodule conflict
2018-08-02 15:30:45 -07:00
Junio C Hamano e6da45c7cd Merge branch 'en/t6036-merge-recursive-tests'
Tests to cover various conflicting cases have been added for
merge-recursive.

* en/t6036-merge-recursive-tests:
  t6036: add a failed conflict detection case: regular files, different modes
  t6036: add a failed conflict detection case with conflicting types
  t6036: add a failed conflict detection case with submodule add/add
  t6036: add a failed conflict detection case with submodule modify/modify
  t6036: add a failed conflict detection case with symlink add/add
  t6036: add a failed conflict detection case with symlink modify/modify
2018-08-02 15:30:45 -07:00
Junio C Hamano c18ac30e9e Merge branch 'en/dirty-merge-fixes'
The recursive merge strategy did not properly ensure there was no
change between HEAD and the index before performing its operation,
which has been corrected.

* en/dirty-merge-fixes:
  merge: fix misleading pre-merge check documentation
  merge-recursive: enforce rule that index matches head before merging
  t6044: add more testcases with staged changes before a merge is invoked
  merge-recursive: fix assumption that head tree being merged is HEAD
  merge-recursive: make sure when we say we abort that we actually abort
  t6044: add a testcase for index matching head, when head doesn't match HEAD
  t6044: verify that merges expected to abort actually abort
  index_has_changes(): avoid assuming operating on the_index
  read-cache.c: move index_has_changes() from merge.c
2018-08-02 15:30:45 -07:00
Junio C Hamano 2b9afea372 Merge branch 'js/rebase-merge-octopus'
"git rebase --rebase-merges" mode now handles octopus merges as
well.

* js/rebase-merge-octopus:
  rebase --rebase-merges: adjust man page for octopus support
  rebase --rebase-merges: add support for octopus merges
  merge: allow reading the merge commit message from a file
2018-08-02 15:30:44 -07:00
Junio C Hamano 87ece7ce11 Merge branch 'tb/grep-only-matching'
"git grep" learned the "--only-matching" option.

* tb/grep-only-matching:
  grep.c: teach 'git grep --only-matching'
  grep.c: extract show_line_header()
2018-08-02 15:30:44 -07:00
Junio C Hamano 562413eb29 Merge branch 'kg/gc-auto-windows-workaround'
"git gc --auto" opens file descriptors for the packfiles before
spawning "git repack/prune", which would upset Windows that does
not want a process to work on a file that is open by another
process.  The issue has been worked around.

* kg/gc-auto-windows-workaround:
  gc --auto: release pack files before auto packing
2018-08-02 15:30:43 -07:00
Junio C Hamano ae533c4a92 Merge branch 'jm/cache-entry-from-mem-pool'
For a large tree, the index needs to hold many cache entries
allocated on heap.  These cache entries are now allocated out of a
dedicated memory pool to amortize malloc(3) overhead.

* jm/cache-entry-from-mem-pool:
  block alloc: add validations around cache_entry lifecyle
  block alloc: allocate cache entries from mem_pool
  mem-pool: fill out functionality
  mem-pool: add life cycle management functions
  mem-pool: only search head block for available space
  block alloc: add lifecycle APIs for cache_entry structs
  read-cache: teach make_cache_entry to take object_id
  read-cache: teach refresh_cache_entry to take istate
2018-08-02 15:30:43 -07:00
Junio C Hamano 30bf8d9f4f Merge branch 'jt/fetch-nego-tip'
"git fetch" learned a new option "--negotiation-tip" to limit the
set of commits it tells the other end as "have", to reduce wasted
bandwidth and cycles, which would be helpful when the receiving
repository has a lot of refs that have little to do with the
history at the remote it is fetching from.

* jt/fetch-nego-tip:
  fetch-pack: support negotiation tip whitelist
2018-08-02 15:30:43 -07:00
Junio C Hamano 84e74c6403 Merge branch 'en/t6042-insane-merge-rename-testcases'
Various glitches in the heuristics of merge-recursive strategy have
been documented in new tests.

* en/t6042-insane-merge-rename-testcases:
  t6042: add testcase covering long chains of rename conflicts
  t6042: add testcase covering rename/rename(2to1)/delete/delete conflict
  t6042: add testcase covering rename/add/delete conflict type
2018-08-02 15:30:43 -07:00
Junio C Hamano 3a2a1dc170 Merge branch 'sb/object-store-lookup'
lookup_commit_reference() and friends have been updated to find
in-core object for a specific in-core repository instance.

* sb/object-store-lookup: (32 commits)
  commit.c: allow lookup_commit_reference to handle arbitrary repositories
  commit.c: allow lookup_commit_reference_gently to handle arbitrary repositories
  tag.c: allow deref_tag to handle arbitrary repositories
  object.c: allow parse_object to handle arbitrary repositories
  object.c: allow parse_object_buffer to handle arbitrary repositories
  commit.c: allow get_cached_commit_buffer to handle arbitrary repositories
  commit.c: allow set_commit_buffer to handle arbitrary repositories
  commit.c: migrate the commit buffer to the parsed object store
  commit-slabs: remove realloc counter outside of slab struct
  commit.c: allow parse_commit_buffer to handle arbitrary repositories
  tag: allow parse_tag_buffer to handle arbitrary repositories
  tag: allow lookup_tag to handle arbitrary repositories
  commit: allow lookup_commit to handle arbitrary repositories
  tree: allow lookup_tree to handle arbitrary repositories
  blob: allow lookup_blob to handle arbitrary repositories
  object: allow lookup_object to handle arbitrary repositories
  object: allow object_as_type to handle arbitrary repositories
  tag: add repository argument to deref_tag
  tag: add repository argument to parse_tag_buffer
  tag: add repository argument to lookup_tag
  ...
2018-08-02 15:30:42 -07:00
Junio C Hamano 6566a917d8 Merge branch 'is/parsing-line-range'
Parsing of -L[<N>][,[<M>]] parameters "git blame" and "git log"
take has been tweaked.

* is/parsing-line-range:
  log: prevent error if line range ends past end of file
  blame: prevent error if range ends past end of file
2018-08-02 15:30:41 -07:00