]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
4 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>
4 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>
4 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>
4 years agoEighth batch
Junio C Hamano [Fri, 11 Oct 2019 05:16:01 +0000 (14:16 +0900)] 
Eighth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'dl/rev-list-doc-cleanup'
Junio C Hamano [Fri, 11 Oct 2019 05:24:48 +0000 (14:24 +0900)] 
Merge branch 'dl/rev-list-doc-cleanup'

Doc update.

* dl/rev-list-doc-cleanup:
  git-rev-list.txt: prune options in synopsis

4 years agoMerge branch 'kt/add-i-progress'
Junio C Hamano [Fri, 11 Oct 2019 05:24:48 +0000 (14:24 +0900)] 
Merge branch 'kt/add-i-progress'

"git add -i" has been taught to show the total number of hunks and
the hunks that has been processed so far when showing prompts.

* kt/add-i-progress:
  add -i: show progress counter in the prompt

4 years agoMerge branch 'js/stash-apply-in-secondary-worktree'
Junio C Hamano [Fri, 11 Oct 2019 05:24:48 +0000 (14:24 +0900)] 
Merge branch 'js/stash-apply-in-secondary-worktree'

"git stash apply" in a subdirectory of a secondary worktree failed
to access the worktree correctly, which has been corrected.

* js/stash-apply-in-secondary-worktree:
  stash apply: report status correctly even in a worktree's subdirectory

4 years agoMerge branch 'rs/dedup-includes'
Junio C Hamano [Fri, 11 Oct 2019 05:24:48 +0000 (14:24 +0900)] 
Merge branch 'rs/dedup-includes'

Code cleanup.

* rs/dedup-includes:
  treewide: remove duplicate #include directives

4 years agoMerge branch 'js/range-diff-noprefix'
Junio C Hamano [Fri, 11 Oct 2019 05:24:47 +0000 (14:24 +0900)] 
Merge branch 'js/range-diff-noprefix'

"git range-diff" segfaulted when diff.noprefix configuration was
used, as it blindly expected the patch it internally generates to
have the standard a/ and b/ prefixes.  The command now forces the
internal patch to be built without any prefix, not to be affected
by any end-user configuration.

* js/range-diff-noprefix:
  range-diff: internally force `diff.noprefix=true`

4 years agoMerge branch 'cb/pcre1-cleanup'
Junio C Hamano [Fri, 11 Oct 2019 05:24:47 +0000 (14:24 +0900)] 
Merge branch 'cb/pcre1-cleanup'

PCRE fixes.

* cb/pcre1-cleanup:
  grep: refactor and simplify PCRE1 support
  grep: make sure NO_LIBPCRE1_JIT disable JIT in PCRE1

4 years agoMerge branch 'ab/pcre-jit-fixes'
Junio C Hamano [Fri, 11 Oct 2019 05:24:47 +0000 (14:24 +0900)] 
Merge branch 'ab/pcre-jit-fixes'

A few simplification and bugfixes to PCRE interface.

* ab/pcre-jit-fixes:
  grep: under --debug, show whether PCRE JIT is enabled
  grep: do not enter PCRE2_UTF mode on fixed matching
  grep: stess test PCRE v2 on invalid UTF-8 data
  grep: create a "is_fixed" member in "grep_pat"
  grep: consistently use "p->fixed" in compile_regexp()
  grep: stop using a custom JIT stack with PCRE v1
  grep: stop "using" a custom JIT stack with PCRE v2
  grep: remove overly paranoid BUG(...) code
  grep: use PCRE v2 for optimized fixed-string search
  grep: remove the kwset optimization
  grep: drop support for \0 in --fixed-strings <pattern>
  grep: make the behavior for NUL-byte in patterns sane
  grep tests: move binary pattern tests into their own file
  grep tests: move "grep binary" alongside the rest
  grep: inline the return value of a function call used only once
  t4210: skip more command-line encoding tests on MinGW
  grep: don't use PCRE2?_UTF8 with "log --encoding=<non-utf8>"
  log tests: test regex backends in "--encode=<enc>" tests

4 years agoMerge branch 'pw/rebase-i-show-HEAD-to-reword'
Junio C Hamano [Fri, 11 Oct 2019 05:24:46 +0000 (14:24 +0900)] 
Merge branch 'pw/rebase-i-show-HEAD-to-reword'

"git rebase -i" showed a wrong HEAD while "reword" open the editor.

* pw/rebase-i-show-HEAD-to-reword:
  sequencer: simplify root commit creation
  rebase -i: check for updated todo after squash and reword
  rebase -i: always update HEAD before rewording

4 years agoMerge branch 'tk/git-svn-trim-author-name'
Junio C Hamano [Fri, 11 Oct 2019 05:24:46 +0000 (14:24 +0900)] 
Merge branch 'tk/git-svn-trim-author-name'

The author names taken from SVN repositories may have extra leading
or trailing whitespaces, which are now munged away.

* tk/git-svn-trim-author-name:
  git-svn: trim leading and trailing whitespaces in author name

4 years agoMerge branch 'bc/object-id-part17'
Junio C Hamano [Fri, 11 Oct 2019 05:24:46 +0000 (14:24 +0900)] 
Merge branch 'bc/object-id-part17'

Preparation for SHA-256 upgrade continues.

* bc/object-id-part17: (26 commits)
  midx: switch to using the_hash_algo
  builtin/show-index: replace sha1_to_hex
  rerere: replace sha1_to_hex
  builtin/receive-pack: replace sha1_to_hex
  builtin/index-pack: replace sha1_to_hex
  packfile: replace sha1_to_hex
  wt-status: convert struct wt_status to object_id
  cache: remove null_sha1
  builtin/worktree: switch null_sha1 to null_oid
  builtin/repack: write object IDs of the proper length
  pack-write: use hash_to_hex when writing checksums
  sequencer: convert to use the_hash_algo
  bisect: switch to using the_hash_algo
  sha1-lookup: switch hard-coded constants to the_hash_algo
  config: use the_hash_algo in abbrev comparison
  combine-diff: replace GIT_SHA1_HEXSZ with the_hash_algo
  bundle: switch to use the_hash_algo
  connected: switch GIT_SHA1_HEXSZ to the_hash_algo
  show-index: switch hard-coded constants to the_hash_algo
  blame: remove needless comparison with GIT_SHA1_HEXSZ
  ...

4 years agoMerge branch 'en/clean-nested-with-ignored'
Junio C Hamano [Fri, 11 Oct 2019 05:24:45 +0000 (14:24 +0900)] 
Merge branch 'en/clean-nested-with-ignored'

"git clean" fixes.

* en/clean-nested-with-ignored:
  dir: special case check for the possibility that pathspec is NULL
  clean: fix theoretical path corruption
  clean: rewrap overly long line
  clean: avoid removing untracked files in a nested git repository
  clean: disambiguate the definition of -d
  git-clean.txt: do not claim we will delete files with -n/--dry-run
  dir: add commentary explaining match_pathspec_item's return value
  dir: if our pathspec might match files under a dir, recurse into it
  dir: make the DO_MATCH_SUBMODULE code reusable for a non-submodule case
  dir: also check directories for matching pathspecs
  dir: fix off-by-one error in match_pathspec_item
  dir: fix typo in comment
  t7300: add testcases showing failure to clean specified pathspecs

4 years agoSeventh batch
Junio C Hamano [Wed, 9 Oct 2019 05:02:58 +0000 (14:02 +0900)] 
Seventh batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'rs/test-remove-useless-debugging-cat'
Junio C Hamano [Wed, 9 Oct 2019 05:01:01 +0000 (14:01 +0900)] 
Merge branch 'rs/test-remove-useless-debugging-cat'

Code cleanup.

* rs/test-remove-useless-debugging-cat:
  tests: remove "cat foo" before "test_i18ngrep bar foo"

4 years agoMerge branch 'pm/p4-auto-delete-named-temporary'
Junio C Hamano [Wed, 9 Oct 2019 05:01:00 +0000 (14:01 +0900)] 
Merge branch 'pm/p4-auto-delete-named-temporary'

* pm/p4-auto-delete-named-temporary:
  git-p4: auto-delete named temporary file

4 years agoMerge branch 'rs/convert-fix-utf-without-dash'
Junio C Hamano [Wed, 9 Oct 2019 05:01:00 +0000 (14:01 +0900)] 
Merge branch 'rs/convert-fix-utf-without-dash'

The code to skip "UTF" and "UTF-" prefix, when computing an advice
message, did not work correctly when the prefix was "UTF", which
has been fixed.

* rs/convert-fix-utf-without-dash:
  convert: fix handling of dashless UTF prefix in validate_encoding()

4 years agoMerge branch 'py/git-gui-has-maintainer'
Junio C Hamano [Wed, 9 Oct 2019 05:01:00 +0000 (14:01 +0900)] 
Merge branch 'py/git-gui-has-maintainer'

Doc update.

* py/git-gui-has-maintainer:
  Documentation: update the location of the git-gui repo

4 years agoMerge branch 'ah/cleanups'
Junio C Hamano [Wed, 9 Oct 2019 05:01:00 +0000 (14:01 +0900)] 
Merge branch 'ah/cleanups'

Miscellaneous code clean-ups.

* ah/cleanups:
  git_mkstemps_mode(): replace magic numbers with computed value
  wrapper: use a loop instead of repetitive statements
  diffcore-break: use a goto instead of a redundant if statement
  commit-graph: remove a duplicate assignment

4 years agoMerge branch 'js/diff-rename-force-stable-sort'
Junio C Hamano [Wed, 9 Oct 2019 05:00:59 +0000 (14:00 +0900)] 
Merge branch 'js/diff-rename-force-stable-sort'

The rename detection logic sorts a list of rename source candidates
by similarity to pick the best candidate, which means that a tie
between sources with the same similarity is broken by the original
location in the original candidate list (which is sorted by path).
Force the sorting by similarity done with a stable sort, which is
not promised by system supplied qsort(3), to ensure consistent
results across platforms.

* js/diff-rename-force-stable-sort:
  diffcore_rename(): use a stable sort
  Move git_sort(), a stable sort, into into libgit.a

4 years agoMerge branch 'js/mingw-spawn-with-spaces-in-path'
Junio C Hamano [Wed, 9 Oct 2019 05:00:59 +0000 (14:00 +0900)] 
Merge branch 'js/mingw-spawn-with-spaces-in-path'

Test fix.

* js/mingw-spawn-with-spaces-in-path:
  t0061: fix test for argv[0] with spaces (MINGW only)

4 years agoMerge branch 'as/shallow-slab-use-fix'
Junio C Hamano [Wed, 9 Oct 2019 05:00:59 +0000 (14:00 +0900)] 
Merge branch 'as/shallow-slab-use-fix'

Correct code that tried to reference all entries in a sparse array
of pointers by mistake.

* as/shallow-slab-use-fix:
  shallow.c: don't free unallocated slabs

4 years agoMerge branch 'sg/name-rev-cutoff-underflow-fix'
Junio C Hamano [Wed, 9 Oct 2019 05:00:58 +0000 (14:00 +0900)] 
Merge branch 'sg/name-rev-cutoff-underflow-fix'

Integer arithmetic fix.

* sg/name-rev-cutoff-underflow-fix:
  name-rev: avoid cutoff timestamp underflow

4 years agoMerge branch 'am/visual-studio-config-fix'
Junio C Hamano [Wed, 9 Oct 2019 05:00:58 +0000 (14:00 +0900)] 
Merge branch 'am/visual-studio-config-fix'

Dev support.

* am/visual-studio-config-fix:
  contrib/buildsystems: fix Visual Studio Debug configuration

4 years agoSixth batch
Junio C Hamano [Mon, 7 Oct 2019 02:33:44 +0000 (11:33 +0900)] 
Sixth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'bw/submodule-helper-usage-fix'
Junio C Hamano [Mon, 7 Oct 2019 02:33:03 +0000 (11:33 +0900)] 
Merge branch 'bw/submodule-helper-usage-fix'

Typofix.

* bw/submodule-helper-usage-fix:
  builtin/submodule--helper: fix usage string for 'update-clone'

4 years agoMerge branch 'dl/honor-cflags-in-hdr-check'
Junio C Hamano [Mon, 7 Oct 2019 02:33:02 +0000 (11:33 +0900)] 
Merge branch 'dl/honor-cflags-in-hdr-check'

Dev support.

* dl/honor-cflags-in-hdr-check:
  ci: run `hdr-check` as part of the `Static Analysis` job
  Makefile: emulate compile in $(HCO) target better
  pack-bitmap.h: remove magic number
  promisor-remote.h: include missing header
  apply.h: include missing header

4 years agoMerge branch 'cb/do-not-use-test-cmp-with-a'
Junio C Hamano [Mon, 7 Oct 2019 02:33:02 +0000 (11:33 +0900)] 
Merge branch 'cb/do-not-use-test-cmp-with-a'

Test portability fix.

* cb/do-not-use-test-cmp-with-a:
  t4038: Remove non-portable '-a' option passed to test_cmp

4 years agoMerge branch 'cc/multi-promisor'
Junio C Hamano [Mon, 7 Oct 2019 02:33:02 +0000 (11:33 +0900)] 
Merge branch 'cc/multi-promisor'

Cleanup.

* cc/multi-promisor:
  promisor-remote: skip move_to_tail when no-op
  promisor-remote.h: drop extern from function declaration

4 years agoMerge branch 'jt/merge-recursive-symlink-is-not-a-dir-in-way'
Junio C Hamano [Mon, 7 Oct 2019 02:33:02 +0000 (11:33 +0900)] 
Merge branch 'jt/merge-recursive-symlink-is-not-a-dir-in-way'

A bug in merge-recursive code that triggers when a branch with a
symbolic link is merged with a branch that replaces it with a
directory has been fixed.

* jt/merge-recursive-symlink-is-not-a-dir-in-way:
  merge-recursive: symlink's descendants not in way

4 years agoMerge branch 'ps/my-first-contribution-alphasort'
Junio C Hamano [Mon, 7 Oct 2019 02:33:01 +0000 (11:33 +0900)] 
Merge branch 'ps/my-first-contribution-alphasort'

Docfix.

* ps/my-first-contribution-alphasort:
  doc: MyFirstContribution: fix cmd placement instructions

4 years agoMerge branch 'sg/travis-help-debug'
Junio C Hamano [Mon, 7 Oct 2019 02:33:01 +0000 (11:33 +0900)] 
Merge branch 'sg/travis-help-debug'

Dev support update.

* sg/travis-help-debug:
  travis-ci: do not skip successfully tested trees in debug mode

4 years agoMerge branch 'rs/alias-use-copy-array'
Junio C Hamano [Mon, 7 Oct 2019 02:33:01 +0000 (11:33 +0900)] 
Merge branch 'rs/alias-use-copy-array'

Code cleanup.

* rs/alias-use-copy-array:
  git: use COPY_ARRAY and MOVE_ARRAY in handle_alias()

4 years agoMerge branch 'sg/t-helper-gitignore'
Junio C Hamano [Mon, 7 Oct 2019 02:33:00 +0000 (11:33 +0900)] 
Merge branch 'sg/t-helper-gitignore'

Update the way build artifacts in t/helper/ directory are ignored.

* sg/t-helper-gitignore:
  t/helper: ignore only executable files

4 years agoMerge branch 'cc/svn-fe-py-shebang'
Junio C Hamano [Mon, 7 Oct 2019 02:33:00 +0000 (11:33 +0900)] 
Merge branch 'cc/svn-fe-py-shebang'

* cc/svn-fe-py-shebang:
  contrib/svn-fe: fix shebang for svnrdump_sim.py

4 years agoMerge branch 'ah/doc-submodule-ignore-submodules'
Junio C Hamano [Mon, 7 Oct 2019 02:33:00 +0000 (11:33 +0900)] 
Merge branch 'ah/doc-submodule-ignore-submodules'

Docfix.

* ah/doc-submodule-ignore-submodules:
  doc: fix reference to --ignore-submodules

4 years agoMerge branch 'rs/nth-switch-code-simplification'
Junio C Hamano [Mon, 7 Oct 2019 02:32:59 +0000 (11:32 +0900)] 
Merge branch 'rs/nth-switch-code-simplification'

Code simplification.

* rs/nth-switch-code-simplification:
  sha1_name: simplify strbuf handling in interpret_nth_prior_checkout()

4 years agoMerge branch 'hb/hg-to-git-py3'
Junio C Hamano [Mon, 7 Oct 2019 02:32:59 +0000 (11:32 +0900)] 
Merge branch 'hb/hg-to-git-py3'

The hg-to-git script (in contrib/) has been updated to work with
Python 3.

* hb/hg-to-git-py3:
  hg-to-git: make it compatible with both python3 and python2

4 years agoMerge branch 'sg/progress-fix'
Junio C Hamano [Mon, 7 Oct 2019 02:32:59 +0000 (11:32 +0900)] 
Merge branch 'sg/progress-fix'

Regression fix for progress output.

* sg/progress-fix:
  Test the progress display
  Revert "progress: use term_clear_line()"

4 years agoMerge branch 'js/doc-patch-text'
Junio C Hamano [Mon, 7 Oct 2019 02:32:59 +0000 (11:32 +0900)] 
Merge branch 'js/doc-patch-text'

Docfix.

* js/doc-patch-text:
  diff, log doc: small grammer, format, and language fixes
  diff, log doc: say "patch text" instead of "patches"

4 years agoMerge branch 'tb/commit-graph-harden'
Junio C Hamano [Mon, 7 Oct 2019 02:32:58 +0000 (11:32 +0900)] 
Merge branch 'tb/commit-graph-harden'

The code to parse and use the commit-graph file has been made more
robust against corrupted input.

* tb/commit-graph-harden:
  commit-graph.c: handle corrupt/missing trees
  commit-graph.c: handle commit parsing errors
  t/t5318: introduce failing 'git commit-graph write' tests

4 years agoMerge branch 'jt/cache-tree-avoid-lazy-fetch-during-merge'
Junio C Hamano [Mon, 7 Oct 2019 02:32:58 +0000 (11:32 +0900)] 
Merge branch 'jt/cache-tree-avoid-lazy-fetch-during-merge'

The cache-tree code has been taught to be less aggressive in
attempting to see if a tree object it computed already exists in
the repository.

* jt/cache-tree-avoid-lazy-fetch-during-merge:
  cache-tree: do not lazy-fetch tentative tree

4 years agoMerge branch 'dl/cocci-everywhere'
Junio C Hamano [Mon, 7 Oct 2019 02:32:58 +0000 (11:32 +0900)] 
Merge branch 'dl/cocci-everywhere'

Coccinelle checks are done on more source files than before now.

* dl/cocci-everywhere:
  Makefile: run coccicheck on more source files
  Makefile: strip leading ./ in $(FIND_SOURCE_FILES)
  Makefile: define THIRD_PARTY_SOURCES
  Makefile: strip leading ./ in $(LIB_H)

4 years agoMerge branch 'gs/commit-graph-progress'
Junio C Hamano [Mon, 7 Oct 2019 02:32:57 +0000 (11:32 +0900)] 
Merge branch 'gs/commit-graph-progress'

* gs/commit-graph-progress:
  commit-graph: add --[no-]progress to write and verify

4 years agoMerge branch 'ms/fetch-follow-tag-optim'
Junio C Hamano [Mon, 7 Oct 2019 02:32:57 +0000 (11:32 +0900)] 
Merge branch 'ms/fetch-follow-tag-optim'

The code used in following tags in "git fetch" has been optimized.

* ms/fetch-follow-tag-optim:
  fetch: use oidset to keep the want OIDs for faster lookup

4 years agoMerge branch 'rs/commit-graph-use-list-count'
Junio C Hamano [Mon, 7 Oct 2019 02:32:57 +0000 (11:32 +0900)] 
Merge branch 'rs/commit-graph-use-list-count'

Code cleanup.

* rs/commit-graph-use-list-count:
  commit-graph: use commit_list_count()

4 years agoMerge branch 'rs/nth-parent-parse'
Junio C Hamano [Mon, 7 Oct 2019 02:32:57 +0000 (11:32 +0900)] 
Merge branch 'rs/nth-parent-parse'

The object name parser for "Nth parent" syntax has been made more
robust against integer overflows.

* rs/nth-parent-parse:
  sha1-name: check for overflow of N in "foo^N" and "foo~N"
  rev-parse: demonstrate overflow of N for "foo^N" and "foo~N"

4 years agoMerge branch 'dl/submodule-set-branch'
Junio C Hamano [Mon, 7 Oct 2019 02:32:56 +0000 (11:32 +0900)] 
Merge branch 'dl/submodule-set-branch'

Docfix.

* dl/submodule-set-branch:
  git-submodule.txt: fix AsciiDoc formatting error

4 years agoMerge branch 'cs/pretty-formats-doc-typofix'
Junio C Hamano [Mon, 7 Oct 2019 02:32:56 +0000 (11:32 +0900)] 
Merge branch 'cs/pretty-formats-doc-typofix'

Doc fix.

* cs/pretty-formats-doc-typofix:
  doc: minor formatting fix

4 years agoMerge branch 'jk/list-objects-optim-wo-trees'
Junio C Hamano [Mon, 7 Oct 2019 02:32:56 +0000 (11:32 +0900)] 
Merge branch 'jk/list-objects-optim-wo-trees'

The object traversal machinery has been optimized not to load tree
objects when we are only interested in commit history.

* jk/list-objects-optim-wo-trees:
  list-objects: don't queue root trees unless revs->tree_objects is set

4 years agoMerge branch 'jk/disable-commit-graph-during-upload-pack'
Junio C Hamano [Mon, 7 Oct 2019 02:32:55 +0000 (11:32 +0900)] 
Merge branch 'jk/disable-commit-graph-during-upload-pack'

The "upload-pack" (the counterpart of "git fetch") needs to disable
commit-graph when responding to a shallow clone/fetch request, but
the way this was done made Git panic, which has been corrected.

* jk/disable-commit-graph-during-upload-pack:
  upload-pack: disable commit graph more gently for shallow traversal
  commit-graph: bump DIE_ON_LOAD check to actual load-time

4 years agoMerge branch 'mr/complete-more-for-log-etc'
Junio C Hamano [Mon, 7 Oct 2019 02:32:55 +0000 (11:32 +0900)] 
Merge branch 'mr/complete-more-for-log-etc'

Completion updates.

* mr/complete-more-for-log-etc:
  completion: add missing completions for log, diff, show

4 years agoMerge branch 'dl/complete-rebase-and-archive'
Junio C Hamano [Mon, 7 Oct 2019 02:32:55 +0000 (11:32 +0900)] 
Merge branch 'dl/complete-rebase-and-archive'

The command line completion for "git archive" and "git rebase" are
now made less prone to go out of sync with the binary.

* dl/complete-rebase-and-archive:
  completion: teach archive to use __gitcomp_builtin
  completion: teach rebase to use __gitcomp_builtin

4 years agoMerge branch 'jk/commit-graph-cleanup'
Junio C Hamano [Mon, 7 Oct 2019 02:32:55 +0000 (11:32 +0900)] 
Merge branch 'jk/commit-graph-cleanup'

A pair of small fixups to "git commit-graph" have been applied.

* jk/commit-graph-cleanup:
  commit-graph: turn off save_commit_buffer
  commit-graph: don't show progress percentages while expanding reachable commits

4 years agoMerge branch 'ss/get-time-cleanup'
Junio C Hamano [Mon, 7 Oct 2019 02:32:54 +0000 (11:32 +0900)] 
Merge branch 'ss/get-time-cleanup'

Code simplification.

* ss/get-time-cleanup:
  test_date.c: remove reference to GIT_TEST_DATE_NOW
  Quit passing 'now' to date code

4 years agoMerge branch 'rs/simplify-by-deco-with-deco-refs-exclude'
Junio C Hamano [Mon, 7 Oct 2019 02:32:54 +0000 (11:32 +0900)] 
Merge branch 'rs/simplify-by-deco-with-deco-refs-exclude'

"git log --decorate-refs-exclude=<pattern>" was incorrectly
overruled when the "--simplify-by-decoration" option is used, which
has been corrected.

* rs/simplify-by-deco-with-deco-refs-exclude:
  log-tree: call load_ref_decorations() in get_name_decoration()
  log: test --decorate-refs-exclude with --simplify-by-decoration

4 years agoMerge branch 'jk/partial-clone-sparse-blob'
Junio C Hamano [Mon, 7 Oct 2019 02:32:54 +0000 (11:32 +0900)] 
Merge branch 'jk/partial-clone-sparse-blob'

The name of the blob object that stores the filter specification
for sparse cloning/fetching was interpreted in a wrong place in the
code, causing Git to abort.

* jk/partial-clone-sparse-blob:
  list-objects-filter: use empty string instead of NULL for sparse "base"
  list-objects-filter: give a more specific error sparse parsing error
  list-objects-filter: delay parsing of sparse oid
  t5616: test cloning/fetching with sparse:oid=<oid> filter

4 years agoMerge branch 'tg/stash-refresh-index'
Junio C Hamano [Mon, 7 Oct 2019 02:32:53 +0000 (11:32 +0900)] 
Merge branch 'tg/stash-refresh-index'

"git stash" learned to write refreshed index back to disk.

* tg/stash-refresh-index:
  stash: make sure to write refreshed cache
  merge: use refresh_and_write_cache
  factor out refresh_and_write_cache function

4 years agotests: remove "cat foo" before "test_i18ngrep bar foo"
René Scharfe [Sun, 6 Oct 2019 13:26:42 +0000 (15:26 +0200)] 
tests: remove "cat foo" before "test_i18ngrep bar foo"

Some tests print a file before searching for a pattern using
test_i18ngrep.  This is useful when debugging tests with --verbose when
the pattern is not found as expected.

Since 63b1a175ee (t: make 'test_i18ngrep' more informative on failure,
2018-02-08) test_i18ngrep already shows the contents of a file that
doesn't match the expected pattern, though.

So don't bother doing the same unconditionally up-front.  The contents
are not interesting if the expected pattern is found, and showing it
twice if it doesn't match is of no use.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agogit-p4: auto-delete named temporary file
Philip.McGraw [Tue, 27 Aug 2019 03:43:58 +0000 (06:43 +0300)] 
git-p4: auto-delete named temporary file

Avoid double-open exceptions on Windows platform when
calculating for lfs compressed size threshold
(git-p4.largeFileCompressedThreshold) comparisons.

Take new approach using the NamedTemporaryFile()
file-like object as input to the ZipFile() which
auto-deletes after implicit close leaving with scope.

Original code had double-open exception on Windows
platform because file still open from NamedTemporaryFile()
using generated filename instead of object.

Thanks to Andrey for patiently suggesting several
iterations on this change for avoiding exceptions!

Also print error details after resulting IOError to make
debugging cause of exception less mysterious when it has
nothing to do with "git version recent enough."

Signed-off-by: Philip.McGraw <Philip.McGraw@bentley.com>
Reviewed-by: Andrey Mazo <ahippo@yandex.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoFifth batch
Junio C Hamano [Sun, 6 Oct 2019 03:25:51 +0000 (12:25 +0900)] 
Fifth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'cb/skip-utf8-check-with-pcre1'
Junio C Hamano [Sun, 6 Oct 2019 03:25:17 +0000 (12:25 +0900)] 
Merge branch 'cb/skip-utf8-check-with-pcre1'

Make sure the grep machinery does not abort when seeing a payload
that is not UTF-8 even when JIT is not in use with PCRE1.

* cb/skip-utf8-check-with-pcre1:
  grep: skip UTF8 checks explicitly

4 years agoMerge branch 'ma/user-manual-markup-update'
Junio C Hamano [Sun, 6 Oct 2019 03:25:16 +0000 (12:25 +0900)] 
Merge branch 'ma/user-manual-markup-update'

The markup used in user-manual has been updated to work better with
asciidoctor.

* ma/user-manual-markup-update:
  user-manual.txt: render ASCII art correctly under Asciidoctor
  asciidoctor-extensions.rb: handle "book" doctype in linkgit
  user-manual.txt: change header notation
  user-manual.txt: add missing section label

4 years agoMerge branch 'bc/doc-use-docbook-5'
Junio C Hamano [Sun, 6 Oct 2019 03:25:16 +0000 (12:25 +0900)] 
Merge branch 'bc/doc-use-docbook-5'

Start using DocBook 5 (instead of DocBook 4.5) as Asciidoctor 2.0
no longer works with the older one.

* bc/doc-use-docbook-5:
  Documentation: fix build with Asciidoctor 2

4 years agoMerge branch 'ma/asciidoctor-more-fixes'
Junio C Hamano [Sun, 6 Oct 2019 03:25:16 +0000 (12:25 +0900)] 
Merge branch 'ma/asciidoctor-more-fixes'

Doc formatting updates.

* ma/asciidoctor-more-fixes:
  gitweb.conf.txt: switch pluses to backticks to help Asciidoctor
  git-merge-index.txt: wrap shell listing in "----"
  git-receive-pack.txt: wrap shell [script] listing in "----"
  git-ls-remote.txt: wrap shell listing in "----"
  Documentation: wrap config listings in "----"
  git-merge-base.txt: render indentations correctly under Asciidoctor
  Documentation: wrap blocks with "--"

4 years agoMerge branch 'ma/asciidoctor-refmiscinfo'
Junio C Hamano [Sun, 6 Oct 2019 03:25:15 +0000 (12:25 +0900)] 
Merge branch 'ma/asciidoctor-refmiscinfo'

Update support for Asciidoctor documentation toolchain.

* ma/asciidoctor-refmiscinfo:
  doc-diff: replace --cut-header-footer with --cut-footer
  asciidoctor-extensions: provide `<refmiscinfo/>`
  Doc/Makefile: give mansource/-version/-manual attributes

4 years agoMerge branch 'am/mailmap-andrey-mazo'
Junio C Hamano [Sun, 6 Oct 2019 03:25:15 +0000 (12:25 +0900)] 
Merge branch 'am/mailmap-andrey-mazo'

* am/mailmap-andrey-mazo:
  .mailmap: update email address of Andrey Mazo

4 years agoMerge branch 'jc/git-gui-has-maintainer'
Junio C Hamano [Sun, 6 Oct 2019 03:25:15 +0000 (12:25 +0900)] 
Merge branch 'jc/git-gui-has-maintainer'

* jc/git-gui-has-maintainer:
  SubmittingPatches: git-gui has a new maintainer

4 years agogit-rev-list.txt: prune options in synopsis
Denton Liu [Sat, 5 Oct 2019 00:13:08 +0000 (17:13 -0700)] 
git-rev-list.txt: prune options in synopsis

The synopsis section in git-rev-list.txt has grown to be a huge list
that probably needs its own synopsis. Since the list is huge, users may
be given the false impression that the list is complete, however it is
not. It is missing many of the available options.

Since the list of options in the synopsis is not only annoying but
actively harmful, replace it with `[<options>]` so users know to
explicitly look through the documentation for further information.

While we're at it, update the optional path notation so that it is more
modern.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoDocumentation: update the location of the git-gui repo
Pratyush Yadav [Sat, 5 Oct 2019 12:57:42 +0000 (18:27 +0530)] 
Documentation: update the location of the git-gui repo

Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoconvert: fix handling of dashless UTF prefix in validate_encoding()
René Scharfe [Fri, 4 Oct 2019 19:25:50 +0000 (21:25 +0200)] 
convert: fix handling of dashless UTF prefix in validate_encoding()

Strip "UTF" and an optional dash from the start of 'upper' without
passing a NULL pointer to skip_prefix() in the second call, as it cannot
handle that.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agostash apply: report status correctly even in a worktree's subdirectory
Johannes Schindelin [Fri, 4 Oct 2019 12:30:59 +0000 (05:30 -0700)] 
stash apply: report status correctly even in a worktree's subdirectory

When Git wants to spawn a child Git process inside a worktree's
subdirectory while `GIT_DIR` is set, we need to take care of specifying
the work tree's top-level directory explicitly because it cannot be
discovered: the current directory is _not_ the top-level directory of
the work tree, and neither is it inside the parent directory of
`GIT_DIR`.

This fixes the problem where `git stash apply` would report pretty much
everything deleted or untracked when run inside a worktree's
subdirectory.

To make sure that we do not introduce the "reverse problem", i.e. when
`GIT_WORK_TREE` is defined but `GIT_DIR` is not, we simply make sure
that both are set.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agotreewide: remove duplicate #include directives
René Scharfe [Thu, 3 Oct 2019 12:18:34 +0000 (14:18 +0200)] 
treewide: remove duplicate #include directives

Found with "git grep '^#include ' '*.c' | sort | uniq -d".

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoadd -i: show progress counter in the prompt
Kunal Tyagi [Mon, 30 Sep 2019 05:22:59 +0000 (22:22 -0700)] 
add -i: show progress counter in the prompt

Report the current hunk count and total number of hunks for the
current file in the prompt.  Also adjust the expected output in
some tests to match.

Signed-off-by: Kunal Tyagi <tyagi.kunal@live.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agorange-diff: internally force `diff.noprefix=true`
Johannes Schindelin [Wed, 2 Oct 2019 21:10:47 +0000 (14:10 -0700)] 
range-diff: internally force `diff.noprefix=true`

When parsing the diffs, `range-diff` expects to see the prefixes `a/`
and `b/` in the diff headers.

These prefixes can be forced off via the config setting
`diff.noprefix=true`. As `range-diff` is not prepared for that
situation, this will cause a segmentation fault.

Let's avoid that by passing the `--no-prefix` option to the `git log`
process that generates the diffs that `range-diff` wants to parse.
And of course expect the output to have no prefixes, then.

Reported-by: Michal Suchánek <msuchanek@suse.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoci: run `hdr-check` as part of the `Static Analysis` job
Johannes Schindelin [Tue, 1 Oct 2019 11:16:26 +0000 (04:16 -0700)] 
ci: run `hdr-check` as part of the `Static Analysis` job

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agogit_mkstemps_mode(): replace magic numbers with computed value
Jeff King [Wed, 2 Oct 2019 15:32:07 +0000 (11:32 -0400)] 
git_mkstemps_mode(): replace magic numbers with computed value

The magic number "6" appears several times in the function, and is
related to the size of the "XXXXXX" string we expect to find in the
template. Let's pull that "XXXXXX" into a constant array, whose size we
can get at compile time with ARRAY_SIZE().

Note that we probably can't just change this value, since callers will
be feeding us a certain number of X's, but it hopefully makes the
function itself easier to follow.

While we're here, let's do the same with the "letters" array (which we
_could_ modify if we wanted to include more characters).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agot0061: fix test for argv[0] with spaces (MINGW only)
Alexandr Miloslavskiy [Tue, 1 Oct 2019 11:41:05 +0000 (04:41 -0700)] 
t0061: fix test for argv[0] with spaces (MINGW only)

The test was originally designed for the case where user reported
that setting GIT_SSH to a .bat file with spaces in path fails on
Windows: https://github.com/git-for-windows/git/issues/692

The test has two different problems:

1. It succeeds with AND without fix eb7c7863 that addressed user's
   problem. This happens because the core problem was misunderstood,
   leading to conclusion that git is unable to start any programs with
   spaces in path on Win7. But in fact
     a) Bug only affected cmd.exe scripts, such as .bat scripts
     b) Bug only happened when cmd.exe received at least two quoted args
     c) Bug happened on any Windows (verified on Win10).
   Therefore, correct test must involve .bat script and two quoted args.
2. In Visual Studio build, it fails to run, because 'test-fake-ssh.exe'
   is copied away from its dependencies 'libiconv.dll' and 'zlib1.dll'.

Fix both problems by using .bat script instead of 'test-fake-ssh.exe'.
NOTE: With this change, the test now correctly fails without eb7c7863.

Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agowrapper: use a loop instead of repetitive statements
Alex Henrie [Tue, 1 Oct 2019 02:29:36 +0000 (20:29 -0600)] 
wrapper: use a loop instead of repetitive statements

A check into the history of this code revealed no particular reason for
the code to be written in this way. All popular compilers are capable of
unrolling loops if it benefits performance, and once this code is
replaced with a loop, the magic number 6 used in multiple places in this
function can be replaced with a named constant.

Reviewed-by: Derrick Stolee <stolee@gmail.com>
Reviewed-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agodiffcore-break: use a goto instead of a redundant if statement
Alex Henrie [Tue, 1 Oct 2019 02:29:35 +0000 (20:29 -0600)] 
diffcore-break: use a goto instead of a redundant if statement

The condition "if (q->nr <= j)" checks whether the loop exited normally
or via a break statement. Avoid this check by replacing the jump out of
the inner loop with a jump to the end of the outer loop, which makes it
obvious that diff_q is not executed when the peer survives.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agocommit-graph: remove a duplicate assignment
Alex Henrie [Tue, 1 Oct 2019 02:29:34 +0000 (20:29 -0600)] 
commit-graph: remove a duplicate assignment

Leave the variable 'g' uninitialized before it is set just before its
first use in front of a loop, which is a much more appropriate place to
indicate what it is used for.

Also initialize the variable 'num_commits' just before the loop instead
of at the beginning of the function for the same reason.

Reviewed-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoshallow.c: don't free unallocated slabs
Ali Utku Selen [Mon, 30 Sep 2019 23:33:10 +0000 (01:33 +0200)] 
shallow.c: don't free unallocated slabs

Fix possible segfault when cloning a submodule shallow.

Signed-off-by: Ali Utku Selen <auselen@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agopromisor-remote: skip move_to_tail when no-op
Emily Shaffer [Mon, 30 Sep 2019 22:03:55 +0000 (15:03 -0700)] 
promisor-remote: skip move_to_tail when no-op

Previously, when promisor_remote_move_to_tail() is called for a
promisor_remote which is currently the final element in promisors, a
cycle is created in the promisors linked list. This cycle leads to a
double free later on in promisor_remote_clear() when the final element
of the promisors list is removed: promisors is set to promisors->next (a
no-op, as promisors->next == promisors); the previous value of promisors
is free()'d; then the new value of promisors (which is equal to the
previous value of promisors) is also free()'d. This double-free error
was unrecoverable for the user without removing the filter or re-cloning
the repo and hoping to miss this edge case.

Now, when promisor_remote_move_to_tail() would be a no-op, just do a
no-op. In cases of promisor_remote_move_to_tail() where r is not already
at the tail of the list, it works as before.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
Acked-by: Christian Couder <christian.couder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agodiffcore_rename(): use a stable sort
Johannes Schindelin [Mon, 30 Sep 2019 17:21:55 +0000 (10:21 -0700)] 
diffcore_rename(): use a stable sort

During Git's rename detection, the file names are sorted. At the moment,
this job is performed by `qsort()`. As that function is not guaranteed
to implement a stable sort algorithm, this can lead to inconsistent
and/or surprising behavior: a rename might be detected differently
depending on the platform where Git was run.

The `qsort()` in MS Visual C's runtime does _not_ implement a stable
sort algorithm, and it even leads to an inconsistency leading to a test
failure in t3030.35 "merge-recursive remembers the names of all base
trees": a different code path than on Linux is taken in the rename
detection of an ambiguous rename between either `e` to `a` or
`a~Temporary merge branch 2_0` to `a` during a recursive merge,
unexpectedly resulting in a clean merge.

Let's use the stable sort provided by `git_stable_qsort()` to avoid this
inconsistency.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMove git_sort(), a stable sort, into into libgit.a
Johannes Schindelin [Mon, 30 Sep 2019 17:21:54 +0000 (10:21 -0700)] 
Move git_sort(), a stable sort, into into libgit.a

The `qsort()` function is not guaranteed to be stable, i.e. it does not
promise to maintain the order of items it is told to consider equal. In
contrast, the `git_sort()` function we carry in `compat/qsort.c` _is_
stable, by virtue of implementing a merge sort algorithm.

In preparation for using a stable sort in Git's rename detection, move
the stable sort into `libgit.a` so that it is compiled in
unconditionally, and rename it to `git_stable_qsort()`.

Note: this also makes the hack obsolete that was introduced in
fe21c6b285d (mingw: reencode environment variables on the fly (UTF-16
<-> UTF-8), 2018-10-30), where we included `compat/qsort.c` directly in
`compat/mingw.c` to use the stable sort.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agodir: special case check for the possibility that pathspec is NULL
Elijah Newren [Tue, 1 Oct 2019 18:55:24 +0000 (11:55 -0700)] 
dir: special case check for the possibility that pathspec is NULL

Commits 404ebceda01c ("dir: also check directories for matching
pathspecs", 2019-09-17) and 89a1f4aaf765 ("dir: if our pathspec might
match files under a dir, recurse into it", 2019-09-17) added calls to
match_pathspec() and do_match_pathspec() passing along their pathspec
parameter.  Both match_pathspec() and do_match_pathspec() assume the
pathspec argument they are given is non-NULL.  It turns out that
unpack-tree.c's verify_clean_subdirectory() calls read_directory() with
pathspec == NULL, and it is possible on case insensitive filesystems for
that NULL to make it to these new calls to match_pathspec() and
do_match_pathspec().  Add appropriate checks on the NULLness of pathspec
to avoid a segfault.

In case the negation throws anyone off (one of the calls was to
do_match_pathspec() while the other was to !match_pathspec(), yet no
negation of the NULLness of pathspec is used), there are two ways to
understand the differences:
  * The code already handled the pathspec == NULL cases before this
    series, and this series only tried to change behavior when there was
    a pathspec, thus we only want to go into the if-block if pathspec is
    non-NULL.
  * One of the calls is for whether to recurse into a subdirectory, the
    other is for after we've recursed into it for whether we want to
    remove the subdirectory itself (i.e. the subdirectory didn't match
    but something under it could have).  That difference in situation
    leads to the slight differences in logic used (well, that and the
    slightly unusual fact that we don't want empty pathspecs to remove
    untracked directories by default).

Denton found and analyzed one issue and provided the patch for the
match_pathspec() call, SZEDER figured out why the issue only reproduced
for some folks and not others and provided the testcase, and I looked
through the remainder of the series and noted the do_match_pathspec()
call that should have the same check.

Co-authored-by: Denton Liu <liu.denton@gmail.com>
Co-authored-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoFourth batch
Junio C Hamano [Mon, 30 Sep 2019 04:30:46 +0000 (13:30 +0900)] 
Fourth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'ds/commit-graph-on-fetch'
Junio C Hamano [Mon, 30 Sep 2019 04:19:32 +0000 (13:19 +0900)] 
Merge branch 'ds/commit-graph-on-fetch'

A configuration variable tells "git fetch" to write the commit
graph after finishing.

* ds/commit-graph-on-fetch:
  fetch: add fetch.writeCommitGraph config setting

4 years agoMerge branch 'bw/rebase-autostash-keep-current-branch'
Junio C Hamano [Mon, 30 Sep 2019 04:19:32 +0000 (13:19 +0900)] 
Merge branch 'bw/rebase-autostash-keep-current-branch'

"git rebase --autostash <upstream> <branch>", when <branch> is
different from the current branch, incorrectly moved the tip of the
current branch, which has been corrected.

* bw/rebase-autostash-keep-current-branch:
  builtin/rebase.c: Remove pointless message
  builtin/rebase.c: make sure the active branch isn't moved when autostashing

4 years agoMerge branch 'ds/include-exclude'
Junio C Hamano [Mon, 30 Sep 2019 04:19:31 +0000 (13:19 +0900)] 
Merge branch 'ds/include-exclude'

The internal code originally invented for ".gitignore" processing
got reshuffled and renamed to make it less tied to "excluding" and
stress more that it is about "matching", as it has been reused for
things like sparse checkout specification that want to check if a
path is "included".

* ds/include-exclude:
  unpack-trees: rename 'is_excluded_from_list()'
  treewide: rename 'exclude' methods to 'pattern'
  treewide: rename 'EXCL_FLAG_' to 'PATTERN_FLAG_'
  treewide: rename 'struct exclude_list' to 'struct pattern_list'
  treewide: rename 'struct exclude' to 'struct path_pattern'

4 years agoMerge branch 'jh/trace2-pretty-output'
Junio C Hamano [Mon, 30 Sep 2019 04:19:31 +0000 (13:19 +0900)] 
Merge branch 'jh/trace2-pretty-output'

Output from trace2 subsystem is formatted more prettily now.

* jh/trace2-pretty-output:
  trace2: cleanup whitespace in perf format
  trace2: cleanup whitespace in normal format
  quote: add sq_append_quote_argv_pretty()
  trace2: trim trailing whitespace in normal format error message
  trace2: remove dead code in maybe_add_string_va()
  trace2: trim whitespace in region messages in perf target format
  trace2: cleanup column alignment in perf target format

4 years agoMerge branch 'dl/rebase-i-keep-base'
Junio C Hamano [Mon, 30 Sep 2019 04:19:31 +0000 (13:19 +0900)] 
Merge branch 'dl/rebase-i-keep-base'

"git rebase --keep-base <upstream>" tries to find the original base
of the topic being rebased and rebase on top of that same base,
which is useful when running the "git rebase -i" (and its limited
variant "git rebase -x").

The command also has learned to fast-forward in more cases where it
can instead of replaying to recreate identical commits.

* dl/rebase-i-keep-base:
  rebase: teach rebase --keep-base
  rebase tests: test linear branch topology
  rebase: fast-forward --fork-point in more cases
  rebase: fast-forward --onto in more cases
  rebase: refactor can_fast_forward into goto tower
  t3432: test for --no-ff's interaction with fast-forward
  t3432: distinguish "noop-same" v.s. "work-same" in "same head" tests
  t3432: test rebase fast-forward behavior
  t3431: add rebase --fork-point tests

4 years agoMerge branch 'sg/clean-nested-repo-with-ignored'
Junio C Hamano [Mon, 30 Sep 2019 04:19:31 +0000 (13:19 +0900)] 
Merge branch 'sg/clean-nested-repo-with-ignored'

A bug documentation.

* sg/clean-nested-repo-with-ignored:
  t7300-clean: demonstrate deleting nested repo with an ignored file breakage

4 years agoMerge branch 'dl/complete-cherry-pick-revert-skip'
Junio C Hamano [Mon, 30 Sep 2019 04:19:30 +0000 (13:19 +0900)] 
Merge branch 'dl/complete-cherry-pick-revert-skip'

The command line completion support (in contrib/) learned about the
"--skip" option of "git revert" and "git cherry-pick".

* dl/complete-cherry-pick-revert-skip:
  status: mention --skip for revert and cherry-pick
  completion: add --skip for cherry-pick and revert
  completion: merge options for cherry-pick and revert

4 years agoMerge branch 'dl/use-sq-from-test-lib'
Junio C Hamano [Mon, 30 Sep 2019 04:19:30 +0000 (13:19 +0900)] 
Merge branch 'dl/use-sq-from-test-lib'

Code cleanup.

* dl/use-sq-from-test-lib:
  t: use common $SQ variable

4 years agoMerge branch 'jk/misc-uninitialized-fixes'
Junio C Hamano [Mon, 30 Sep 2019 04:19:30 +0000 (13:19 +0900)] 
Merge branch 'jk/misc-uninitialized-fixes'

Various fixes to codepaths gcc 9 had trouble following dataflow.

* jk/misc-uninitialized-fixes:
  pack-objects: drop packlist index_pos optimization
  test-read-cache: drop namelen variable
  diff-delta: set size out-parameter to 0 for NULL delta
  bulk-checkin: zero-initialize hashfile_checkpoint
  pack-objects: use object_id in packlist_alloc()
  git-am: handle missing "author" when parsing commit

4 years agoMerge branch 'sg/git-test-boolean'
Junio C Hamano [Mon, 30 Sep 2019 04:19:29 +0000 (13:19 +0900)] 
Merge branch 'sg/git-test-boolean'

Fix an earlier regression in the test suite, which mistakenly
stopped running HTTPD tests.

* sg/git-test-boolean:
  ci: restore running httpd tests
  t/lib-git-svn.sh: check GIT_TEST_SVN_HTTPD when running SVN HTTP tests

4 years agoMerge branch 'rs/get-tagged-oid'
Junio C Hamano [Mon, 30 Sep 2019 04:19:29 +0000 (13:19 +0900)] 
Merge branch 'rs/get-tagged-oid'

Code cleanup.

* rs/get-tagged-oid:
  use get_tagged_oid()
  tag: factor out get_tagged_oid()