]> granicus.if.org Git - git/log
git
5 years agoMerge branch 'cc/multi-promisor' into next
Junio C Hamano [Thu, 3 Oct 2019 01:45:23 +0000 (10:45 +0900)]
Merge branch 'cc/multi-promisor' into next

Cleanup.

* cc/multi-promisor:
  promisor-remote: skip move_to_tail when no-op

5 years agoMerge branch 'en/clean-nested-with-ignored' into next
Junio C Hamano [Thu, 3 Oct 2019 01:45:21 +0000 (10:45 +0900)]
Merge branch 'en/clean-nested-with-ignored' into next

"git clean" fixes.

* en/clean-nested-with-ignored:
  dir: special case check for the possibility that pathspec is NULL

5 years agoMerge branch 'en/merge-recursive-cleanup' into next
Junio C Hamano [Thu, 3 Oct 2019 01:45:19 +0000 (10:45 +0900)]
Merge branch 'en/merge-recursive-cleanup' into next

The merge-recursive machiery is one of the most complex parts of
the system that accumulated cruft over time.  This large series
cleans up the implementation quite a bit.

* en/merge-recursive-cleanup:
  merge-recursive: fix the diff3 common ancestor label for virtual commits

5 years agoSync with master
Junio C Hamano [Thu, 3 Oct 2019 01:25:27 +0000 (10:25 +0900)]
Sync with master

5 years agomerge-recursive: fix the diff3 common ancestor label for virtual commits
Elijah Newren [Tue, 1 Oct 2019 18:17:27 +0000 (11:17 -0700)]
merge-recursive: fix the diff3 common ancestor label for virtual commits

In commit 743474cbfa8b ("merge-recursive: provide a better label for
diff3 common ancestor", 2019-08-17), the label for the common ancestor
was changed from always being

         "merged common ancestors"

to instead be based on the number of merge bases:

    >=2: "merged common ancestors"
      1: <abbreviated commit hash>
      0: "<empty tree>"

Unfortunately, this did not take into account that when we have a single
merge base, that merge base could be fake or constructed.  In such
cases, this resulted in a label of "00000000".  Of course, the previous
label of "merged common ancestors" was also misleading for this case.
Since we have an API that is explicitly about creating fake merge base
commits in merge_recursive_generic(), we should provide a better label
when using that API with one merge base.  So, when
merge_recursive_generic() is called with one merge base, set the label
to:

         "constructed merge base"

Note that callers of merge_recursive_generic() include the builtin
commands git-am (in combination with git apply --build-fake-ancestor),
git-merge-recursive, and git-stash.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 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>
5 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>
5 years agoMerge branch 'bw/submodule-helper-usage-fix' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:16 +0000 (13:42 +0900)]
Merge branch 'bw/submodule-helper-usage-fix' into next

Typofix.

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

5 years agoMerge branch 'ma/user-manual-markup-update' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:16 +0000 (13:42 +0900)]
Merge branch 'ma/user-manual-markup-update' into next

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

5 years agoMerge branch 'dl/honor-cflags-in-hdr-check' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:16 +0000 (13:42 +0900)]
Merge branch 'dl/honor-cflags-in-hdr-check' into next

Dev support.

* dl/honor-cflags-in-hdr-check:
  Makefile: emulate compile in $(HCO) target better
  pack-bitmap.h: remove magic number
  promisor-remote.h: include missing header
  apply.h: include missing header

5 years agoMerge branch 'cb/do-not-use-test-cmp-with-a' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:15 +0000 (13:42 +0900)]
Merge branch 'cb/do-not-use-test-cmp-with-a' into next

Test portability fix.

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

5 years agoMerge branch 'cc/multi-promisor' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:15 +0000 (13:42 +0900)]
Merge branch 'cc/multi-promisor' into next

Cleanup.

* cc/multi-promisor:
  promisor-remote.h: drop extern from function declaration

5 years agoMerge branch 'am/mailmap-andrey-mazo' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:14 +0000 (13:42 +0900)]
Merge branch 'am/mailmap-andrey-mazo' into next

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

5 years agoMerge branch 'jt/merge-recursive-symlink-is-not-a-dir-in-way' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:14 +0000 (13:42 +0900)]
Merge branch 'jt/merge-recursive-symlink-is-not-a-dir-in-way' into next

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

5 years agoMerge branch 'ps/my-first-contribution-alphasort' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:14 +0000 (13:42 +0900)]
Merge branch 'ps/my-first-contribution-alphasort' into next

Docfix.

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

5 years agoMerge branch 'sg/travis-help-debug' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:13 +0000 (13:42 +0900)]
Merge branch 'sg/travis-help-debug' into next

Dev support update.

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

5 years agoMerge branch 'rs/alias-use-copy-array' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:13 +0000 (13:42 +0900)]
Merge branch 'rs/alias-use-copy-array' into next

Code cleanup.

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

5 years agoMerge branch 'sg/t-helper-gitignore' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:12 +0000 (13:42 +0900)]
Merge branch 'sg/t-helper-gitignore' into next

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

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

5 years agoMerge branch 'jc/git-gui-has-maintainer' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:12 +0000 (13:42 +0900)]
Merge branch 'jc/git-gui-has-maintainer' into next

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

5 years agoMerge branch 'cc/svn-fe-py-shebang' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:12 +0000 (13:42 +0900)]
Merge branch 'cc/svn-fe-py-shebang' into next

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

5 years agoMerge branch 'ah/doc-submodule-ignore-submodules' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:11 +0000 (13:42 +0900)]
Merge branch 'ah/doc-submodule-ignore-submodules' into next

Docfix.

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

5 years agoMerge branch 'rs/nth-switch-code-simplification' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:11 +0000 (13:42 +0900)]
Merge branch 'rs/nth-switch-code-simplification' into next

Code simplification.

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

5 years agoMerge branch 'hb/hg-to-git-py3' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:10 +0000 (13:42 +0900)]
Merge branch 'hb/hg-to-git-py3' into next

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

5 years agoMerge branch 'sg/progress-fix' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:10 +0000 (13:42 +0900)]
Merge branch 'sg/progress-fix' into next

Regression fix for progress output.

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

5 years agoMerge branch 'js/doc-patch-text' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:09 +0000 (13:42 +0900)]
Merge branch 'js/doc-patch-text' into next

Docfix.

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

5 years agoMerge branch 'tb/commit-graph-harden' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:09 +0000 (13:42 +0900)]
Merge branch 'tb/commit-graph-harden' into next

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

5 years agoMerge branch 'jt/cache-tree-avoid-lazy-fetch-during-merge' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:09 +0000 (13:42 +0900)]
Merge branch 'jt/cache-tree-avoid-lazy-fetch-during-merge' into next

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

5 years agoMerge branch 'en/clean-nested-with-ignored' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:08 +0000 (13:42 +0900)]
Merge branch 'en/clean-nested-with-ignored' into next

"git clean" fixes.

* en/clean-nested-with-ignored:
  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

5 years agoMerge branch 'jk/packfile-reuse-cleanup' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:07 +0000 (13:42 +0900)]
Merge branch 'jk/packfile-reuse-cleanup' into next

The way "git pack-objects" reuses objects stored in existing pack
to generate its result has been improved.

* jk/packfile-reuse-cleanup:
  pack-objects: improve partial packfile reuse
  builtin/pack-objects: introduce obj_is_packed()
  pack-objects: introduce pack.allowPackReuse
  csum-file: introduce hashfile_total()
  pack-bitmap: introduce bitmap_walk_contains()
  pack-bitmap: don't rely on bitmap_git->reuse_objects
  ewah/bitmap: always allocate 2 more words
  ewah/bitmap: introduce bitmap_word_alloc()
  packfile: expose get_delta_base()
  builtin/pack-objects: report reused packfile objects

5 years agoMerge branch 'dl/cocci-everywhere' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:06 +0000 (13:42 +0900)]
Merge branch 'dl/cocci-everywhere' into next

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)

5 years agoMerge branch 'gs/commit-graph-progress' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:06 +0000 (13:42 +0900)]
Merge branch 'gs/commit-graph-progress' into next

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

5 years agoMerge branch 'ms/fetch-follow-tag-optim' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:05 +0000 (13:42 +0900)]
Merge branch 'ms/fetch-follow-tag-optim' into next

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

5 years agoMerge branch 'rs/commit-graph-use-list-count' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:05 +0000 (13:42 +0900)]
Merge branch 'rs/commit-graph-use-list-count' into next

Code cleanup.

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

5 years agoMerge branch 'rs/nth-parent-parse' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:04 +0000 (13:42 +0900)]
Merge branch 'rs/nth-parent-parse' into next

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"

5 years agoMerge branch 'bc/doc-use-docbook-5' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:04 +0000 (13:42 +0900)]
Merge branch 'bc/doc-use-docbook-5' into next

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

5 years agoMerge branch 'dl/submodule-set-branch' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:04 +0000 (13:42 +0900)]
Merge branch 'dl/submodule-set-branch' into next

Docfix.

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

5 years agoMerge branch 'cs/pretty-formats-doc-typofix' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:03 +0000 (13:42 +0900)]
Merge branch 'cs/pretty-formats-doc-typofix' into next

Doc fix.

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

5 years agoMerge branch 'jk/list-objects-optim-wo-trees' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:03 +0000 (13:42 +0900)]
Merge branch 'jk/list-objects-optim-wo-trees' into next

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

5 years agoMerge branch 'jk/disable-commit-graph-during-upload-pack' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:02 +0000 (13:42 +0900)]
Merge branch 'jk/disable-commit-graph-during-upload-pack' into next

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

5 years agoMerge branch 'mr/complete-more-for-log-etc' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:02 +0000 (13:42 +0900)]
Merge branch 'mr/complete-more-for-log-etc' into next

Completion updates.

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

5 years agoMerge branch 'dl/complete-rebase-and-archive' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:01 +0000 (13:42 +0900)]
Merge branch 'dl/complete-rebase-and-archive' into next

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

5 years agoMerge branch 'ma/asciidoctor-more-fixes' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:01 +0000 (13:42 +0900)]
Merge branch 'ma/asciidoctor-more-fixes' into next

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

5 years agoMerge branch 'jk/commit-graph-cleanup' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:01 +0000 (13:42 +0900)]
Merge branch 'jk/commit-graph-cleanup' into next

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

5 years agoMerge branch 'ss/get-time-cleanup' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:00 +0000 (13:42 +0900)]
Merge branch 'ss/get-time-cleanup' into next

Code simplification.

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

5 years agoMerge branch 'rs/simplify-by-deco-with-deco-refs-exclude' into next
Junio C Hamano [Mon, 30 Sep 2019 04:42:00 +0000 (13:42 +0900)]
Merge branch 'rs/simplify-by-deco-with-deco-refs-exclude' into next

"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

5 years agoMerge branch 'cb/skip-utf8-check-with-pcre1' into next
Junio C Hamano [Mon, 30 Sep 2019 04:41:59 +0000 (13:41 +0900)]
Merge branch 'cb/skip-utf8-check-with-pcre1' into next

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

5 years agoMerge branch 'jk/partial-clone-sparse-blob' into next
Junio C Hamano [Mon, 30 Sep 2019 04:41:59 +0000 (13:41 +0900)]
Merge branch 'jk/partial-clone-sparse-blob' into next

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

5 years agoMerge branch 'tg/stash-refresh-index' into next
Junio C Hamano [Mon, 30 Sep 2019 04:41:58 +0000 (13:41 +0900)]
Merge branch 'tg/stash-refresh-index' into next

"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

5 years agoMerge branch 'ma/asciidoctor-refmiscinfo' into next
Junio C Hamano [Mon, 30 Sep 2019 04:41:58 +0000 (13:41 +0900)]
Merge branch 'ma/asciidoctor-refmiscinfo' into next

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

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

5 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

5 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'

5 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

5 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

5 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

5 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

5 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

5 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

5 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

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

5 years agoMerge branch 'en/filter-branch-deprecation'
Junio C Hamano [Mon, 30 Sep 2019 04:19:29 +0000 (13:19 +0900)]
Merge branch 'en/filter-branch-deprecation'

Start discouraging the use of "git filter-branch".

* en/filter-branch-deprecation:
  t9902: use a non-deprecated command for testing
  Recommend git-filter-repo instead of git-filter-branch
  t6006: simplify, fix, and optimize empty message test

5 years agoMerge branch 'en/merge-options-ff-and-friends'
Junio C Hamano [Mon, 30 Sep 2019 04:19:28 +0000 (13:19 +0900)]
Merge branch 'en/merge-options-ff-and-friends'

Doc update.

* en/merge-options-ff-and-friends:
  merge-options.txt: clarify meaning of various ff-related options

5 years agoMerge branch 'tg/push-all-in-mirror-forbidden'
Junio C Hamano [Mon, 30 Sep 2019 04:19:28 +0000 (13:19 +0900)]
Merge branch 'tg/push-all-in-mirror-forbidden'

Fix an earlier regression to "git push --all" which should have
been forbidden when the target remote repository is set to be a
mirror.

* tg/push-all-in-mirror-forbidden:
  push: disallow --all and refspecs when remote.<name>.mirror is set

5 years agoMerge branch 'dt/remote-helper-doc-re-lock-option'
Junio C Hamano [Mon, 30 Sep 2019 04:19:28 +0000 (13:19 +0900)]
Merge branch 'dt/remote-helper-doc-re-lock-option'

Doc update.

* dt/remote-helper-doc-re-lock-option:
  clarify documentation for remote helpers

5 years agoMerge branch 'rs/help-unknown-ref-does-not-return'
Junio C Hamano [Mon, 30 Sep 2019 04:19:27 +0000 (13:19 +0900)]
Merge branch 'rs/help-unknown-ref-does-not-return'

Code cleanup.

* rs/help-unknown-ref-does-not-return:
  help: make help_unknown_ref() NORETURN

5 years agoMerge branch 'nd/switch-and-restore'
Junio C Hamano [Mon, 30 Sep 2019 04:19:27 +0000 (13:19 +0900)]
Merge branch 'nd/switch-and-restore'

Resurrect a performance hack.

* nd/switch-and-restore:
  checkout: add simple check for 'git checkout -b'

5 years agoMerge branch 'tb/file-url-to-unc-path'
Junio C Hamano [Mon, 30 Sep 2019 04:19:27 +0000 (13:19 +0900)]
Merge branch 'tb/file-url-to-unc-path'

Windows update.

* tb/file-url-to-unc-path:
  mingw: support UNC in git clone file://server/share/repo

5 years agoMerge branch 'js/gitdir-at-unc-root'
Junio C Hamano [Mon, 30 Sep 2019 04:19:26 +0000 (13:19 +0900)]
Merge branch 'js/gitdir-at-unc-root'

On Windows, the root level of UNC share is now allowed to be used
just like any other directory.

* js/gitdir-at-unc-root:
  setup_git_directory(): handle UNC root paths correctly
  Fix .git/ discovery at the root of UNC shares
  setup_git_directory(): handle UNC paths correctly

5 years agoMerge branch 'ar/mingw-run-external-with-non-ascii-path'
Junio C Hamano [Mon, 30 Sep 2019 04:19:26 +0000 (13:19 +0900)]
Merge branch 'ar/mingw-run-external-with-non-ascii-path'

Windows update.

* ar/mingw-run-external-with-non-ascii-path:
  mingw: fix launching of externals from Unicode paths

5 years agoMerge branch 'rs/parse-tree-indirect'
Junio C Hamano [Mon, 30 Sep 2019 04:19:26 +0000 (13:19 +0900)]
Merge branch 'rs/parse-tree-indirect'

Code cleanup.

* rs/parse-tree-indirect:
  tree: simplify parse_tree_indirect()

5 years agoMerge branch 'jk/fast-import-history-bugfix'
Junio C Hamano [Mon, 30 Sep 2019 04:19:25 +0000 (13:19 +0900)]
Merge branch 'jk/fast-import-history-bugfix'

The memory ownership model of the "git fast-import" got
straightened out.

* jk/fast-import-history-bugfix:
  fast-import: duplicate into history rather than passing ownership
  fast-import: duplicate parsed encoding string

5 years agoMerge branch 'mh/notes-duplicate-entries'
Junio C Hamano [Mon, 30 Sep 2019 04:19:25 +0000 (13:19 +0900)]
Merge branch 'mh/notes-duplicate-entries'

A few implementation fixes in the notes API.

* mh/notes-duplicate-entries:
  notes: avoid potential use-after-free during insertion
  notes: avoid leaking duplicate entries

5 years agoMerge branch 'tb/banned-vsprintf-namefix'
Junio C Hamano [Mon, 30 Sep 2019 04:19:25 +0000 (13:19 +0900)]
Merge branch 'tb/banned-vsprintf-namefix'

Error message fix.

* tb/banned-vsprintf-namefix:
  banned.h: fix vsprintf()'s ban message

5 years agoMerge branch 'mh/release-commit-memory-fix'
Junio C Hamano [Mon, 30 Sep 2019 04:19:25 +0000 (13:19 +0900)]
Merge branch 'mh/release-commit-memory-fix'

Leakfix.

* mh/release-commit-memory-fix:
  commit: free the right buffer in release_commit_memory

5 years agoMerge branch 'mh/http-urlmatch-cleanup'
Junio C Hamano [Mon, 30 Sep 2019 04:19:24 +0000 (13:19 +0900)]
Merge branch 'mh/http-urlmatch-cleanup'

Leakfix.

* mh/http-urlmatch-cleanup:
  http: don't leak urlmatch_config.vars

5 years agoMerge branch 'rs/strbuf-detach'
Junio C Hamano [Mon, 30 Sep 2019 04:19:24 +0000 (13:19 +0900)]
Merge branch 'rs/strbuf-detach'

Straighten out the use of strbuf_detach() API function.

* rs/strbuf-detach:
  grep: use return value of strbuf_detach()
  log-tree: always use return value of strbuf_detach()

5 years agoMerge branch 'rs/trace2-dst-warning'
Junio C Hamano [Mon, 30 Sep 2019 04:19:24 +0000 (13:19 +0900)]
Merge branch 'rs/trace2-dst-warning'

Code cleanup.

* rs/trace2-dst-warning:
  trace2: use warning() directly in tr2_dst_malformed_warning()

5 years agoMerge branch 'dl/format-patch-doc-test-cleanup'
Junio C Hamano [Mon, 30 Sep 2019 04:19:23 +0000 (13:19 +0900)]
Merge branch 'dl/format-patch-doc-test-cleanup'

The documentation and tests for "git format-patch" have been
cleaned up.

* dl/format-patch-doc-test-cleanup:
  config/format.txt: specify default value of format.coverLetter
  Doc: add more detail for git-format-patch
  t4014: stop losing return codes of git commands
  t4014: remove confusing pipe in check_threading()
  t4014: use test_line_count() where possible
  t4014: let sed open its own files
  t4014: drop redirections to /dev/null
  t4014: use indentable here-docs
  t4014: remove spaces after redirect operators
  t4014: use sq for test case names
  t4014: move closing sq onto its own line
  t4014: s/expected/expect/
  t4014: drop unnecessary blank lines from test cases

5 years agoMerge branch 'bc/hash-independent-tests-part-5'
Junio C Hamano [Mon, 30 Sep 2019 04:19:23 +0000 (13:19 +0900)]
Merge branch 'bc/hash-independent-tests-part-5'

Preparation for SHA-256 upgrade continues in the test department.

* bc/hash-independent-tests-part-5:
  t4009: make hash size independent
  t4002: make hash independent
  t4000: make hash size independent
  t3903: abstract away SHA-1-specific constants
  t3800: make hash-size independent
  t3600: make hash size independent
  t3506: make hash independent
  t3430: avoid hard-coded object IDs
  t3404: abstract away SHA-1-specific constants
  t3306: abstract away SHA-1-specific constants
  t3305: make hash size independent
  t3301: abstract away SHA-1-specific constants
  t3206: abstract away hash size constants
  t3201: abstract away SHA-1-specific constants

5 years agoMerge branch 'jc/test-cleanup'
Junio C Hamano [Mon, 30 Sep 2019 04:19:23 +0000 (13:19 +0900)]
Merge branch 'jc/test-cleanup'

Code cleanup.

* jc/test-cleanup:
  t3005: remove unused variable
  t: use LF variable defined in the test harness

5 years agoMerge branch 'dl/compat-cleanup'
Junio C Hamano [Mon, 30 Sep 2019 04:19:23 +0000 (13:19 +0900)]
Merge branch 'dl/compat-cleanup'

Code cleanup.

* dl/compat-cleanup:
  compat/*.[ch]: remove extern from function declarations using spatch
  mingw: apply array.cocci rule

5 years agoMerge branch 'js/visual-studio'
Junio C Hamano [Mon, 30 Sep 2019 04:19:22 +0000 (13:19 +0900)]
Merge branch 'js/visual-studio'

Adjust .gitignore to unignore a path that we started to track.

* js/visual-studio:
  .gitignore: stop ignoring `.manifest` files

5 years agobuiltin/submodule--helper: fix usage string for 'update-clone'
Bert Wesarg [Sat, 28 Sep 2019 20:20:23 +0000 (22:20 +0200)]
builtin/submodule--helper: fix usage string for 'update-clone'

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agouser-manual.txt: render ASCII art correctly under Asciidoctor
Martin Ågren [Sun, 22 Sep 2019 11:57:59 +0000 (13:57 +0200)]
user-manual.txt: render ASCII art correctly under Asciidoctor

This commit is similar to 379805051d ("Documentation: render revisions
correctly under Asciidoctor", 2018-05-06) and is a no-op with AsciiDoc.

When creating a literal block from an indented block without any sort of
delimiters, Asciidoctor strips off all leading whitespace, resulting in
a misrendered ASCII drawing. Use an explicit literal block to indicate
to Asciidoctor that we want to keep the leading whitespace. Drop the
common indentation for all lines to make this a no-op with AsciiDoc.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoasciidoctor-extensions.rb: handle "book" doctype in linkgit
Martin Ågren [Sun, 22 Sep 2019 11:57:58 +0000 (13:57 +0200)]
asciidoctor-extensions.rb: handle "book" doctype in linkgit

user-manual.txt is the only file we process using the "book" doctype.
When we use AsciiDoc, user-manual.conf ensures that the linkgit macro
expands into something like

  <ulink url="git-foo.html">git-foo(1)</ulink>

in user-manual.xml, which we then process into a clickable link, both in
user-manual.html and user-manual.pdf. With Asciidoctor,
user-manual.conf is ignored (this is expected) and our
Asciidoctor-specific implementation of linkgit kicks in:

  <citerefentry>
    <refentrytitle>git-foo</refentrytitle><manvolnum>1</manvolnum>
  </citerefentry>

This eventually renders as "git-foo(1)", which is not bad, but it
doesn't turn into a link.

Teach our Asciidoctor-specific implementation of the linkgit macro that
if the doctype is "book", we should emit <ulink .../> just like we do
with AsciiDoc. While we're doing this, future-proof by supporting a
"prefix". The implementation in user-manual.conf doesn't support this,
and we don't need this for now because user-manual.txt is the only file
we process this way (and it's immediately in Documentation/).

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agouser-manual.txt: change header notation
Martin Ågren [Sun, 22 Sep 2019 11:57:57 +0000 (13:57 +0200)]
user-manual.txt: change header notation

When AsciiDoc processes user-manual.txt, it generates a book containing
chapters containing sections. So for example, we have chapter 6,
"Advanced branch management", which contains four relatively short
sections, 6.1-6.4. Asciidoctor generates a book containing *parts*
containing *chapters* instead. So part 6, "Advanced branch management"
contains four short chapters, 1-4. This looks a bit odd.

To make AsciiDoc (8.6.10) and Asciidoctor (1.5.5) handle these the same,
change from indicating chapters like so:

  [[foobar]]
  Foobar
  ======

to doing it like so:

  [[foobar]]
  == Foobar

Same thing for sections (line of dashes to ===), subsections (line of
tildes to ====) and subsubsections (line of carets to =====). Mark the
appendices with "[appendix]", which both AsciiDoc and Asciidoctor
understand. This means we need to drop the "Appendix X: " from their
titles, or those "Appendix X: " would be included literally in the name
of the appendix.

This commit is a no-op for AsciiDoc: The generated user-manual.xml is
identical before and after this patch. Asciidoctor now creates the same
chapter-section-subsection structure as AsciiDoc.

Changing the book title at the start of the document to similarly use
"=" instead of a line of equal signs makes no difference with any of the
engines, but let's do that change anyway for consistency.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agouser-manual.txt: add missing section label
Martin Ågren [Sun, 22 Sep 2019 11:57:56 +0000 (13:57 +0200)]
user-manual.txt: add missing section label

We provide a label for each chapter and section except for the "Pitfalls
with submodules" section. Since we're doing it everywhere else, let's do
it here, too.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMakefile: emulate compile in $(HCO) target better
Denton Liu [Wed, 25 Sep 2019 08:21:01 +0000 (01:21 -0700)]
Makefile: emulate compile in $(HCO) target better

Currently, when testing headers using `make hdr-check`, headers are
directly compiled. Although this seems to test the headers, this is too
strict since we treat the headers as C sources. As a result, this will
cause warnings to appear that would otherwise not, such as a static
variable definition intended for later use throwing a unused variable
warning.

In addition, on platforms that can run `make hdr-check` but require
custom flags, this target was failing because none of them were being
passed to the compiler. For example, on MacOS, the NO_OPENSSL flag was
being set but it was not being passed into compiler so the check was
failing.

Fix these problems by emulating the compile process better, including
test compiling dummy *.hcc C sources generated from the *.h files and
passing $(ALL_CFLAGS) into the compiler for the $(HCO) target so that
these custom flags can be used.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agopack-bitmap.h: remove magic number
Denton Liu [Wed, 25 Sep 2019 08:20:59 +0000 (01:20 -0700)]
pack-bitmap.h: remove magic number

When we ran `make hdr-check` with the following patch

diff --git a/Makefile b/Makefile
index f879697ea3..d8df4e316b 100644
--- a/Makefile
+++ b/Makefile
@@ -2773,7 +2773,7 @@ CHK_HDRS = $(filter-out $(EXCEPT_HDRS),$(patsubst ./%,%,$(LIB_H)))
HCO = $(patsubst %.h,%.hco,$(CHK_HDRS))

$(HCO): %.hco: %.h FORCE
- $(QUIET_HDR)$(CC) -include git-compat-util.h -I. -o /dev/null -c -xc $<
+ $(QUIET_HDR)$(CC) -include git-compat-util.h -I. -o /dev/null -c -xc $(ALL_CFLAGS) $<

.PHONY: hdr-check $(HCO)
hdr-check: $(HCO)

and with `DEVELOPER=1`, we got the following warning on Arch Linux:

pack-bitmap.h:20:19: error: ‘BITMAP_IDX_SIGNATURE’ defined but not used [-Werror=unused-const-variable=]
   20 | static const char BITMAP_IDX_SIGNATURE[] = {'B', 'I', 'T', 'M'};
      |                   ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

"Use" the BITMAP_IDX_SIGNATURE variable by making the size of
bitmap_disk_header.magic equal to the size of BITMAP_IDX_SIGNATURE,
thereby eliminating the magic number (4).

An alternative was to simply add MAYBE_UNUSED, however that does not
eliminate the magic number.

Another alternative was to change the definition to

extern const char BITMAP_IDX_SIGNATURE[4];

However, this design was also not chosen as the static definition allows
us to keep the declaration together for readability along with removing
the magic number.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agopromisor-remote.h: include missing header
Denton Liu [Wed, 25 Sep 2019 08:20:56 +0000 (01:20 -0700)]
promisor-remote.h: include missing header

When we ran `make hdr-check`, we got the following warning message:

promisor-remote.h:21:46: warning: declaration of 'struct repository' will not be visible outside of this function [-Wvisibility]
extern int promisor_remote_get_direct(struct repository *repo,
     ^
1 warning generated.

This was caused by a missing reference to `struct repository`, which is
defined in "repository.h".

Include this missing header to fix this warning.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoapply.h: include missing header
Denton Liu [Wed, 25 Sep 2019 08:20:53 +0000 (01:20 -0700)]
apply.h: include missing header

When running `make hdr-check`, we got the following error messages:

apply.h:146:22: error: use of undeclared identifier 'GIT_MAX_HEXSZ'
char old_oid_prefix[GIT_MAX_HEXSZ + 1];
    ^
apply.h:147:22: error: use of undeclared identifier 'GIT_MAX_HEXSZ'
char new_oid_prefix[GIT_MAX_HEXSZ + 1];
    ^
apply.h:151:33: error: array has incomplete element type 'struct object_id'
struct object_id threeway_stage[3];
       ^
./strbuf.h:79:8: note: forward declaration of 'struct object_id'
struct object_id;
       ^
3 errors generated.
make: *** [apply.hco] Error 1

Include the missing "hash.h" header to fix these errors.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoRevert "Merge branch 'js/honor-cflags-in-hdr-check' into next"
Junio C Hamano [Sat, 28 Sep 2019 05:01:08 +0000 (14:01 +0900)]
Revert "Merge branch 'js/honor-cflags-in-hdr-check' into next"

This reverts commit fcd9ee9f1bfd73f2b81f4b023640d856c7b33c95, reversing
changes made to 1973826628e7406ce38daccb0826f2e447be9086.

A separate topic that addresses essentially the same issue
supersedes it.

5 years agopromisor-remote.h: drop extern from function declaration
Denton Liu [Sat, 21 Sep 2019 00:03:48 +0000 (17:03 -0700)]
promisor-remote.h: drop extern from function declaration

During the creation of this file, each time a new function declaration
was introduced, it included an `extern`. However, starting from
554544276a (*.[ch]: remove extern from function declarations using
spatch, 2019-04-29), we've been actively trying to prevent externs from
being used in function declarations because they're unnecessary.

Remove these spurious `extern`s.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot4038: Remove non-portable '-a' option passed to test_cmp
CB Bailey [Fri, 20 Sep 2019 22:06:01 +0000 (23:06 +0100)]
t4038: Remove non-portable '-a' option passed to test_cmp

Signed-off-by: CB Bailey <cbailey32@bloomberg.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodoc: MyFirstContribution: fix cmd placement instructions
Pedro Sousa [Thu, 26 Sep 2019 19:05:22 +0000 (16:05 -0300)]
doc: MyFirstContribution: fix cmd placement instructions

Using the pull command instead of push is more accurate when giving
instructions on placing the psuh command in alphabetical order.

Signed-off-by: Pedro Sousa <pedroteosousa@gmail.com>
Acked-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotravis-ci: do not skip successfully tested trees in debug mode
SZEDER Gábor [Sat, 21 Sep 2019 07:40:54 +0000 (09:40 +0200)]
travis-ci: do not skip successfully tested trees in debug mode

Travis CI offers shell access to its virtual machine environment
running the build jobs, called "debug mode" [1].  After restarting a
build job in debug mode and logging in, the first thing I usually do
is to install dependencies, i.e. run './ci/install-dependencies.sh'.
This works just fine when I restarted a failed build job in debug
mode.  However, after restarting a successful build job in debug mode
our CI scripts get all clever, and exit without doing anything useful,
claiming that "This commit's tree has already been built and tested
successfully" [2].  Our CI scripts are right, and we do want to skip
building and testing already known good trees in "regular" CI builds.
In debug mode, however, this is a nuisiance, because one has to delete
the cache (or at least the 'good-trees' file in the cache) to proceed.

Let's update our CI scripts, in particular the common 'ci/lib.sh', to
not skip previously successfully built and tested trees in debug mode,
so all those scripts will do what there were supposed to do even when
a successful build job was restarted in debug mode.

[1] https://docs.travis-ci.com/user/running-build-in-debug-mode/
[2] 9cc2c76f5e (travis-ci: record and skip successfully built trees,
    2017-12-31)

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years ago.mailmap: update email address of Andrey Mazo
Andrey Mazo [Tue, 27 Aug 2019 04:24:41 +0000 (07:24 +0300)]
.mailmap: update email address of Andrey Mazo

I don't have access to my old work email since 20 Apr 2019.
Replace with my personal email address.

Signed-off-by: Andrey Mazo <ahippo@yandex.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot/helper: ignore only executable files
SZEDER Gábor [Fri, 20 Sep 2019 09:36:09 +0000 (11:36 +0200)]
t/helper: ignore only executable files

This patch conceptually reverts 44103f4197 (t/helper: ignore
everything but sources, 2017-12-12).  Back in those days we did have a
lot of separate test helper executables under 't/helper', and its
'.gitignore' did get out of sync every once in a while.

Since then, however, most of those separate executables were
integrated into a single 'test-tool' command [1], and new test helpers
are added as new subcommands, so the chances of that '.gitignore'
getting out of sync again are much lower.  And even if a contributor
were not careful enough and submits a patch that adds a new executable
under 't/helper' but forgets to update '.gitignore' accordingly, our
CI builds would catch it in a timely manner [2].

Ignoring everything but sources has the drawback that building an
older version of Git (e.g. during bisecting) creates all those
executables, and after going back to e.g. current 'master' the usual
cleanup commands like 'make clean' or 'git clean -fd' don't remove
them (the former doesn't know about them, and the latter doesn't
remove ignored files).

So let's ignore only the executable files under 't/helper/, i.e.
'test-tool' and the three other remaining executables that could not
be integrated into 'test-tool' (no need to ignore object files, as
they are already ignored by our toplevel '.gitignore').

[1] The topic starting with efd71f8913 (t/helper: add an empty
    test-tool program, 2018-03-24), and leading up to the merge commit
    27f25845cf (Merge branch 'nd/combined-test-helper', 2018-04-11).

[2] b92cb86ea1 (travis-ci: check that all build artifacts are
    .gitignore-d, 2017-12-31)

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agogit: use COPY_ARRAY and MOVE_ARRAY in handle_alias()
René Scharfe [Thu, 19 Sep 2019 20:48:30 +0000 (22:48 +0200)]
git: use COPY_ARRAY and MOVE_ARRAY in handle_alias()

Use the macro COPY_ARRAY to copy array elements and MOVE_ARRAY to do the
same for moving them backwards in an array with potential overlap.  The
result is shorter and safer, as it infers the element type automatically
and does a (very) basic type compatibility check for its first two
arguments.

These cases were missed by Coccinelle and contrib/coccinelle/array.cocci
because the type of the elements is "const char *", not "char *", and
the rules in the semantic patch cautiously insist on the sizeof operator
being used on exactly the same type to avoid generating transformations
that introduce subtle bugs into tricky code.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>