]> granicus.if.org Git - git/log
git
5 years agoSync with rc1 next
Junio C Hamano [Thu, 24 Oct 2019 04:35:08 +0000 (13:35 +0900)]
Sync with rc1

* master:
  Git 2.24-rc1

5 years agoGit 2.24-rc1 master v2.24.0-rc1
Junio C Hamano [Thu, 24 Oct 2019 04:33:49 +0000 (13:33 +0900)]
Git 2.24-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'sg/ci-osx-gcc8-fix'
Junio C Hamano [Thu, 24 Oct 2019 04:34:03 +0000 (13:34 +0900)]
Merge branch 'sg/ci-osx-gcc8-fix'

CI build fix.

* sg/ci-osx-gcc8-fix:
  ci: fix GCC install in the Travis CI GCC OSX job

5 years agoMerge branch 'ds/feature-macros'
Junio C Hamano [Thu, 24 Oct 2019 04:34:02 +0000 (13:34 +0900)]
Merge branch 'ds/feature-macros'

The codepath that reads the index.version configuration was broken
with a recent update, which has been corrected.

* ds/feature-macros:
  repo-settings: read an int for index.version

5 years agoMerge branch 'js/azure-ci-osx-fix'
Junio C Hamano [Thu, 24 Oct 2019 04:34:02 +0000 (13:34 +0900)]
Merge branch 'js/azure-ci-osx-fix'

Update installation procedure for Perforce on MacOS in the CI jobs
running on Azure pipelines, which was failing.

* js/azure-ci-osx-fix:
  ci(osx): use new location of the `perforce` cask

5 years agoMerge branch 'bw/format-patch-o-create-leading-dirs'
Junio C Hamano [Thu, 24 Oct 2019 04:34:02 +0000 (13:34 +0900)]
Merge branch 'bw/format-patch-o-create-leading-dirs'

Test update.

* bw/format-patch-o-create-leading-dirs:
  t4014: make output-directory tests self-contained

5 years agoMerge branch 'dl/submodule-set-branch'
Junio C Hamano [Thu, 24 Oct 2019 04:34:02 +0000 (13:34 +0900)]
Merge branch 'dl/submodule-set-branch'

Test update.

* dl/submodule-set-branch:
  t7419: change test_must_fail to ! for grep

5 years agoMerge branch 'dl/apply-3way-diff3' into next
Junio C Hamano [Thu, 24 Oct 2019 03:30:24 +0000 (12:30 +0900)]
Merge branch 'dl/apply-3way-diff3' into next

"git apply --3way" learned to honor merge.conflictsStyle
configuration variable, like merges would.

* dl/apply-3way-diff3:
  apply: respect merge.conflictStyle in --3way
  t4108: demonstrate bug in apply
  t4108: use `test_config` instead of `git config`
  t4108: remove git command upstream of pipe
  t4108: replace create_file with test_write_lines

5 years agoMerge branch 'sg/dir-trie-fixes' into next
Junio C Hamano [Thu, 24 Oct 2019 03:30:24 +0000 (12:30 +0900)]
Merge branch 'sg/dir-trie-fixes' into next

Code clean-up and a bugfix in the logic used to tell worktree local
and repository global refs apart.

* sg/dir-trie-fixes:
  path.c: don't call the match function without value in trie_find()
  path.c: clarify two field names in 'struct common_dir'
  path.c: mark 'logs/HEAD' in 'common_list' as file
  path.c: clarify trie_find()'s in-code comment
  Documentation: mention more worktree-specific exceptions

5 years agoMerge branch 'jc/am-show-current-patch-docfix' into next
Junio C Hamano [Thu, 24 Oct 2019 03:30:23 +0000 (12:30 +0900)]
Merge branch 'jc/am-show-current-patch-docfix' into next

Doc update.

* jc/am-show-current-patch-docfix:
  doc: am --show-current-patch gives an entire e-mail message

5 years agoMerge branch 'js/advise-rebase-skip' into next
Junio C Hamano [Thu, 24 Oct 2019 03:30:23 +0000 (12:30 +0900)]
Merge branch 'js/advise-rebase-skip' into next

The logic used in "git commit" to give hints and errors depending
on what operation was in progress learned to distinguish rebase and
cherry-pick better.

* js/advise-rebase-skip:
  commit: give correct advice for empty commit during a rebase
  sequencer: export the function to get the path of `.git/rebase-merge/`
  cherry-pick: add test for `--skip` advice in `git commit`

5 years agoMerge branch 'wb/midx-progress' into next
Junio C Hamano [Thu, 24 Oct 2019 03:30:23 +0000 (12:30 +0900)]
Merge branch 'wb/midx-progress' into next

The code to generate multi-pack index learned to show (or not to
show) progress indicators.

* wb/midx-progress:
  multi-pack-index: add [--[no-]progress] option.
  midx: honor the MIDX_PROGRESS flag in midx_repack
  midx: honor the MIDX_PROGRESS flag in verify_midx_file
  midx: add progress to expire_midx_packs
  midx: add progress to write_midx_file
  midx: add MIDX_PROGRESS flag

5 years agoMerge branch 'js/git-path-head-dot-lock-fix' into next
Junio C Hamano [Thu, 24 Oct 2019 03:30:23 +0000 (12:30 +0900)]
Merge branch 'js/git-path-head-dot-lock-fix' into next

"git rev-parse --git-path HEAD.lock" did not give the right path
when run in a secondary worktree.

* js/git-path-head-dot-lock-fix:
  git_path(): handle `.lock` files correctly
  t1400: wrap setup code in test case

5 years agoMerge branch 'jc/log-graph-simplify' into next
Junio C Hamano [Thu, 24 Oct 2019 03:30:22 +0000 (12:30 +0900)]
Merge branch 'jc/log-graph-simplify' into next

The implementation of "git log --graph" got refactored and then its
output got simplified.

* jc/log-graph-simplify:
  graph: fix coloring of octopus dashes
  graph: flatten edges that fuse with their right neighbor
  graph: smooth appearance of collapsing edges on commit lines
  graph: rename `new_mapping` to `old_mapping`
  graph: commit and post-merge lines for left-skewed merges
  graph: tidy up display of left-skewed merges
  graph: example of graph output that can be simplified
  graph: extract logic for moving to GRAPH_PRE_COMMIT state
  graph: remove `mapping_idx` and `graph_update_width()`
  graph: reduce duplication in `graph_insert_into_new_columns()`
  graph: reuse `find_new_column_by_commit()`
  graph: handle line padding in `graph_next_line()`
  graph: automatically track display width of graph lines

5 years agoMerge branch 'en/merge-recursive-directory-rename-fixes' into next
Junio C Hamano [Thu, 24 Oct 2019 03:30:22 +0000 (12:30 +0900)]
Merge branch 'en/merge-recursive-directory-rename-fixes' into next

When all files from some subdirectory were renamed to the root
directory, the directory rename heuristics would fail to detect that
as a rename/merge of the subdirectory to the root directory, which has
been corrected.

* en/merge-recursive-directory-rename-fixes:
  t604[236]: do not run setup in separate tests
  merge-recursive: fix merging a subdirectory into the root directory
  merge-recursive: clean up get_renamed_dir_portion()

5 years agoMerge branch 'js/rebase-deprecate-preserve-merges' into next
Junio C Hamano [Thu, 24 Oct 2019 03:30:22 +0000 (12:30 +0900)]
Merge branch 'js/rebase-deprecate-preserve-merges' into next

"git rebase --preserve-merges" has been marked as deprecated; this
release stops advertising it in the "git rebase -h" output.

* js/rebase-deprecate-preserve-merges:
  rebase: hide --preserve-merges option

5 years agoMerge branch 'hv/bitshift-constants-in-blame' into next
Junio C Hamano [Thu, 24 Oct 2019 03:30:22 +0000 (12:30 +0900)]
Merge branch 'hv/bitshift-constants-in-blame' into next

Move the definition of a set of bitmask constants from 0ctal
literal to (1U<<count) notation.

* hv/bitshift-constants-in-blame:
  builtin/blame.c: constants into bit shift format

5 years agoMerge branch 'sg/ci-osx-gcc8-fix' into next
Junio C Hamano [Thu, 24 Oct 2019 03:30:21 +0000 (12:30 +0900)]
Merge branch 'sg/ci-osx-gcc8-fix' into next

CI build fix.

* sg/ci-osx-gcc8-fix:
  ci: fix GCC install in the Travis CI GCC OSX job

5 years agoMerge branch 'ds/feature-macros' into next
Junio C Hamano [Thu, 24 Oct 2019 03:30:21 +0000 (12:30 +0900)]
Merge branch 'ds/feature-macros' into next

The codepath that reads the index.version configuration was broken
with a recent update, which has been corrected.

* ds/feature-macros:
  repo-settings: read an int for index.version

5 years agogit_path(): handle `.lock` files correctly
Johannes Schindelin [Mon, 21 Oct 2019 21:54:42 +0000 (21:54 +0000)]
git_path(): handle `.lock` files correctly

Ever since worktrees were introduced, the `git_path()` function _really_
needed to be called e.g. to get at the path to `logs/HEAD` (`HEAD` is
specific to the worktree, and therefore so is its reflog). However, the
wrong path is returned for `logs/HEAD.lock`.

This does not matter as long as the Git executable is doing the asking,
as the path for that `logs/HEAD.lock` file is constructed from
`git_path("logs/HEAD")` by appending the `.lock` suffix.

However, Git GUI just learned to use `--git-path` instead of appending
relative paths to what `git rev-parse --git-dir` returns (and as a
consequence not only using the correct hooks directory, but also using
the correct paths in worktrees other than the main one). While it does
not seem as if Git GUI in particular is asking for `logs/HEAD.lock`,
let's be safe rather than sorry.

Side note: Git GUI _does_ ask for `index.lock`, but that is already
resolved correctly, due to `update_common_dir()` preferring to leave
unknown paths in the (worktree-specific) git directory.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agorepo-settings: read an int for index.version
Derrick Stolee [Wed, 23 Oct 2019 20:38:57 +0000 (20:38 +0000)]
repo-settings: read an int for index.version

Several config options were combined into a repo_settings struct in
ds/feature-macros, including a move of the "index.version" config
setting in 7211b9e (repo-settings: consolidate some config settings,
2019-08-13).

Unfortunately, that file looked like a lot of boilerplate and what is
clearly a factor of copy-paste overload, the config setting is parsed
with repo_config_ge_bool() instead of repo_config_get_int(). This means
that a setting "index.version=4" would not register correctly and would
revert to the default version of 3.

I caught this while incorporating v2.24.0-rc0 into the VFS for Git
codebase, where we really care that the index is in version 4.

This was not caught by the codebase because the version checks placed
in t1600-index.sh did not test the "basic" scenario enough. Here, we
modify the test to include these normal settings to not be overridden by
features.manyFiles or GIT_INDEX_VERSION. While the "default" version is
3, this is demoted to version 2 in do_write_index() when not necessary.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoapply: respect merge.conflictStyle in --3way
Denton Liu [Wed, 23 Oct 2019 23:32:38 +0000 (16:32 -0700)]
apply: respect merge.conflictStyle in --3way

Before, when doing a 3-way merge, the merge.conflictStyle option was not
respected and the "merge" style was always used, even if "diff3" was
specified.

Call git_xmerge_config() at the end of git_apply_config() so that the
merge.conflictStyle config is read.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot4108: demonstrate bug in apply
Denton Liu [Wed, 23 Oct 2019 23:32:36 +0000 (16:32 -0700)]
t4108: demonstrate bug in apply

Currently, apply does not respect the merge.conflictStyle setting.
Demonstrate this by making the 'apply with --3way' test case generic and
extending it to show that the configuration of
merge.conflictStyle = diff3 causes a breakage.

Change print_sanitized_conflicted_diff() to also sanitize `|||||||`
conflict markers.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot4108: use `test_config` instead of `git config`
Denton Liu [Wed, 23 Oct 2019 23:32:33 +0000 (16:32 -0700)]
t4108: use `test_config` instead of `git config`

Since `git config` leaves the configurations set even after the test
case completes, use `test_config` instead so that the configurations are
reset once the test case finishes.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot4108: remove git command upstream of pipe
Denton Liu [Wed, 23 Oct 2019 23:32:31 +0000 (16:32 -0700)]
t4108: remove git command upstream of pipe

Before, the output of `git diff HEAD` would always be piped to
sanitize_conflicted_diff(). However, since the Git command was upstream
of the pipe, in case the Git command fails, the return code would be
lost. Rewrite into separate statements so that the return code is no
longer lost.

Since only the command `git diff HEAD` was being piped to
sanitize_conflicted_diff(), move the command into the function and rename
it to print_sanitized_conflicted_diff().

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot4108: replace create_file with test_write_lines
Denton Liu [Wed, 23 Oct 2019 23:32:28 +0000 (16:32 -0700)]
t4108: replace create_file with test_write_lines

Since the locally defined create_file() duplicates the functionality of
the test_write_lines() helper function, remove create_file() and replace
all instances with test_write_lines(). While we're at it, move
redirection operators to the end of the command which is the more
conventional place to put it.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoci: fix GCC install in the Travis CI GCC OSX job
SZEDER Gábor [Thu, 24 Oct 2019 00:20:40 +0000 (02:20 +0200)]
ci: fix GCC install in the Travis CI GCC OSX job

A few days ago Travis CI updated their existing OSX images, including
the Homebrew database in the xcode10.1 OSX image that we use.  Since
then installing dependencies in the 'osx-gcc' job fails when it tries
to link gcc@8:

  + brew link gcc@8
  Error: No such keg: /usr/local/Cellar/gcc@8

GCC8 is still installed but not linked to '/usr/local' in the updated
image, as it was before this update, but now we have to link it by
running 'brew link gcc'.  So let's do that then, and fall back to
linking gcc@8 if it doesn't, just to be sure.

Our builds on Azure Pipelines are unaffected by this issue.  The OSX
image over there doesn't contain the gcc@8 package, so we have to
'brew install' it, which already takes care of linking it to
'/usr/local'.  After that the 'brew link gcc' command added by this
patch fails, but the ||-chained fallback 'brew link gcc@8' command
succeeds with an "already linked" warning.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoSync with master
Junio C Hamano [Wed, 23 Oct 2019 07:47:16 +0000 (16:47 +0900)]
Sync with master

* master:
  Eleventh batch

5 years agoMerge branch 'bw/format-patch-o-create-leading-dirs' into next
Junio C Hamano [Wed, 23 Oct 2019 07:47:10 +0000 (16:47 +0900)]
Merge branch 'bw/format-patch-o-create-leading-dirs' into next

Test update.

* bw/format-patch-o-create-leading-dirs:
  t4014: make output-directory tests self-contained

5 years agoMerge branch 'dl/submodule-set-branch' into next
Junio C Hamano [Wed, 23 Oct 2019 07:47:09 +0000 (16:47 +0900)]
Merge branch 'dl/submodule-set-branch' into next

Test update.

* dl/submodule-set-branch:
  t7419: change test_must_fail to ! for grep

5 years agoEleventh batch
Junio C Hamano [Wed, 23 Oct 2019 05:42:27 +0000 (14:42 +0900)]
Eleventh batch

The tenth was at -rc0 ;-)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'cb/pcre2-chartables-leakfix'
Junio C Hamano [Wed, 23 Oct 2019 05:43:11 +0000 (14:43 +0900)]
Merge branch 'cb/pcre2-chartables-leakfix'

Leakfix.

* cb/pcre2-chartables-leakfix:
  grep: avoid leak of chartables in PCRE2
  grep: make PCRE2 aware of custom allocator
  grep: make PCRE1 aware of custom allocator

5 years agoMerge branch 'bc/smart-http-atomic-push'
Junio C Hamano [Wed, 23 Oct 2019 05:43:11 +0000 (14:43 +0900)]
Merge branch 'bc/smart-http-atomic-push'

The atomic push over smart HTTP transport did not work, which has
been corrected.

* bc/smart-http-atomic-push:
  remote-curl: pass on atomic capability to remote side

5 years agoMerge branch 'wb/fsmonitor-bitmap-fix'
Junio C Hamano [Wed, 23 Oct 2019 05:43:10 +0000 (14:43 +0900)]
Merge branch 'wb/fsmonitor-bitmap-fix'

A segfault fix.

* wb/fsmonitor-bitmap-fix:
  fsmonitor: don't fill bitmap with entries to be removed

5 years agoMerge branch 'sb/userdiff-dts'
Junio C Hamano [Wed, 23 Oct 2019 05:43:10 +0000 (14:43 +0900)]
Merge branch 'sb/userdiff-dts'

Tweak userdiff patterns for dts.

* sb/userdiff-dts:
  userdiff: fix some corner cases in dts regex

5 years agoMerge branch 'sg/progress-fix'
Junio C Hamano [Wed, 23 Oct 2019 05:43:09 +0000 (14:43 +0900)]
Merge branch 'sg/progress-fix'

Byte-order fix the recent update to progress display code.

* sg/progress-fix:
  test-progress: fix test failures on big-endian systems

5 years agoMerge branch 'nr/diff-highlight-indent-fix'
Junio C Hamano [Wed, 23 Oct 2019 05:43:09 +0000 (14:43 +0900)]
Merge branch 'nr/diff-highlight-indent-fix'

Code cleanup.

* nr/diff-highlight-indent-fix:
  diff-highlight: fix a whitespace nit

5 years agoMerge branch 'mb/clarify-zsh-completion-doc'
Junio C Hamano [Wed, 23 Oct 2019 05:43:09 +0000 (14:43 +0900)]
Merge branch 'mb/clarify-zsh-completion-doc'

The installation instruction for zsh completion script (in
contrib/) has been a bit improved.

* mb/clarify-zsh-completion-doc:
  completion: clarify installation instruction for zsh

5 years agoSync with master
Junio C Hamano [Wed, 23 Oct 2019 05:05:18 +0000 (14:05 +0900)]
Sync with master

* master:

5 years agoMerge branch 'js/azure-ci-osx-fix' into next
Junio C Hamano [Wed, 23 Oct 2019 05:04:53 +0000 (14:04 +0900)]
Merge branch 'js/azure-ci-osx-fix' into next

* js/azure-ci-osx-fix:
  ci(osx): use new location of the `perforce` cask

5 years agoRevert "Merge branch 'jk/packfile-reuse-cleanup' into next"
Junio C Hamano [Wed, 23 Oct 2019 04:58:22 +0000 (13:58 +0900)]
Revert "Merge branch 'jk/packfile-reuse-cleanup' into next"

This reverts commit dc60b31833b45e3dd027531a7d21c774dad948ec, reversing
changes made to 1bb1c0846ff9a7ac2334df39cc4232a6ae8a419c.

5 years agopath.c: don't call the match function without value in trie_find()
SZEDER Gábor [Mon, 21 Oct 2019 16:00:43 +0000 (18:00 +0200)]
path.c: don't call the match function without value in trie_find()

'logs/refs' is not a working tree-specific path, but since commit
b9317d55a3 (Make sure refs/rewritten/ is per-worktree, 2019-03-07)
'git rev-parse --git-path' has been returning a bogus path if a
trailing '/' is present:

  $ git -C WT/ rev-parse --git-path logs/refs --git-path logs/refs/
  /home/szeder/src/git/.git/logs/refs
  /home/szeder/src/git/.git/worktrees/WT/logs/refs/

We use a trie data structure to efficiently decide whether a path
belongs to the common dir or is working tree-specific.  As it happens
b9317d55a3 triggered a bug that is as old as the trie implementation
itself, added in 4e09cf2acf (path: optimize common dir checking,
2015-08-31).

  - According to the comment describing trie_find(), it should only
    call the given match function 'fn' for a "/-or-\0-terminated
    prefix of the key for which the trie contains a value".  This is
    not true: there are three places where trie_find() calls the match
    function, but one of them is missing the check for value's
    existence.

  - b9317d55a3 added two new keys to the trie: 'logs/refs/rewritten'
    and 'logs/refs/worktree', next to the already existing
    'logs/refs/bisect'.  This resulted in a trie node with the path
    'logs/refs/', which didn't exist before, and which doesn't have a
    value attached.  A query for 'logs/refs/' finds this node and then
    hits that one callsite of the match function which doesn't check
    for the value's existence, and thus invokes the match function
    with NULL as value.

  - When the match function check_common() is invoked with a NULL
    value, it returns 0, which indicates that the queried path doesn't
    belong to the common directory, ultimately resulting the bogus
    path shown above.

Add the missing condition to trie_find() so it will never invoke the
match function with a non-existing value.  check_common() will then no
longer have to check that it got a non-NULL value, so remove that
condition.

I believe that there are no other paths that could cause similar bogus
output.  AFAICT the only other key resulting in the match function
being called with a NULL value is 'co' (because of the keys 'common'
and 'config').  However, as they are not in a directory that belongs
to the common directory the resulting working tree-specific path is
expected.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agopath.c: clarify two field names in 'struct common_dir'
SZEDER Gábor [Mon, 21 Oct 2019 16:00:42 +0000 (18:00 +0200)]
path.c: clarify two field names in 'struct common_dir'

An array of 'struct common_dir' instances is used to specify whether
various paths in $GIT_DIR are specific to a worktree, or are common,
i.e. belong to main worktree.  The names of two fields in this
struct are somewhat confusing or ambigious:

  - The path is recorded in the struct's 'dirname' field, even though
    several entries are regular files e.g. 'gc.pid', 'packed-refs',
    etc.

    Rename this field to 'path' to reduce confusion.

  - The field 'exclude' tells whether the path is excluded...  from
    where?  Excluded from the common dir or from the worktree?  It
    means the former, but it's ambigious.

    Rename this field to 'is_common' to make it unambigious what it
    means.  This, however, means the exact opposite of what 'exclude'
    meant, so we have to negate the field's value in all entries as
    well.

The diff is best viewed with '--color-words'.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agopath.c: mark 'logs/HEAD' in 'common_list' as file
SZEDER Gábor [Mon, 21 Oct 2019 16:00:41 +0000 (18:00 +0200)]
path.c: mark 'logs/HEAD' in 'common_list' as file

'logs/HEAD', i.e. HEAD's reflog, is a file, but its entry in
'common_list' has the 'is_dir' bit set.

Unset that bit to make it consistent with what 'logs/HEAD' is supposed
to be.

This doesn't make a difference in behavior: check_common() is the only
function that looks at the 'is_dir' bit, and that function either
returns 0, or '!exclude', which for 'logs/HEAD' results in 0 as well.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agopath.c: clarify trie_find()'s in-code comment
SZEDER Gábor [Mon, 21 Oct 2019 16:00:40 +0000 (18:00 +0200)]
path.c: clarify trie_find()'s in-code comment

A fairly long comment describes trie_find()'s behavior and shows
examples, but it's slightly incomplete/inaccurate.  Update this
comment to specify how trie_find() handles a negative return value
from the given match function.

Furthermore, update the list of examples to include not only two but
three levels of path components.  This makes the examples slightly
more complicated, but it can illustrate the behavior in more corner
cases.

Finally, basically everything refers to the data stored for a key as
"value", with two confusing exceptions:

  - The type definition of the match function calls its corresponding
    parameter 'data'.
    Rename that parameter to 'value'.  (check_common(), the only
    function of this type already calls it 'value').

  - The table of examples above trie_find() has a "val from node"
    column, which has nothing to do with the value stored in the trie:
    it's a "prefix of the key for which the trie contains a value"
    that led to that node.
    Rename that column header to "prefix to node".

Note that neither the original nor the updated description and
examples correspond 100% to the current implementation, because the
implementation is a bit buggy, but the comment describes the desired
behavior.  The bug will be fixed in the last patch of this series.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoDocumentation: mention more worktree-specific exceptions
SZEDER Gábor [Mon, 21 Oct 2019 16:00:39 +0000 (18:00 +0200)]
Documentation: mention more worktree-specific exceptions

If a directory in $GIT_DIR is overridden when $GIT_COMMON_DIR is set,
then usually all paths within that directory are overridden as well.
There are a couple of exceptions, though, and two of them, namely
'refs/rewritten' and 'logs/HEAD' are not mentioned in
'gitrepository-layout'.  Document them as well.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot1400: wrap setup code in test case
Johannes Schindelin [Mon, 21 Oct 2019 21:54:41 +0000 (21:54 +0000)]
t1400: wrap setup code in test case

Without this, you cannot use `--run=<...>` to skip that part, and a run
with `--run=0` (which is a common way to determine the test case number
corresponding to a given test case title).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agomulti-pack-index: add [--[no-]progress] option.
William Baker [Mon, 21 Oct 2019 18:40:03 +0000 (18:40 +0000)]
multi-pack-index: add [--[no-]progress] option.

Add the --[no-]progress option to git multi-pack-index.
Pass the MIDX_PROGRESS flag to the subcommand functions
when progress should be displayed by multi-pack-index.
The progress feature was added to 'verify' in 144d703
("multi-pack-index: report progress during 'verify'", 2018-09-13)
but some subcommands were not updated to display progress, and
the ability to opt-out was overlooked.

Signed-off-by: William Baker <William.Baker@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agomidx: honor the MIDX_PROGRESS flag in midx_repack
William Baker [Mon, 21 Oct 2019 18:40:02 +0000 (18:40 +0000)]
midx: honor the MIDX_PROGRESS flag in midx_repack

Update midx_repack to only display progress when
the MIDX_PROGRESS flag is set.

Signed-off-by: William Baker <William.Baker@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agomidx: honor the MIDX_PROGRESS flag in verify_midx_file
William Baker [Mon, 21 Oct 2019 18:40:01 +0000 (18:40 +0000)]
midx: honor the MIDX_PROGRESS flag in verify_midx_file

Update verify_midx_file to only display progress when
the MIDX_PROGRESS flag is set.

Signed-off-by: William Baker <William.Baker@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agomidx: add progress to expire_midx_packs
William Baker [Mon, 21 Oct 2019 18:40:00 +0000 (18:40 +0000)]
midx: add progress to expire_midx_packs

Add progress to expire_midx_packs.  Progress is
displayed when the MIDX_PROGRESS flag is set.

Signed-off-by: William Baker <William.Baker@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agomidx: add progress to write_midx_file
William Baker [Mon, 21 Oct 2019 18:39:59 +0000 (18:39 +0000)]
midx: add progress to write_midx_file

Add progress to write_midx_file.  Progress is displayed
when the MIDX_PROGRESS flag is set.

Signed-off-by: William Baker <William.Baker@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agomidx: add MIDX_PROGRESS flag
William Baker [Mon, 21 Oct 2019 18:39:58 +0000 (18:39 +0000)]
midx: add MIDX_PROGRESS flag

Add the MIDX_PROGRESS flag and update the
write|verify|expire|repack functions in midx.h
to accept a flags parameter.  The MIDX_PROGRESS
flag indicates whether the caller of the function
would like progress information to be displayed.
This patch only changes the method prototypes
and does not change the functionality. The
functionality change will be handled by a later patch.

Signed-off-by: William Baker <William.Baker@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit: give correct advice for empty commit during a rebase
Johannes Schindelin [Tue, 22 Oct 2019 23:30:22 +0000 (23:30 +0000)]
commit: give correct advice for empty commit during a rebase

In dcb500dc16c (cherry-pick/revert: advise using --skip, 2019-07-02),
`git commit` learned to suggest to run `git cherry-pick --skip` when
trying to cherry-pick an empty patch.

However, it was overlooked that there are more conditions than just a
`git cherry-pick` when this advice is printed (which originally
suggested the neutral `git reset`): the same can happen during a rebase.

Let's suggest the correct command, even during a rebase.

While at it, we adjust more places in `builtin/commit.c` that
incorrectly assumed that the presence of a `CHERRY_PICK_HEAD` meant that
surely this must be a `cherry-pick` in progress.

Note: we take pains to handle the situation when a user runs a `git
cherry-pick` _during_ a rebase. This is quite valid (e.g. in an `exec`
line in an interactive rebase). On the other hand, it is not possible to
run a rebase during a cherry-pick, meaning: if both `rebase-merge/` and
`sequencer/` exist, we still want to advise to use `git cherry-pick
--skip`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agosequencer: export the function to get the path of `.git/rebase-merge/`
Johannes Schindelin [Tue, 22 Oct 2019 23:30:21 +0000 (23:30 +0000)]
sequencer: export the function to get the path of `.git/rebase-merge/`

The presence of this path will be used in the next commit to fix an
incorrect piece of advice in `git commit` when in the middle of a
rebase.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocherry-pick: add test for `--skip` advice in `git commit`
Johannes Schindelin [Tue, 22 Oct 2019 23:30:20 +0000 (23:30 +0000)]
cherry-pick: add test for `--skip` advice in `git commit`

In dcb500dc16c (cherry-pick/revert: advise using --skip, 2019-07-02),
`git commit` learned to suggest to run `git cherry-pick --skip` when
trying to cherry-pick an empty patch, but that was never tested for.

Here is a test that verifies that a message is given to the user that
contains the correct invocation.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoci(osx): use new location of the `perforce` cask
Johannes Schindelin [Wed, 23 Oct 2019 00:19:38 +0000 (00:19 +0000)]
ci(osx): use new location of the `perforce` cask

The Azure Pipelines builds are failing for macOS due to a change in the
location of the perforce cask. The command outputs the following error:

    + brew install caskroom/cask/perforce
    Error: caskroom/cask was moved. Tap homebrew/cask-cask instead.

So let's try to call `brew cask install perforce` first (which is what
that error message suggests, in a most round-about way).

Prior to 672f51cb we used to install the 'perforce' package with 'brew
install perforce' (note: no 'cask' in there). The justification for
672f51cb was that the command 'brew install perforce' simply stopped
working, after Homebrew folks decided that it's better to move the
'perforce' package to a "cask". Their justification for this move was
that 'brew install perforce' "can fail due to a checksum mismatch ...",
and casks can be installed without checksum verification. And indeed,
both 'brew cask install perforce' and 'brew install
caskroom/cask/perforce' printed something along the lines of:

  ==> No checksum defined for Cask perforce, skipping verification

It is unclear why 672f51cb used 'brew install caskroom/cask/perforce'
instead of 'brew cask install perforce'. It appears (by running both
commands on old Travis CI macOS images) that both commands worked all
the same already back then.

In any case, as the error message at the top of this commit message
shows, 'brew install caskroom/cask/perforce' has stopped working
recently, but 'brew cask install perforce' still does, so let's use
that.

CI servers are typically fresh virtual machines, but not always. To
accommodate for that, let's try harder if `brew cask install perforce`
fails, by specifically pulling the latest `master` of the
`homebrew-cask` repository.

This will still fail, of course, when `homebrew-cask` falls behind
Perforce's release schedule. But once it is updated, we can now simply
re-run the failed jobs and they will pick up that update.

As for updating `homebrew-cask`: the beginnings of automating this in
https://dev.azure.com/gitgitgadget/git/_build?definitionId=11&_a=summary
will be finished once the next Perforce upgrade comes around.

Helped-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoRevert "Merge branch 'js/azure-ci-osx-fix' into next"
Junio C Hamano [Wed, 23 Oct 2019 02:46:16 +0000 (11:46 +0900)]
Revert "Merge branch 'js/azure-ci-osx-fix' into next"

This reverts commit bc6a502f6e9eab12452de514e22b5616e5f6903f, reversing
changes made to 40e992b6f587bfc8a8764586367527b828972beb.

5 years agot604[236]: do not run setup in separate tests
Elijah Newren [Tue, 22 Oct 2019 21:22:51 +0000 (21:22 +0000)]
t604[236]: do not run setup in separate tests

Transform the setup "tests" to setup functions, and have the actual
tests call the setup functions.  Advantages:

  * Should make life easier for people working with webby CI/PR builds
    who have to abuse mice (and their own index finger as well) in
    order to switch from viewing one testcase to another.  Sounds
    awful; hopefully this will improve things for them.

  * Improves re-runnability: any failed test in any of these three
    files can now be re-run in isolation, e.g.
       ./t6042* --ver --imm -x --run=21
    whereas before it would require two tests to be specified to the
    --run argument, the other needing to be picked out as the relevant
    setup test from one or two tests before.

  * Importantly, this still keeps the "setup" and "test" sections
    somewhat separate to make it easier for readers to discern what is
    just ancillary setup and what the intent of the test is.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agomerge-recursive: fix merging a subdirectory into the root directory
Elijah Newren [Tue, 22 Oct 2019 21:22:50 +0000 (21:22 +0000)]
merge-recursive: fix merging a subdirectory into the root directory

We allow renaming all entries in e.g. a directory named z/ into a
directory named y/ to be detected as a z/ -> y/ rename, so that if the
other side of history adds any files to the directory z/ in the mean
time, we can provide the hint that they should be moved to y/.

There is no reason to not allow 'y/' to be the root directory, but the
code did not handle that case correctly.  Add a testcase and the
necessary special checks to support this case.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agomerge-recursive: clean up get_renamed_dir_portion()
Elijah Newren [Tue, 22 Oct 2019 21:22:49 +0000 (21:22 +0000)]
merge-recursive: clean up get_renamed_dir_portion()

Dscho noted a few things making this function hard to follow.
Restructure it a bit and add comments to make it easier to follow.  The
restructurings include:

  * There was a special case if-check at the end of the function
    checking whether someone just renamed a file within its original
    directory, meaning that there could be no directory rename involved.
    That check was slightly convoluted; it could be done in a more
    straightforward fashion earlier in the function, and can be done
    more cheaply too (no call to strncmp).

  * The conditions for advancing end_of_old and end_of_new before
    calling strchr were both confusing and unnecessary.  If either
    points at a '/', then they need to be advanced in order to find the
    next '/'.  If either doesn't point at a '/', then advancing them one
    char before calling strchr() doesn't hurt.  So, just rip out the
    if conditions and advance both before calling strchr().

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodoc: am --show-current-patch gives an entire e-mail message
Junio C Hamano [Wed, 23 Oct 2019 02:26:37 +0000 (11:26 +0900)]
doc: am --show-current-patch gives an entire e-mail message

The existing wording gives an impression that it only gives the
contents of the $GIT_DIR/rebase-apply/patch file, i.e. the patch
proper, but the option actually emits the entire e-mail message
being processed (iow, one of the output files from "git mailsplit").

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot7419: change test_must_fail to ! for grep
Denton Liu [Tue, 22 Oct 2019 09:57:01 +0000 (02:57 -0700)]
t7419: change test_must_fail to ! for grep

According to t/README, test_must_fail() should only be used to test for
failure in Git commands. Replace the invocations of
`test_must_fail grep` with `! grep`.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot4014: make output-directory tests self-contained
Bert Wesarg [Mon, 21 Oct 2019 13:23:42 +0000 (15:23 +0200)]
t4014: make output-directory tests self-contained

As noted by Gábor in [1], the new tests in edefc31873 ("format-patch:
create leading components of output directory", 2019-10-11) cannot be
run independently. Fix this.

[1] https://public-inbox.org/git/20191011144650.GM29845@szeder.dev/

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'js/azure-pipelines-msvc'
Junio C Hamano [Wed, 23 Oct 2019 02:06:46 +0000 (11:06 +0900)]
Merge branch 'js/azure-pipelines-msvc'

* js/azure-pipelines-msvc:
  ci(visual-studio): actually run the tests in parallel
  ci(visual-studio): use strict compile flags, and optimization

5 years agoMerge branch 'js/azure-pipelines-msvc' into next
Junio C Hamano [Wed, 23 Oct 2019 02:06:34 +0000 (11:06 +0900)]
Merge branch 'js/azure-pipelines-msvc' into next

* js/azure-pipelines-msvc:
  ci(visual-studio): actually run the tests in parallel
  ci(visual-studio): use strict compile flags, and optimization

5 years agoci(visual-studio): actually run the tests in parallel
Johannes Schindelin [Mon, 21 Oct 2019 19:59:58 +0000 (19:59 +0000)]
ci(visual-studio): actually run the tests in parallel

Originally, the CI/PR builds that build and test using Visual Studio
were implemented imitating `linux-clang`, i.e. still using the
`Makefile`-based build infrastructure.

Later (but still before the patches made their way into git.git's
`master`), however, this was changed to generate Visual Studio project
files and build the binaries using `MSBuild`, as this reflects more
accurately how Visual Studio users would want to build Git (internally,
Visual Studio uses `MSBuild`, or at least something very similar).

During that transition, we needed to implement a new way to run the test
suite in parallel, as Visual Studio users typically will only have a Git
Bash available (which does not ship with `make` nor with support for
`prove`): we simply implemented a new test helper to run the test suite.

This helper even knows how to run the tests in parallel, but due to a
mistake on this developer's part, it was never turned on in the CI/PR
builds. This results in 2x-3x longer run times of the test phase.

Let's use the `--jobs=10` option to fix this.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoci(visual-studio): use strict compile flags, and optimization
Johannes Schindelin [Mon, 21 Oct 2019 19:59:57 +0000 (19:59 +0000)]
ci(visual-studio): use strict compile flags, and optimization

To make full use of the work that went into the Visual Studio build &
test jobs in our CI/PR builds, let's turn on strict compiler flags. This
will give us the benefit of Visual C's compiler warnings (which, at
times, seem to catch things that GCC does not catch, and vice versa).

While at it, also turn on optimization; It does not make sense to
produce binaries with debug information, and we can use any ounce of
speed that we get (because the test suite is particularly slow on
Windows, thanks to the need to run inside a Unix shell, which
requires us to use the POSIX emulation layer provided by MSYS2).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'sb/userdiff-dts' into next
Junio C Hamano [Mon, 21 Oct 2019 14:56:45 +0000 (23:56 +0900)]
Merge branch 'sb/userdiff-dts' into next

Tweak userdiff patterns for dts.

* sb/userdiff-dts:
  userdiff: fix some corner cases in dts regex

5 years agoMerge branch 'sg/progress-fix' into next
Junio C Hamano [Mon, 21 Oct 2019 14:56:45 +0000 (23:56 +0900)]
Merge branch 'sg/progress-fix' into next

Byte-order fix the recent update to progress display code.

* sg/progress-fix:
  test-progress: fix test failures on big-endian systems

5 years agoMerge branch 'nr/diff-highlight-indent-fix' into next
Junio C Hamano [Mon, 21 Oct 2019 14:56:44 +0000 (23:56 +0900)]
Merge branch 'nr/diff-highlight-indent-fix' into next

Code cleanup.

* nr/diff-highlight-indent-fix:
  diff-highlight: fix a whitespace nit

5 years agoMerge branch 'mb/clarify-zsh-completion-doc' into next
Junio C Hamano [Mon, 21 Oct 2019 14:56:44 +0000 (23:56 +0900)]
Merge branch 'mb/clarify-zsh-completion-doc' into next

The installation instruction for zsh completion script (in
contrib/) has been a bit improved.

* mb/clarify-zsh-completion-doc:
  completion: clarify installation instruction for zsh

5 years agouserdiff: fix some corner cases in dts regex
Stephen Boyd [Sun, 20 Oct 2019 18:52:30 +0000 (11:52 -0700)]
userdiff: fix some corner cases in dts regex

While reviewing some dts diffs recently I noticed that the hunk header
logic was failing to find the containing node. This is because the regex
doesn't consider properties that may span multiple lines, i.e.

property = <something>,
   <something_else>;

and it got hung up on comments inside nodes that look like the root node
because they start with '/*'. Add tests for these cases and update the
regex to find them. Maybe detecting the root node is too complicated but
forcing it to be a backslash with any amount of whitespace up to an open
bracket seemed OK. I tried to detect that a comment is in-between the
two parts but I wasn't happy so I just dropped it.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agobuiltin/blame.c: constants into bit shift format
Hariom Verma [Thu, 17 Oct 2019 17:46:51 +0000 (17:46 +0000)]
builtin/blame.c: constants into bit shift format

We are looking at bitfield constants, and elsewhere in the Git source
code, such cases are handled via bit shift operators rather than octal
numbers, which also makes it easier to spot holes in the range
(if, say, 1<<5 was missing, it is easier to spot it between 1<<4
and 1<<6 than it is to spot a missing 040 between a 020 and a 0100).

Signed-off-by: Hariom Verma <hariom18599@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agorebase: hide --preserve-merges option
Denton Liu [Fri, 18 Oct 2019 23:55:56 +0000 (16:55 -0700)]
rebase: hide --preserve-merges option

Since --preserve-merges has been deprecated in favour of
--rebase-merges, mark this option as hidden so it no longer shows up in
the usage and completions.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotest-progress: fix test failures on big-endian systems
SZEDER Gábor [Sat, 19 Oct 2019 23:37:06 +0000 (01:37 +0200)]
test-progress: fix test failures on big-endian systems

In 't0500-progress-display.sh' all tests running 'test-tool progress
--total=<N>' fail on big-endian systems, e.g. like this:

  + test-tool progress --total=3 Working hard
  [...]
  + test_i18ncmp expect out
  --- expect 2019-10-18 23:07:54.765523916 +0000
  +++ out 2019-10-18 23:07:54.773523916 +0000
  @@ -1,4 +1,2 @@
  -Working hard:  33% (1/3)<CR>
  -Working hard:  66% (2/3)<CR>
  -Working hard: 100% (3/3)<CR>
  -Working hard: 100% (3/3), done.
  +Working hard:   0% (1/12884901888)<CR>
  +Working hard:   0% (3/12884901888), done.

The reason for that bogus value is that '--total's parameter is parsed
via parse-options's OPT_INTEGER into a uint64_t variable [1], so the
two bits of 3 end up in the "wrong" bytes on big-endian systems
(12884901888 = 0x300000000).

Change the type of that variable from uint64_t to int, to match what
parse-options expects; in the tests of the progress output we won't
use values that don't fit into an int anyway.

[1] start_progress() expects the total number as an uint64_t, that's
    why I chose the same type when declaring the variable holding the
    value given on the command line.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
[jpag: Debian unstable/ppc64 (big-endian)]
Tested-By: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
[tz: Fedora s390x (big-endian)]
Tested-By: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocompletion: clarify installation instruction for zsh
Maxim Belsky [Fri, 11 Oct 2019 17:54:28 +0000 (10:54 -0700)]
completion: clarify installation instruction for zsh

The original comment does not describe type of ~/.zsh/_git explicitly
and zsh does not warn or fail if a user create it as a dictionary.
So unexperienced users could be misled by the original comment.

There is a small update to clarify it.

Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Maxim Belsky <public.belsky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoSync with 2.24-rc0
Junio C Hamano [Fri, 18 Oct 2019 02:43:18 +0000 (11:43 +0900)]
Sync with 2.24-rc0

* master:
  Git 2.24-rc0

5 years agoMerge branch 'dd/notes-copy-default-dst-to-head' into next
Junio C Hamano [Fri, 18 Oct 2019 02:42:57 +0000 (11:42 +0900)]
Merge branch 'dd/notes-copy-default-dst-to-head' into next

"git notes copy $original" ought to copy the notes attached to the
original object to HEAD, but a mistaken tightening to command line
parameter validation made earlier disabled that feature by mistake.

* dd/notes-copy-default-dst-to-head:
  notes: fix minimum number of parameters to "copy" subcommand
  t3301: test diagnose messages for too few/many paramters

5 years agoMerge branch 'pw/post-commit-from-sequencer' into next
Junio C Hamano [Fri, 18 Oct 2019 02:42:57 +0000 (11:42 +0900)]
Merge branch 'pw/post-commit-from-sequencer' into next

"rebase -i" ceased to run post-commit hook by mistake in an earlier
update, which has been corrected.

* pw/post-commit-from-sequencer:
  sequencer: run post-commit hook
  move run_commit_hook() to libgit and use it there
  sequencer.h fix placement of #endif
  t3404: remove uneeded calls to set_fake_editor
  t3404: set $EDITOR in subshell
  t3404: remove unnecessary subshell

5 years agoMerge branch 'js/azure-ci-osx-fix' into next
Junio C Hamano [Fri, 18 Oct 2019 02:42:57 +0000 (11:42 +0900)]
Merge branch 'js/azure-ci-osx-fix' into next

Update installation procedure for Perforce on MacOS in the CI jobs
running on Azure pipelines, which was failing.

* js/azure-ci-osx-fix:
  ci(osx): use new location of the `perforce` cask

5 years agoMerge branch 'dl/format-patch-cover-from-desc' into next
Junio C Hamano [Fri, 18 Oct 2019 02:42:57 +0000 (11:42 +0900)]
Merge branch 'dl/format-patch-cover-from-desc' into next

The branch description ("git branch --edit-description") has been
used to fill the body of the cover letters by the format-patch
command; this has been enhanced so that the subject can also be
filled.

* dl/format-patch-cover-from-desc:
  format-patch: teach --cover-from-description option
  format-patch: use enum variables
  format-patch: replace erroneous and condition

5 years agoMerge branch 'cb/pcre2-chartables-leakfix' into next
Junio C Hamano [Fri, 18 Oct 2019 02:42:56 +0000 (11:42 +0900)]
Merge branch 'cb/pcre2-chartables-leakfix' into next

Leakfix.

* cb/pcre2-chartables-leakfix:
  grep: avoid leak of chartables in PCRE2
  grep: make PCRE2 aware of custom allocator
  grep: make PCRE1 aware of custom allocator

5 years agoMerge branch 'es/walken-tutorial' into next
Junio C Hamano [Fri, 18 Oct 2019 02:42:56 +0000 (11:42 +0900)]
Merge branch 'es/walken-tutorial' into next

A tutorial on object enumeration.

* es/walken-tutorial:
  documentation: add tutorial for object walking

5 years agoMerge branch 'ag/sequencer-todo-updates' into next
Junio C Hamano [Fri, 18 Oct 2019 02:42:56 +0000 (11:42 +0900)]
Merge branch 'ag/sequencer-todo-updates' into next

Reduce unnecessary reading of state variables back from the disk
during sequener operation.

* ag/sequencer-todo-updates:
  sequencer: directly call pick_commits() from complete_action()
  rebase: fill `squash_onto' in get_replay_opts()
  sequencer: move the code writing total_nr on the disk to a new function
  sequencer: update `done_nr' when skipping commands in a todo list
  sequencer: update `total_nr' when adding an item to a todo list

5 years agoMerge branch 'jt/fetch-pack-record-refs-in-the-dot-promisor' into next
Junio C Hamano [Fri, 18 Oct 2019 02:42:56 +0000 (11:42 +0900)]
Merge branch 'jt/fetch-pack-record-refs-in-the-dot-promisor' into next

Debugging support for lazy cloning has been a bit improved.

* jt/fetch-pack-record-refs-in-the-dot-promisor:
  fetch-pack: write fetched refs to .promisor

5 years agoGit 2.24-rc0 v2.24.0-rc0
Junio C Hamano [Fri, 18 Oct 2019 02:31:00 +0000 (11:31 +0900)]
Git 2.24-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'rs/remote-curl-use-argv-array'
Junio C Hamano [Fri, 18 Oct 2019 02:40:50 +0000 (11:40 +0900)]
Merge branch 'rs/remote-curl-use-argv-array'

Code cleanup.

* rs/remote-curl-use-argv-array:
  remote-curl: use argv_array in parse_push()

5 years agoMerge branch 'rs/column-use-utf8-strnwidth'
Junio C Hamano [Fri, 18 Oct 2019 02:40:49 +0000 (11:40 +0900)]
Merge branch 'rs/column-use-utf8-strnwidth'

Code cleanup.

* rs/column-use-utf8-strnwidth:
  column: use utf8_strnwidth() to strip out ANSI color escapes

5 years agoMerge branch 'rs/http-push-simplify'
Junio C Hamano [Fri, 18 Oct 2019 02:40:49 +0000 (11:40 +0900)]
Merge branch 'rs/http-push-simplify'

Code cleanup.

* rs/http-push-simplify:
  http-push: simplify deleting a list item

5 years agoMerge branch 'jj/stash-reset-only-toplevel'
Junio C Hamano [Fri, 18 Oct 2019 02:40:49 +0000 (11:40 +0900)]
Merge branch 'jj/stash-reset-only-toplevel'

"git stash save" lost local changes to submodules, which has been
corrected.

* jj/stash-reset-only-toplevel:
  stash: avoid recursive hard reset on submodules

5 years agoMerge branch 'bw/format-patch-o-create-leading-dirs'
Junio C Hamano [Fri, 18 Oct 2019 02:40:48 +0000 (11:40 +0900)]
Merge branch 'bw/format-patch-o-create-leading-dirs'

"git format-patch -o <outdir>" did an equivalent of "mkdir <outdir>"
not "mkdir -p <outdir>", which is being corrected.

* bw/format-patch-o-create-leading-dirs:
  format-patch: create leading components of output directory

5 years agoMerge branch 'bb/compat-util-comment-fix'
Junio C Hamano [Fri, 18 Oct 2019 02:40:48 +0000 (11:40 +0900)]
Merge branch 'bb/compat-util-comment-fix'

Code cleanup.

* bb/compat-util-comment-fix:
  git-compat-util: fix documentation syntax

5 years agoMerge branch 'bb/utf8-wcwidth-cleanup'
Junio C Hamano [Fri, 18 Oct 2019 02:40:48 +0000 (11:40 +0900)]
Merge branch 'bb/utf8-wcwidth-cleanup'

Code cleanup.

* bb/utf8-wcwidth-cleanup:
  utf8: use ARRAY_SIZE() in git_wcwidth()

5 years agoMerge branch 'dl/allow-running-cocci-verbosely'
Junio C Hamano [Fri, 18 Oct 2019 02:40:48 +0000 (11:40 +0900)]
Merge branch 'dl/allow-running-cocci-verbosely'

Dev support update.

* dl/allow-running-cocci-verbosely:
  Makefile: respect $(V) in %.cocci.patch target

5 years agoMerge branch 'dl/compat-cleanup'
Junio C Hamano [Fri, 18 Oct 2019 02:40:47 +0000 (11:40 +0900)]
Merge branch 'dl/compat-cleanup'

Code formatting micronit fix.

* dl/compat-cleanup:
  pthread.h: manually align parameter lists

5 years agoMerge branch 'ta/t1308-typofix'
Junio C Hamano [Fri, 18 Oct 2019 02:40:47 +0000 (11:40 +0900)]
Merge branch 'ta/t1308-typofix'

Test fix.

* ta/t1308-typofix:
  t1308-config-set: fix a test that has a typo

5 years agoMerge branch 'js/doc-stash-save'
Junio C Hamano [Fri, 18 Oct 2019 02:40:47 +0000 (11:40 +0900)]
Merge branch 'js/doc-stash-save'

Doc clarification.

* js/doc-stash-save:
  doc(stash): clarify the description of `save`

5 years agoMerge branch 'bc/smart-http-atomic-push' into next
Junio C Hamano [Fri, 18 Oct 2019 01:51:25 +0000 (10:51 +0900)]
Merge branch 'bc/smart-http-atomic-push' into next

The atomic push over smart HTTP transport did not work, which has
been corrected.

* bc/smart-http-atomic-push:
  remote-curl: pass on atomic capability to remote side

5 years agogrep: avoid leak of chartables in PCRE2
Carlo Marcelo Arenas Belón [Wed, 16 Oct 2019 12:10:24 +0000 (12:10 +0000)]
grep: avoid leak of chartables in PCRE2

94da9193a6 ("grep: add support for PCRE v2", 2017-06-01) introduced
a small memory leak visible with valgrind in t7813.

Complete the creation of a PCRE2 specific variable that was missing from
the original change and free the generated table just like it is done
for PCRE1.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>