]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
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 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 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 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 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()

4 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

4 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

4 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

4 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

4 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

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

4 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

4 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

4 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

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

4 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

4 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

4 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

4 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

4 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

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

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

4 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

4 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

4 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

4 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

4 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

4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 years agomerge-recursive: symlink's descendants not in way
Jonathan Tan [Wed, 18 Sep 2019 20:27:38 +0000 (13:27 -0700)] 
merge-recursive: symlink's descendants not in way

When the working tree has:
 - bar (directory)
 - bar/file (file)
 - foo (symlink to .)

(note that lstat() for "foo/bar" would tell us that it is a directory)

and the user merges a commit that deletes the foo symlink and instead
contains:
 - bar (directory, as above)
 - bar/file (file, as above)
 - foo (directory)
 - foo/bar (file)

the merge should happen without requiring user intervention. However,
this does not happen.

This is because dir_in_way(), when checking the working tree, thinks
that "foo/bar" is a directory. But a symlink should be treated much the
same as a file: since dir_in_way() is only checking to see if there is a
directory in the way, we don't want symlinks in leading paths to
sometimes cause dir_in_way() to return true.

Teach dir_in_way() to also check for symlinks in leading paths before
reporting whether a directory is in the way.

Helped-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agostash: make sure to write refreshed cache
Thomas Gummerer [Wed, 11 Sep 2019 18:20:27 +0000 (19:20 +0100)] 
stash: make sure to write refreshed cache

When converting stash into C, calls to 'git update-index --refresh'
were replaced with the 'refresh_cache()' function.  That is fine as
long as the index is only needed in-core, and not re-read from disk.

However in many cases we do actually need the refreshed index to be
written to disk, for example 'merge_recursive_generic()' discards the
in-core index before re-reading it from disk, and in the case of 'apply
--quiet', the 'refresh_cache()' we currently have is pointless without
writing the index to disk.

Always write the index after refreshing it to ensure there are no
regressions in this compared to the scripted stash.  In the future we
can consider avoiding the write where possible after making sure none
of the subsequent calls actually need the refreshed cache, and it is
not expected to be refreshed after stash exits or it is written
somewhere else already.

Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agomerge: use refresh_and_write_cache
Thomas Gummerer [Wed, 11 Sep 2019 18:20:26 +0000 (19:20 +0100)] 
merge: use refresh_and_write_cache

Use the 'refresh_and_write_cache()' convenience function introduced in
the last commit, instead of refreshing and writing the index manually
in merge.c

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agofactor out refresh_and_write_cache function
Thomas Gummerer [Wed, 11 Sep 2019 18:20:25 +0000 (19:20 +0100)] 
factor out refresh_and_write_cache function

Getting the lock for the index, refreshing it and then writing it is a
pattern that happens more than once throughout the codebase, and isn't
trivial to get right.  Factor out the refresh_and_write_cache function
from builtin/am.c to read-cache.c, so it can be re-used in other
places in a subsequent commit.

Note that we return different error codes for failing to refresh the
cache, and failing to write the index.  The current caller only cares
about failing to write the index.  However for other callers we're
going to convert in subsequent patches we will need this distinction.

Helped-by: Martin Ågren <martin.agren@gmail.com>
Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agocommit-graph: add --[no-]progress to write and verify
Garima Singh [Mon, 26 Aug 2019 16:29:58 +0000 (09:29 -0700)] 
commit-graph: add --[no-]progress to write and verify

Add --[no-]progress to git commit-graph write and verify.
The progress feature was introduced in 7b0f229
("commit-graph write: add progress output", 2018-09-17) but
the ability to opt-out was overlooked.

Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agotest_date.c: remove reference to GIT_TEST_DATE_NOW
Stephen P. Smith [Thu, 12 Sep 2019 04:11:02 +0000 (21:11 -0700)] 
test_date.c: remove reference to GIT_TEST_DATE_NOW

Remove the reference to the GIT_TEST_DATE_NOW which is done in date.c.
We can't get rid of the "x" variable, since it serves as a generic
scratch variable for parsing later in the function.

Signed-off-by: Stephen P. Smith <ischis2@cox.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoSubmittingPatches: git-gui has a new maintainer
Junio C Hamano [Wed, 18 Sep 2019 20:57:13 +0000 (13:57 -0700)] 
SubmittingPatches: git-gui has a new maintainer

Signed-off-by: Junio C Hamano <gitster@pobox.com>