git
5 years agoMerge branch 'kg/gc-auto-windows-workaround'
Junio C Hamano [Thu, 2 Aug 2018 22:30:43 +0000 (15:30 -0700)] 
Merge branch 'kg/gc-auto-windows-workaround'

"git gc --auto" opens file descriptors for the packfiles before
spawning "git repack/prune", which would upset Windows that does
not want a process to work on a file that is open by another
process.  The issue has been worked around.

* kg/gc-auto-windows-workaround:
  gc --auto: release pack files before auto packing

5 years agoMerge branch 'jm/cache-entry-from-mem-pool'
Junio C Hamano [Thu, 2 Aug 2018 22:30:43 +0000 (15:30 -0700)] 
Merge branch 'jm/cache-entry-from-mem-pool'

For a large tree, the index needs to hold many cache entries
allocated on heap.  These cache entries are now allocated out of a
dedicated memory pool to amortize malloc(3) overhead.

* jm/cache-entry-from-mem-pool:
  block alloc: add validations around cache_entry lifecyle
  block alloc: allocate cache entries from mem_pool
  mem-pool: fill out functionality
  mem-pool: add life cycle management functions
  mem-pool: only search head block for available space
  block alloc: add lifecycle APIs for cache_entry structs
  read-cache: teach make_cache_entry to take object_id
  read-cache: teach refresh_cache_entry to take istate

5 years agoMerge branch 'jt/fetch-nego-tip'
Junio C Hamano [Thu, 2 Aug 2018 22:30:43 +0000 (15:30 -0700)] 
Merge branch 'jt/fetch-nego-tip'

"git fetch" learned a new option "--negotiation-tip" to limit the
set of commits it tells the other end as "have", to reduce wasted
bandwidth and cycles, which would be helpful when the receiving
repository has a lot of refs that have little to do with the
history at the remote it is fetching from.

* jt/fetch-nego-tip:
  fetch-pack: support negotiation tip whitelist

5 years agoMerge branch 'en/t6042-insane-merge-rename-testcases'
Junio C Hamano [Thu, 2 Aug 2018 22:30:42 +0000 (15:30 -0700)] 
Merge branch 'en/t6042-insane-merge-rename-testcases'

Various glitches in the heuristics of merge-recursive strategy have
been documented in new tests.

* en/t6042-insane-merge-rename-testcases:
  t6042: add testcase covering long chains of rename conflicts
  t6042: add testcase covering rename/rename(2to1)/delete/delete conflict
  t6042: add testcase covering rename/add/delete conflict type

5 years agoMerge branch 'sb/object-store-lookup'
Junio C Hamano [Thu, 2 Aug 2018 22:30:42 +0000 (15:30 -0700)] 
Merge branch 'sb/object-store-lookup'

lookup_commit_reference() and friends have been updated to find
in-core object for a specific in-core repository instance.

* sb/object-store-lookup: (32 commits)
  commit.c: allow lookup_commit_reference to handle arbitrary repositories
  commit.c: allow lookup_commit_reference_gently to handle arbitrary repositories
  tag.c: allow deref_tag to handle arbitrary repositories
  object.c: allow parse_object to handle arbitrary repositories
  object.c: allow parse_object_buffer to handle arbitrary repositories
  commit.c: allow get_cached_commit_buffer to handle arbitrary repositories
  commit.c: allow set_commit_buffer to handle arbitrary repositories
  commit.c: migrate the commit buffer to the parsed object store
  commit-slabs: remove realloc counter outside of slab struct
  commit.c: allow parse_commit_buffer to handle arbitrary repositories
  tag: allow parse_tag_buffer to handle arbitrary repositories
  tag: allow lookup_tag to handle arbitrary repositories
  commit: allow lookup_commit to handle arbitrary repositories
  tree: allow lookup_tree to handle arbitrary repositories
  blob: allow lookup_blob to handle arbitrary repositories
  object: allow lookup_object to handle arbitrary repositories
  object: allow object_as_type to handle arbitrary repositories
  tag: add repository argument to deref_tag
  tag: add repository argument to parse_tag_buffer
  tag: add repository argument to lookup_tag
  ...

5 years agoMerge branch 'is/parsing-line-range'
Junio C Hamano [Thu, 2 Aug 2018 22:30:41 +0000 (15:30 -0700)] 
Merge branch 'is/parsing-line-range'

Parsing of -L[<N>][,[<M>]] parameters "git blame" and "git log"
take has been tweaked.

* is/parsing-line-range:
  log: prevent error if line range ends past end of file
  blame: prevent error if range ends past end of file

5 years agoMerge branch 'jt/fetch-pack-negotiator'
Junio C Hamano [Thu, 2 Aug 2018 22:30:41 +0000 (15:30 -0700)] 
Merge branch 'jt/fetch-pack-negotiator'

Code restructuring and a small fix to transport protocol v2 during
fetching.

* jt/fetch-pack-negotiator:
  fetch-pack: introduce negotiator API
  fetch-pack: move common check and marking together
  fetch-pack: make negotiation-related vars local
  fetch-pack: use ref adv. to prune "have" sent
  fetch-pack: directly end negotiation if ACK ready
  fetch-pack: clear marks before re-marking
  fetch-pack: split up everything_local()

5 years agoMerge branch 'ab/checkout-default-remote'
Junio C Hamano [Thu, 2 Aug 2018 22:30:41 +0000 (15:30 -0700)] 
Merge branch 'ab/checkout-default-remote'

"git checkout" and "git worktree add" learned to honor
checkout.defaultRemote when auto-vivifying a local branch out of a
remote tracking branch in a repository with multiple remotes that
have tracking branches that share the same names.

* ab/checkout-default-remote:
  checkout & worktree: introduce checkout.defaultRemote
  checkout: add advice for ambiguous "checkout <branch>"
  builtin/checkout.c: use "ret" variable for return
  checkout: pass the "num_matches" up to callers
  checkout.c: change "unique" member to "num_matches"
  checkout.c: introduce an *_INIT macro
  checkout.h: wrap the arguments to unique_tracking_name()
  checkout tests: index should be clean after dwim checkout

5 years agoMerge branch 'sb/diff-color-move-more'
Junio C Hamano [Thu, 2 Aug 2018 22:30:40 +0000 (15:30 -0700)] 
Merge branch 'sb/diff-color-move-more'

"git diff --color-moved" feature has further been tweaked.

* sb/diff-color-move-more:
  diff.c: offer config option to control ws handling in move detection
  diff.c: add white space mode to move detection that allows indent changes
  diff.c: factor advance_or_nullify out of mark_color_as_moved
  diff.c: decouple white space treatment from move detection algorithm
  diff.c: add a blocks mode for moved code detection
  diff.c: adjust hash function signature to match hashmap expectation
  diff.c: do not pass diff options as keydata to hashmap
  t4015: avoid git as a pipe input
  xdiff/xdiffi.c: remove unneeded function declarations
  xdiff/xdiff.h: remove unused flags

5 years agoMerge branch 'es/test-fixes'
Junio C Hamano [Thu, 2 Aug 2018 22:30:40 +0000 (15:30 -0700)] 
Merge branch 'es/test-fixes'

Test clean-up and corrections.

* es/test-fixes: (26 commits)
  t5608: fix broken &&-chain
  t9119: fix broken &&-chains
  t9000-t9999: fix broken &&-chains
  t7000-t7999: fix broken &&-chains
  t6000-t6999: fix broken &&-chains
  t5000-t5999: fix broken &&-chains
  t4000-t4999: fix broken &&-chains
  t3030: fix broken &&-chains
  t3000-t3999: fix broken &&-chains
  t2000-t2999: fix broken &&-chains
  t1000-t1999: fix broken &&-chains
  t0000-t0999: fix broken &&-chains
  t9814: simplify convoluted check that command correctly errors out
  t9001: fix broken "invoke hook" test
  t7810: use test_expect_code() instead of hand-rolled comparison
  t7400: fix broken "submodule add/reconfigure --force" test
  t7201: drop pointless "exit 0" at end of subshell
  t6036: fix broken "merge fails but has appropriate contents" tests
  t5505: modernize and simplify hard-to-digest test
  t5406: use write_script() instead of birthing shell script manually
  ...

5 years agoMerge branch 'ds/commit-graph-fsck'
Junio C Hamano [Thu, 2 Aug 2018 22:30:39 +0000 (15:30 -0700)] 
Merge branch 'ds/commit-graph-fsck'

"git fsck" learns to make sure the optional commit-graph file is in
a sane state.

* ds/commit-graph-fsck: (23 commits)
  coccinelle: update commit.cocci
  commit-graph: update design document
  gc: automatically write commit-graph files
  commit-graph: add '--reachable' option
  commit-graph: use string-list API for input
  fsck: verify commit-graph
  commit-graph: verify contents match checksum
  commit-graph: test for corrupted octopus edge
  commit-graph: verify commit date
  commit-graph: verify generation number
  commit-graph: verify parent list
  commit-graph: verify root tree OIDs
  commit-graph: verify objects exist
  commit-graph: verify corrupt OID fanout and lookup
  commit-graph: verify required chunks are present
  commit-graph: verify catches corrupt signature
  commit-graph: add 'verify' subcommand
  commit-graph: load a root tree from specific graph
  commit: force commit to parse from object database
  commit-graph: parse commit from chosen graph
  ...

5 years agoMerge branch 'jk/fsck-gitmodules-gently'
Junio C Hamano [Thu, 2 Aug 2018 22:30:39 +0000 (15:30 -0700)] 
Merge branch 'jk/fsck-gitmodules-gently'

Recent "security fix" to pay attention to contents of ".gitmodules"
while accepting "git push" was a bit overly strict than necessary,
which has been adjusted.

* jk/fsck-gitmodules-gently:
  fsck: downgrade gitmodulesParse default to "info"
  fsck: split ".gitmodules too large" error from parse failure
  fsck: silence stderr when parsing .gitmodules
  config: add options parameter to git_config_from_mem
  config: add CONFIG_ERROR_SILENT handler
  config: turn die_on_error into caller-facing enum

5 years agoMerge branch 'bc/object-id'
Junio C Hamano [Thu, 2 Aug 2018 22:30:39 +0000 (15:30 -0700)] 
Merge branch 'bc/object-id'

Conversion from uchar[40] to struct object_id continues.

* bc/object-id:
  pretty: switch hard-coded constants to the_hash_algo
  sha1-file: convert constants to uses of the_hash_algo
  log-tree: switch GIT_SHA1_HEXSZ to the_hash_algo->hexsz
  diff: switch GIT_SHA1_HEXSZ to use the_hash_algo
  builtin/merge-recursive: make hash independent
  builtin/merge: switch to use the_hash_algo
  builtin/fmt-merge-msg: make hash independent
  builtin/update-index: simplify parsing of cacheinfo
  builtin/update-index: convert to using the_hash_algo
  refs/files-backend: use the_hash_algo for writing refs
  sha1-name: use the_hash_algo when parsing object names
  strbuf: allocate space with GIT_MAX_HEXSZ
  commit: express tree entry constants in terms of the_hash_algo
  hex: switch to using the_hash_algo
  tree-walk: replace hard-coded constants with the_hash_algo
  cache: update object ID functions for the_hash_algo

5 years agoMerge branch 'en/t6036-recursive-corner-cases'
Junio C Hamano [Thu, 2 Aug 2018 22:30:39 +0000 (15:30 -0700)] 
Merge branch 'en/t6036-recursive-corner-cases'

Tests to cover more D/F conflict cases have been added for
merge-recursive.

* en/t6036-recursive-corner-cases:
  t6036: fix broken && chain in sub-shell
  t6036: add lots of detail for directory/file conflicts in recursive case

5 years agoMerge branch 'sg/httpd-test-unflake'
Junio C Hamano [Thu, 2 Aug 2018 22:30:39 +0000 (15:30 -0700)] 
Merge branch 'sg/httpd-test-unflake'

httpd tests saw occasional breakage due to the way its access log
gets inspected by the tests, which has been updated to make them
less flaky.

* sg/httpd-test-unflake:
  t/lib-httpd: avoid occasional failures when checking access.log
  t/lib-httpd: add the strip_access_log() helper function
  t5541: clean up truncating access log

5 years agoMerge branch 'bp/test-drop-caches-for-windows'
Junio C Hamano [Thu, 2 Aug 2018 22:30:38 +0000 (15:30 -0700)] 
Merge branch 'bp/test-drop-caches-for-windows'

A test helper update for Windows.

* bp/test-drop-caches-for-windows:
  handle lower case drive letters on Windows

5 years agoMerge branch 'jk/has-uncommitted-changes-fix'
Junio C Hamano [Thu, 2 Aug 2018 22:30:37 +0000 (15:30 -0700)] 
Merge branch 'jk/has-uncommitted-changes-fix'

"git pull --rebase" on a corrupt HEAD caused a segfault.  In
general we substitute an empty tree object when running the in-core
equivalent of the diff-index command, and the codepath has been
corrected to do so as well to fix this issue.

* jk/has-uncommitted-changes-fix:
  has_uncommitted_changes(): fall back to empty tree

5 years agoFourth batch for 2.19 cycle
Junio C Hamano [Tue, 24 Jul 2018 21:59:49 +0000 (14:59 -0700)] 
Fourth batch for 2.19 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'as/sequencer-customizable-comment-char'
Junio C Hamano [Tue, 24 Jul 2018 21:50:51 +0000 (14:50 -0700)] 
Merge branch 'as/sequencer-customizable-comment-char'

Honor core.commentchar when preparing the list of commits to replay
in "rebase -i".

* as/sequencer-customizable-comment-char:
  sequencer: use configured comment character

5 years agoMerge branch 'sb/blame-color'
Junio C Hamano [Tue, 24 Jul 2018 21:50:50 +0000 (14:50 -0700)] 
Merge branch 'sb/blame-color'

Code clean-up.

* sb/blame-color:
  blame: prefer xsnprintf to strcpy for colors

5 years agoMerge branch 'nd/command-list'
Junio C Hamano [Tue, 24 Jul 2018 21:50:50 +0000 (14:50 -0700)] 
Merge branch 'nd/command-list'

Build doc update for Windows.

* nd/command-list:
  vcbuild/README: update to accommodate for missing common-cmds.h

5 years agoMerge branch 'es/test-lint-one-shot-export'
Junio C Hamano [Tue, 24 Jul 2018 21:50:50 +0000 (14:50 -0700)] 
Merge branch 'es/test-lint-one-shot-export'

Look for broken use of "VAR=VAL shell_func" in test scripts as part
of test-lint.

* es/test-lint-one-shot-export:
  t/check-non-portable-shell: detect "FOO=bar shell_func"
  t/check-non-portable-shell: make error messages more compact
  t/check-non-portable-shell: stop being so polite
  t6046/t9833: fix use of "VAR=VAL cmd" with a shell function

5 years agoMerge branch 'wc/find-commit-with-pattern-on-detached-head'
Junio C Hamano [Tue, 24 Jul 2018 21:50:49 +0000 (14:50 -0700)] 
Merge branch 'wc/find-commit-with-pattern-on-detached-head'

"git rev-parse ':/substring'" did not consider the history leading
only to HEAD when looking for a commit with the given substring,
when the HEAD is detached.  This has been fixed.

* wc/find-commit-with-pattern-on-detached-head:
  sha1-name.c: for ":/", find detached HEAD commits

5 years agoMerge branch 'jc/t3404-one-shot-export-fix'
Junio C Hamano [Tue, 24 Jul 2018 21:50:49 +0000 (14:50 -0700)] 
Merge branch 'jc/t3404-one-shot-export-fix'

Correct a broken use of "VAR=VAL shell_func" in a test.

* jc/t3404-one-shot-export-fix:
  t3404: fix use of "VAR=VAL cmd" with a shell function

5 years agoMerge branch 'mk/merge-in-sparse-checkout'
Junio C Hamano [Tue, 24 Jul 2018 21:50:48 +0000 (14:50 -0700)] 
Merge branch 'mk/merge-in-sparse-checkout'

"git reset --merge" (hence "git merge ---abort") and "git reset --hard"
had trouble working correctly in a sparsely checked out working
tree after a conflict, which has been corrected.

* mk/merge-in-sparse-checkout:
  unpack-trees: do not fail reset because of unmerged skipped entry

5 years agoMerge branch 'hs/push-cert-check-cleanup'
Junio C Hamano [Tue, 24 Jul 2018 21:50:48 +0000 (14:50 -0700)] 
Merge branch 'hs/push-cert-check-cleanup'

Code clean-up.

* hs/push-cert-check-cleanup:
  gpg-interface: make parse_gpg_output static and remove from interface header
  builtin/receive-pack: use check_signature from gpg-interface

5 years agoMerge branch 'jk/empty-pick-fix'
Junio C Hamano [Tue, 24 Jul 2018 21:50:48 +0000 (14:50 -0700)] 
Merge branch 'jk/empty-pick-fix'

Handling of an empty range by "git cherry-pick" was inconsistent
depending on how the range ended up to be empty, which has been
corrected.

* jk/empty-pick-fix:
  sequencer: don't say BUG on bogus input
  sequencer: handle empty-set cases consistently

5 years agoMerge branch 'bp/log-ref-write-fd-with-strbuf'
Junio C Hamano [Tue, 24 Jul 2018 21:50:47 +0000 (14:50 -0700)] 
Merge branch 'bp/log-ref-write-fd-with-strbuf'

Code clean-up.

* bp/log-ref-write-fd-with-strbuf:
  convert log_ref_write_fd() to use strbuf

5 years agoMerge branch 'jt/partial-clone-fsck-connectivity'
Junio C Hamano [Tue, 24 Jul 2018 21:50:47 +0000 (14:50 -0700)] 
Merge branch 'jt/partial-clone-fsck-connectivity'

Partial clone support of "git clone" has been updated to correctly
validate the objects it receives from the other side.  The server
side has been corrected to send objects that are directly
requested, even if they may match the filtering criteria (e.g. when
doing a "lazy blob" partial clone).

* jt/partial-clone-fsck-connectivity:
  clone: check connectivity even if clone is partial
  upload-pack: send refs' objects despite "filter"

5 years agoMerge branch 'bc/send-email-auto-cte'
Junio C Hamano [Tue, 24 Jul 2018 21:50:47 +0000 (14:50 -0700)] 
Merge branch 'bc/send-email-auto-cte'

The content-transfer-encoding of the message "git send-email" sends
out by default was 8bit, which can cause trouble when there is an
overlong line to bust RFC 5322/2822 limit.  A new option 'auto' to
automatically switch to quoted-printable when there is such a line
in the payload has been introduced and is made the default.

* bc/send-email-auto-cte:
  docs: correct RFC specifying email line length
  send-email: automatically determine transfer-encoding
  send-email: accept long lines with suitable transfer encoding
  send-email: add an auto option for transfer encoding

5 years agoMerge branch 'bb/unicode-11-width'
Junio C Hamano [Tue, 24 Jul 2018 21:50:47 +0000 (14:50 -0700)] 
Merge branch 'bb/unicode-11-width'

The character display width table has been updated to match the
latest Unicode standard.

* bb/unicode-11-width:
  unicode: update the width tables to Unicode 11

5 years agoMerge branch 'bb/pedantic'
Junio C Hamano [Tue, 24 Jul 2018 21:50:47 +0000 (14:50 -0700)] 
Merge branch 'bb/pedantic'

The codebase has been updated to compile cleanly with -pedantic
option.

* bb/pedantic:
  utf8.c: avoid char overflow
  string-list.c: avoid conversion from void * to function pointer
  sequencer.c: avoid empty statements at top level
  convert.c: replace "\e" escapes with "\033".
  fixup! refs/refs-internal.h: avoid forward declaration of an enum
  refs/refs-internal.h: avoid forward declaration of an enum
  fixup! connect.h: avoid forward declaration of an enum
  connect.h: avoid forward declaration of an enum

5 years agoMerge branch 'tb/config-default'
Junio C Hamano [Tue, 24 Jul 2018 21:50:46 +0000 (14:50 -0700)] 
Merge branch 'tb/config-default'

Compilation fix.

* tb/config-default:
  builtin/config: work around an unsized array forward declaration

5 years agoMerge branch 'mh/fast-import-no-diff-delta-empty'
Junio C Hamano [Tue, 24 Jul 2018 21:50:46 +0000 (14:50 -0700)] 
Merge branch 'mh/fast-import-no-diff-delta-empty'

"git fast-import" has been updated to avoid attempting to create
delta against a zero-byte-long string, which is pointless.

* mh/fast-import-no-diff-delta-empty:
  fast-import: do not call diff_delta() with empty buffer

5 years agoMerge branch 'kn/userdiff-php'
Junio C Hamano [Tue, 24 Jul 2018 21:50:46 +0000 (14:50 -0700)] 
Merge branch 'kn/userdiff-php'

The userdiff pattern for .php has been updated.

* kn/userdiff-php:
  userdiff: support new keywords in PHP hunk header
  t4018: add missing test cases for PHP

5 years agoMerge branch 'jk/fetch-all-peeled-fix'
Junio C Hamano [Tue, 24 Jul 2018 21:50:45 +0000 (14:50 -0700)] 
Merge branch 'jk/fetch-all-peeled-fix'

Test modernization.

* jk/fetch-all-peeled-fix:
  t5500: prettify non-commit tag tests

5 years agoMerge branch 'ag/rebase-p'
Junio C Hamano [Tue, 24 Jul 2018 21:50:44 +0000 (14:50 -0700)] 
Merge branch 'ag/rebase-p'

The help message shown in the editor to edit todo list in "rebase -p"
has regressed recently, which has been corrected.

* ag/rebase-p:
  git-rebase--preserve-merges: fix formatting of todo help message

5 years agoMerge branch 'jt/connectivity-check-after-unshallow'
Junio C Hamano [Tue, 24 Jul 2018 21:50:44 +0000 (14:50 -0700)] 
Merge branch 'jt/connectivity-check-after-unshallow'

"git fetch" failed to correctly validate the set of objects it
received when making a shallow history deeper, which has been
corrected.

* jt/connectivity-check-after-unshallow:
  fetch-pack: write shallow, then check connectivity
  fetch-pack: implement ref-in-want
  fetch-pack: put shallow info in output parameter
  fetch: refactor to make function args narrower
  fetch: refactor fetch_refs into two functions
  fetch: refactor the population of peer ref OIDs
  upload-pack: test negotiation with changing repository
  upload-pack: implement ref-in-want
  test-pkt-line: add unpack-sideband subcommand

5 years agoMerge branch 'jk/for-each-ref-icase'
Junio C Hamano [Tue, 24 Jul 2018 21:50:44 +0000 (14:50 -0700)] 
Merge branch 'jk/for-each-ref-icase'

The "--ignore-case" option of "git for-each-ref" (and its friends)
did not work correctly, which has been fixed.

* jk/for-each-ref-icase:
  ref-filter: avoid backend filtering with --ignore-case
  for-each-ref: consistently pass WM_IGNORECASE flag
  t6300: add a test for --ignore-case

5 years agoMerge branch 'en/t5407-rebase-m-fix'
Junio C Hamano [Tue, 24 Jul 2018 21:50:43 +0000 (14:50 -0700)] 
Merge branch 'en/t5407-rebase-m-fix'

* en/t5407-rebase-m-fix:
  t5407: fix test to cover intended arguments

5 years agoMerge branch 'en/apply-comment-fix'
Junio C Hamano [Tue, 24 Jul 2018 21:50:43 +0000 (14:50 -0700)] 
Merge branch 'en/apply-comment-fix'

* en/apply-comment-fix:
  apply: fix grammar error in comment

5 years agoMerge branch 'en/rebase-consistency'
Junio C Hamano [Tue, 24 Jul 2018 21:50:43 +0000 (14:50 -0700)] 
Merge branch 'en/rebase-consistency'

"git rebase" behaved slightly differently depending on which one of
the three backends gets used; this has been documented and an
effort to make them more uniform has begun.

* en/rebase-consistency:
  git-rebase: make --allow-empty-message the default
  t3401: add directory rename testcases for rebase and am
  git-rebase.txt: document behavioral differences between modes
  directory-rename-detection.txt: technical docs on abilities and limitations
  git-rebase.txt: address confusion between --no-ff vs --force-rebase
  git-rebase: error out when incompatible options passed
  t3422: new testcases for checking when incompatible options passed
  git-rebase.sh: update help messages a bit
  git-rebase.txt: document incompatible options

5 years agoMerge branch 'sb/submodule-move-head-error-msg'
Junio C Hamano [Tue, 24 Jul 2018 21:50:43 +0000 (14:50 -0700)] 
Merge branch 'sb/submodule-move-head-error-msg'

"git checkout --recurse-submodules another-branch" did not report
in which submodule it failed to update the working tree, which
resulted in an unhelpful error message.

* sb/submodule-move-head-error-msg:
  submodule.c: report the submodule that an error occurs in

5 years agoMerge branch 'rj/submodule-fsck-skip'
Junio C Hamano [Tue, 24 Jul 2018 21:50:42 +0000 (14:50 -0700)] 
Merge branch 'rj/submodule-fsck-skip'

"fsck.skipList" did not prevent a blob object listed there from
being inspected for is contents (e.g. we recently started to
inspect the contents of ".gitmodules" for certain malicious
patterns), which has been corrected.

* rj/submodule-fsck-skip:
  fsck: check skiplist for object in fsck_blob()

5 years agodiff.c: offer config option to control ws handling in move detection
Stefan Beller [Wed, 18 Jul 2018 19:31:56 +0000 (12:31 -0700)] 
diff.c: offer config option to control ws handling in move detection

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff.c: add white space mode to move detection that allows indent changes
Stefan Beller [Wed, 18 Jul 2018 19:31:55 +0000 (12:31 -0700)] 
diff.c: add white space mode to move detection that allows indent changes

The option of --color-moved has proven to be useful as observed on the
mailing list. However when refactoring sometimes the indentation changes,
for example when partitioning a functions into smaller helper functions
the code usually mostly moved around except for a decrease in indentation.

To just review the moved code ignoring the change in indentation, a mode
to ignore spaces in the move detection as implemented in a previous patch
would be enough.  However the whole move coloring as motivated in commit
2e2d5ac (diff.c: color moved lines differently, 2017-06-30), brought
up the notion of the reviewer being able to trust the move of a "block".

As there are languages such as python, which depend on proper relative
indentation for the control flow of the program, ignoring any white space
change in a block would not uphold the promises of 2e2d5ac that allows
reviewers to pay less attention to the inside of a block, as inside
the reviewer wants to assume the same program flow.

This new mode of white space ignorance will take this into account and will
only allow the same white space changes per line in each block. This patch
even allows only for the same change at the beginning of the lines.

As this is a white space mode, it is made exclusive to other white space
modes in the move detection.

This patch brings some challenges, related to the detection of blocks.
We need a wide net to catch the possible moved lines, but then need to
narrow down to check if the blocks are still intact. Consider this
example (ignoring block sizes):

 - A
 - B
 - C
 +    A
 +    B
 +    C

At the beginning of a block when checking if there is a counterpart
for A, we have to ignore all space changes. However at the following
lines we have to check if the indent change stayed the same.

Checking if the indentation change did stay the same, is done by computing
the indentation change by the difference in line length, and then assume
the change is only in the beginning of the longer line, the common tail
is the same. That is why the test contains lines like:

 - <TAB> A
 ...
 + A <TAB>
 ...

As the first line starting a block is caught using a compare function that
ignores white spaces unlike the rest of the block, where the white space
delta is taken into account for the comparison, we also have to think about
the following situation:

 - A
 - B
 -   A
 -   B
 +    A
 +    B
 +      A
 +      B

When checking if the first A (both in the + and - lines) is a start of
a block, we have to check all 'A' and record all the white space deltas
such that we can find the example above to be just one block that is
indented.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoThird batch for 2.19 cycle
Junio C Hamano [Wed, 18 Jul 2018 19:24:17 +0000 (12:24 -0700)] 
Third batch for 2.19 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'js/enhanced-version-info'
Junio C Hamano [Wed, 18 Jul 2018 19:20:35 +0000 (12:20 -0700)] 
Merge branch 'js/enhanced-version-info'

Build fix.

* js/enhanced-version-info:
  Makefile: fix the "built from commit" code

5 years agoMerge branch 'sb/mailmap'
Junio C Hamano [Wed, 18 Jul 2018 19:20:35 +0000 (12:20 -0700)] 
Merge branch 'sb/mailmap'

* sb/mailmap:
  .mailmap: merge different spellings of names

5 years agoMerge branch 'ms/core-icase-doc'
Junio C Hamano [Wed, 18 Jul 2018 19:20:35 +0000 (12:20 -0700)] 
Merge branch 'ms/core-icase-doc'

Clarify that setting core.ignoreCase to deviate from reality would
not turn a case-incapable filesystem into a case-capable one.

* ms/core-icase-doc:
  Documentation: declare "core.ignoreCase" as internal variable

5 years agoMerge branch 'ds/commit-graph'
Junio C Hamano [Wed, 18 Jul 2018 19:20:34 +0000 (12:20 -0700)] 
Merge branch 'ds/commit-graph'

Docfix.

* ds/commit-graph:
  commit-graph: fix documentation inconsistencies

5 years agoMerge branch 'tz/exclude-doc-smallfixes'
Junio C Hamano [Wed, 18 Jul 2018 19:20:34 +0000 (12:20 -0700)] 
Merge branch 'tz/exclude-doc-smallfixes'

Doc updates.

* tz/exclude-doc-smallfixes:
  dir.c: fix typos in core.excludesfile comment
  gitignore.txt: clarify default core.excludesfile path

5 years agoMerge branch 'js/rebase-recreate-merge'
Junio C Hamano [Wed, 18 Jul 2018 19:20:33 +0000 (12:20 -0700)] 
Merge branch 'js/rebase-recreate-merge'

Docfix.

* js/rebase-recreate-merge:
  rebase: fix documentation formatting

5 years agoMerge branch 'en/rebase-i-microfixes'
Junio C Hamano [Wed, 18 Jul 2018 19:20:33 +0000 (12:20 -0700)] 
Merge branch 'en/rebase-i-microfixes'

* en/rebase-i-microfixes:
  git-rebase--merge: modernize "git-$cmd" to "git $cmd"
  Fix use of strategy options with interactive rebases
  t3418: add testcase showing problems with rebase -i and strategy options

5 years agoMerge branch 'mb/filter-branch-optim'
Junio C Hamano [Wed, 18 Jul 2018 19:20:32 +0000 (12:20 -0700)] 
Merge branch 'mb/filter-branch-optim'

"git filter-branch" when used with the "--state-branch" option
still attempted to rewrite the commits whose filtered result is
known from the previous attempt (which is recorded on the state
branch); the command has been corrected not to waste cycles doing
so.

* mb/filter-branch-optim:
  filter-branch: skip commits present on --state-branch

5 years agoMerge branch 'dj/runtime-prefix'
Junio C Hamano [Wed, 18 Jul 2018 19:20:32 +0000 (12:20 -0700)] 
Merge branch 'dj/runtime-prefix'

POSIX portability fix in Makefile to fix a glitch introduced a few
releases ago.

* dj/runtime-prefix:
  Makefile: tweak sed invocation

5 years agoMerge branch 'ao/config-from-gitmodules'
Junio C Hamano [Wed, 18 Jul 2018 19:20:31 +0000 (12:20 -0700)] 
Merge branch 'ao/config-from-gitmodules'

Tighten the API to make it harder to misuse in-tree .gitmodules
file, even though it shares the same syntax with configuration
files, to read random configuration items from it.

* ao/config-from-gitmodules:
  submodule-config: reuse config_from_gitmodules in repo_read_gitmodules
  submodule-config: pass repository as argument to config_from_gitmodules
  submodule-config: make 'config_from_gitmodules' private
  submodule-config: add helper to get 'update-clone' config from .gitmodules
  submodule-config: add helper function to get 'fetch' config from .gitmodules
  config: move config_from_gitmodules to submodule-config.c

5 years agoMerge branch 'jk/branch-l-0-deprecation'
Junio C Hamano [Wed, 18 Jul 2018 19:20:31 +0000 (12:20 -0700)] 
Merge branch 'jk/branch-l-0-deprecation'

The "-l" option in "git branch -l" is an unfortunate short-hand for
"--create-reflog", but many users, both old and new, somehow expect
it to be something else, perhaps "--list".  This step warns when "-l"
is used as a short-hand for "--create-reflog" and warns about the
future repurposing of the it when it is used.

* jk/branch-l-0-deprecation:
  branch: deprecate "-l" option
  t: switch "branch -l" to "branch --create-reflog"
  t3200: unset core.logallrefupdates when testing reflog creation

5 years agoMerge branch 'tb/grep-column'
Junio C Hamano [Wed, 18 Jul 2018 19:20:31 +0000 (12:20 -0700)] 
Merge branch 'tb/grep-column'

"git grep" learned the "--column" option that gives not just the
line number but the column number of the hit.

* tb/grep-column:
  contrib/git-jump/git-jump: jump to exact location
  grep.c: add configuration variables to show matched option
  builtin/grep.c: add '--column' option to 'git-grep(1)'
  grep.c: display column number of first match
  grep.[ch]: extend grep_opt to allow showing matched column
  grep.c: expose {,inverted} match column in match_line()
  Documentation/config.txt: camel-case lineNumber for consistency

5 years agoMerge branch 'vs/typofixes'
Junio C Hamano [Wed, 18 Jul 2018 19:20:31 +0000 (12:20 -0700)] 
Merge branch 'vs/typofixes'

Doc fix.

* vs/typofixes:
  Documentation: spelling and grammar fixes

5 years agoMerge branch 'bw/protocol-v2'
Junio C Hamano [Wed, 18 Jul 2018 19:20:30 +0000 (12:20 -0700)] 
Merge branch 'bw/protocol-v2'

Doc fix.

* bw/protocol-v2:
  protocol-v2 doc: put HTTP headers after request

5 years agoMerge branch 'jt/remove-pack-bitmap-global'
Junio C Hamano [Wed, 18 Jul 2018 19:20:30 +0000 (12:20 -0700)] 
Merge branch 'jt/remove-pack-bitmap-global'

The effort to move globals to per-repository in-core structure
continues.

* jt/remove-pack-bitmap-global:
  pack-bitmap: add free function
  pack-bitmap: remove bitmap_git global variable

5 years agoMerge branch 'bw/config-refer-to-gitsubmodules-doc'
Junio C Hamano [Wed, 18 Jul 2018 19:20:30 +0000 (12:20 -0700)] 
Merge branch 'bw/config-refer-to-gitsubmodules-doc'

Docfix.

* bw/config-refer-to-gitsubmodules-doc:
  docs: link to gitsubmodules

5 years agoMerge branch 'xy/format-patch-prereq-patch-id-fix'
Junio C Hamano [Wed, 18 Jul 2018 19:20:29 +0000 (12:20 -0700)] 
Merge branch 'xy/format-patch-prereq-patch-id-fix'

Recently added "--base" option to "git format-patch" command did
not correctly generate prereq patch ids.

* xy/format-patch-prereq-patch-id-fix:
  format-patch: clear UNINTERESTING flag before prepare_bases

5 years agoMerge branch 'pw/rebase-i-keep-reword-after-conflict'
Junio C Hamano [Wed, 18 Jul 2018 19:20:29 +0000 (12:20 -0700)] 
Merge branch 'pw/rebase-i-keep-reword-after-conflict'

Bugfix for "rebase -i" corner case regression.

* pw/rebase-i-keep-reword-after-conflict:
  sequencer: do not squash 'reword' commits when we hit conflicts

5 years agoMerge branch 'ld/p423'
Junio C Hamano [Wed, 18 Jul 2018 19:20:29 +0000 (12:20 -0700)] 
Merge branch 'ld/p423'

Code preparation to make "git p4" closer to be usable with Python 3.

* ld/p423:
  git-p4: python3: fix octal constants
  git-p4: python3: use print() function
  git-p4: python3: basestring workaround
  git-p4: python3: remove backticks
  git-p4: python3: replace dict.has_key(k) with "k in dict"
  git-p4: python3: replace <> with !=

5 years agoMerge branch 'ds/ewah-cleanup'
Junio C Hamano [Wed, 18 Jul 2018 19:20:28 +0000 (12:20 -0700)] 
Merge branch 'ds/ewah-cleanup'

Remove unused function definitions and declarations from ewah
bitmap subsystem.

* ds/ewah-cleanup:
  ewah: delete unused 'rlwit_discharge_empty()'
  ewah: drop ewah_serialize_native function
  ewah: drop ewah_deserialize function
  ewah_io: delete unused 'ewah_serialize()'
  ewah_bitmap: delete unused 'ewah_or()'
  ewah_bitmap: delete unused 'ewah_not()'
  ewah_bitmap: delete unused 'ewah_and_not()'
  ewah_bitmap: delete unused 'ewah_and()'
  ewah/bitmap.c: delete unused 'bitmap_each_bit()'
  ewah/bitmap.c: delete unused 'bitmap_clear()'

5 years agoMerge branch 'sb/submodule-core-worktree'
Junio C Hamano [Wed, 18 Jul 2018 19:20:28 +0000 (12:20 -0700)] 
Merge branch 'sb/submodule-core-worktree'

"git submodule" did not correctly adjust core.worktree setting that
indicates whether/where a submodule repository has its associated
working tree across various state transitions, which has been
corrected.

* sb/submodule-core-worktree:
  submodule deinit: unset core.worktree
  submodule: ensure core.worktree is set after update
  submodule: unset core.worktree if no working tree is present

5 years agoMerge branch 'sb/object-store-grafts'
Junio C Hamano [Wed, 18 Jul 2018 19:20:27 +0000 (12:20 -0700)] 
Merge branch 'sb/object-store-grafts'

The conversion to pass "the_repository" and then "a_repository"
throughout the object access API continues.

* sb/object-store-grafts:
  commit: allow lookup_commit_graft to handle arbitrary repositories
  commit: allow prepare_commit_graft to handle arbitrary repositories
  shallow: migrate shallow information into the object parser
  path.c: migrate global git_path_* to take a repository argument
  cache: convert get_graft_file to handle arbitrary repositories
  commit: convert read_graft_file to handle arbitrary repositories
  commit: convert register_commit_graft to handle arbitrary repositories
  commit: convert commit_graft_pos() to handle arbitrary repositories
  shallow: add repository argument to is_repository_shallow
  shallow: add repository argument to check_shallow_file_for_update
  shallow: add repository argument to register_shallow
  shallow: add repository argument to set_alternate_shallow_file
  commit: add repository argument to lookup_commit_graft
  commit: add repository argument to prepare_commit_graft
  commit: add repository argument to read_graft_file
  commit: add repository argument to register_commit_graft
  commit: add repository argument to commit_graft_pos
  object: move grafts to object parser
  object-store: move object access functions to object-store.h

5 years agoMerge branch 'en/merge-recursive-cleanup'
Junio C Hamano [Wed, 18 Jul 2018 19:20:27 +0000 (12:20 -0700)] 
Merge branch 'en/merge-recursive-cleanup'

Code cleanup.

* en/merge-recursive-cleanup:
  merge-recursive: add pointer about unduly complex looking code
  merge-recursive: rename conflict_rename_*() family of functions
  merge-recursive: clarify the rename_dir/RENAME_DIR meaning
  merge-recursive: align labels with their respective code blocks
  merge-recursive: fix numerous argument alignment issues
  merge-recursive: fix miscellaneous grammar error in comment

5 years agodiff.c: factor advance_or_nullify out of mark_color_as_moved
Stefan Beller [Mon, 16 Jul 2018 23:05:41 +0000 (16:05 -0700)] 
diff.c: factor advance_or_nullify out of mark_color_as_moved

This moves the part of code that checks if we're still in a block
into its own function.  We'll need a different approach on advancing
the blocks in a later patch, so having it as a separate function will
prove useful.

While at it rename the variable `p` to `prev` to indicate that it refers
to the previous line. This is as pmb[i] was assigned in the last iteration
of the outmost for loop.

Further rename `pnext` to `cur` to indicate that this should match up with
the current line of the outmost for loop.

Also replace the advancement of pmb[i] to reuse `cur` instead of
using `p->next` (which is how the name for pnext could be explained.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff.c: decouple white space treatment from move detection algorithm
Stefan Beller [Mon, 16 Jul 2018 23:05:40 +0000 (16:05 -0700)] 
diff.c: decouple white space treatment from move detection algorithm

In the original implementation of the move detection logic the choice for
ignoring white space changes is the same for the move detection as it is
for the regular diff.  Some cases came up where different treatment would
have been nice.

Allow the user to specify that white space should be ignored differently
during detection of moved lines than during generation of added and removed
lines. This is done by providing analogs to the --ignore-space-at-eol,
-b, and -w options by introducing the option --color-moved-ws=<modes>
with the modes named "ignore-space-at-eol", "ignore-space-change" and
"ignore-all-space", which is used only during the move detection phase.

As we change the default, we'll adjust the tests.

For now we do not infer any options to treat white spaces in the move
detection from the generic white space options given to diff.
This can be tuned later to reasonable default.

As we plan on adding more white space related options in a later patch,
that interferes with the current white space options, use a flag field
and clamp it down to  XDF_WHITESPACE_FLAGS, as that (a) allows to easily
check at parse time if we give invalid combinations and (b) can reuse
parts of this patch.

By having the white space treatment in its own option, we'll also
make it easier for a later patch to have an config option for
spaces in the move detection.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff.c: add a blocks mode for moved code detection
Stefan Beller [Mon, 16 Jul 2018 23:05:39 +0000 (16:05 -0700)] 
diff.c: add a blocks mode for moved code detection

The new "blocks" mode provides a middle ground between plain and zebra.
It is as intuitive (few colors) as plain, but still has the requirement
for a minimum of lines/characters to count a block as moved.

Suggested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
 (https://public-inbox.org/git/87o9j0uljo.fsf@evledraar.gmail.com/)
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff.c: adjust hash function signature to match hashmap expectation
Stefan Beller [Mon, 16 Jul 2018 23:05:38 +0000 (16:05 -0700)] 
diff.c: adjust hash function signature to match hashmap expectation

This makes the follow up patch easier.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff.c: do not pass diff options as keydata to hashmap
Stefan Beller [Mon, 16 Jul 2018 23:05:37 +0000 (16:05 -0700)] 
diff.c: do not pass diff options as keydata to hashmap

When we initialize the hashmap, we give it a pointer to the
diff_options, which it then passes along to each call of the
hashmap_cmp_fn function. There's no need to pass it a second time as
the "keydata" parameter, and our comparison functions never look at
keydata.

This was a mistake left over from an earlier round of 2e2d5ac184
(diff.c: color moved lines differently, 2017-06-30), before hashmap
learned to pass the data pointer for us.

Explanation-by: Jeff King <peff@peff.net>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot4015: avoid git as a pipe input
Stefan Beller [Mon, 16 Jul 2018 23:05:36 +0000 (16:05 -0700)] 
t4015: avoid git as a pipe input

In t4015 we have a pattern of

    git diff [<options, related to color>] |
        grep -v "index" |
        test_decode_color >actual &&

to produce output that we want to test against. This pattern was introduced
in 86b452e2769 (diff.c: add dimming to moved line detection, 2017-06-30)
as then the focus on getting the colors right. However the pattern used
is not best practice as we do care about the exit code of Git. So let's
not have Git as the upstream of a pipe. Piping the output of grep to
some function is fine as we assume grep to be un-flawed in our test suite.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoxdiff/xdiffi.c: remove unneeded function declarations
Stefan Beller [Mon, 16 Jul 2018 23:05:35 +0000 (16:05 -0700)] 
xdiff/xdiffi.c: remove unneeded function declarations

There is no need to forward-declare these functions, as they are used
after their implementation only.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoxdiff/xdiff.h: remove unused flags
Stefan Beller [Mon, 16 Jul 2018 23:05:34 +0000 (16:05 -0700)] 
xdiff/xdiff.h: remove unused flags

These flags were there since the beginning (3443546f6e (Use a *real*
built-in diff generator, 2006-03-24), but were never used. Remove them.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot5608: fix broken &&-chain
SZEDER Gábor [Thu, 12 Jul 2018 12:37:29 +0000 (14:37 +0200)] 
t5608: fix broken &&-chain

This was missed by the previous clean-ups.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot/check-non-portable-shell: detect "FOO=bar shell_func"
Eric Sunshine [Fri, 13 Jul 2018 05:52:05 +0000 (01:52 -0400)] 
t/check-non-portable-shell: detect "FOO=bar shell_func"

One-shot environment variable assignments, such as 'FOO' in
"FOO=bar cmd", exist only during the invocation of 'cmd'. However, if
'cmd' happens to be a shell function, then 'FOO' is assigned in the
executing shell itself, and that assignment remains until the process
exits (unless explicitly unset). Since this side-effect of
"FOO=bar shell_func" is unlikely to be intentional, detect and report
such usage.

To distinguish shell functions from other commands, perform a pre-scan
of shell scripts named as input, gleaning a list of function names by
recognizing lines of the form (loosely matching whitespace):

    shell_func () {

and later report suspect lines of the form (loosely matching quoted
values):

    FOO=bar [BAR=foo ...] shell_func

Also take care to stitch together incomplete lines (those ending with
"\") since suspect invocations may be split over multiple lines:

    FOO=bar BAR=foo \
    shell_func

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot/check-non-portable-shell: make error messages more compact
Eric Sunshine [Fri, 13 Jul 2018 05:52:04 +0000 (01:52 -0400)] 
t/check-non-portable-shell: make error messages more compact

Error messages emitted by this linting script are long and noisy,
consisting of several sections:

    <test-script>:<line#>: error: <explanation>: <failed-shell-text>

The line of failed shell text, usually coming from within a test body,
is often indented by one or two TABs, with the result that the actual
(important) text is separated from <explanation> by a good deal of empty
space. This can make for a difficult read, especially on typical
80-column terminals.

Make the messages more compact and perhaps a bit easier to digest by
folding out the leading whitespace from <failed-shell-text>.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot/check-non-portable-shell: stop being so polite
Eric Sunshine [Fri, 13 Jul 2018 05:52:03 +0000 (01:52 -0400)] 
t/check-non-portable-shell: stop being so polite

Error messages emitted by this linting script are long and noisy,
consisting of several sections:

    <test-script>:<line#>: error: <explanation>: <failed-shell-text>

Many problem explanations ask the reader to "please" use a suggested
alternative, however, such politeness is unnecessary and just adds to
the noise and length of the line, so drop "please" to make the message a
bit more concise.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot6046/t9833: fix use of "VAR=VAL cmd" with a shell function
Eric Sunshine [Fri, 13 Jul 2018 05:52:02 +0000 (01:52 -0400)] 
t6046/t9833: fix use of "VAR=VAL cmd" with a shell function

Unlike "FOO=bar cmd" one-shot environment variable assignments
which exist only for the invocation of 'cmd', those assigned by
"FOO=bar shell_func" exist within the running shell and continue to
do so until the process exits (or are explicitly unset). It is
unlikely that this behavior was intended by the test author.

In these particular tests, the "FOO=bar shell_func" invocations are
already in subshells, so the assignments don't last too long, don't
appear to harm subsequent commands in the same subshells, and don't
affect other tests in the same scripts, however, the usage is
nevertheless misleading and poor practice, so fix the tests to assign
and export the environment variables in the usual fashion.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'jc/t3404-one-shot-export-fix' into es/test-lint-one-shot-export
Junio C Hamano [Mon, 16 Jul 2018 21:54:55 +0000 (14:54 -0700)] 
Merge branch 'jc/t3404-one-shot-export-fix' into es/test-lint-one-shot-export

* jc/t3404-one-shot-export-fix:
  t3404: fix use of "VAR=VAL cmd" with a shell function

5 years agot9119: fix broken &&-chains
Eric Sunshine [Mon, 2 Jul 2018 00:24:05 +0000 (20:24 -0400)] 
t9119: fix broken &&-chains

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot9000-t9999: fix broken &&-chains
Eric Sunshine [Mon, 2 Jul 2018 00:24:04 +0000 (20:24 -0400)] 
t9000-t9999: fix broken &&-chains

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot7000-t7999: fix broken &&-chains
Eric Sunshine [Mon, 2 Jul 2018 00:24:03 +0000 (20:24 -0400)] 
t7000-t7999: fix broken &&-chains

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot6000-t6999: fix broken &&-chains
Eric Sunshine [Mon, 2 Jul 2018 00:24:02 +0000 (20:24 -0400)] 
t6000-t6999: fix broken &&-chains

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot5000-t5999: fix broken &&-chains
Eric Sunshine [Mon, 2 Jul 2018 00:24:01 +0000 (20:24 -0400)] 
t5000-t5999: fix broken &&-chains

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot4000-t4999: fix broken &&-chains
Eric Sunshine [Mon, 2 Jul 2018 00:24:00 +0000 (20:24 -0400)] 
t4000-t4999: fix broken &&-chains

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot3030: fix broken &&-chains
Eric Sunshine [Mon, 2 Jul 2018 00:23:59 +0000 (20:23 -0400)] 
t3030: fix broken &&-chains

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot3000-t3999: fix broken &&-chains
Eric Sunshine [Mon, 2 Jul 2018 00:23:58 +0000 (20:23 -0400)] 
t3000-t3999: fix broken &&-chains

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot2000-t2999: fix broken &&-chains
Eric Sunshine [Mon, 2 Jul 2018 00:23:57 +0000 (20:23 -0400)] 
t2000-t2999: fix broken &&-chains

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot1000-t1999: fix broken &&-chains
Eric Sunshine [Mon, 2 Jul 2018 00:23:56 +0000 (20:23 -0400)] 
t1000-t1999: fix broken &&-chains

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot0000-t0999: fix broken &&-chains
Eric Sunshine [Mon, 2 Jul 2018 00:23:55 +0000 (20:23 -0400)] 
t0000-t0999: fix broken &&-chains

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot9814: simplify convoluted check that command correctly errors out
Eric Sunshine [Mon, 2 Jul 2018 00:23:54 +0000 (20:23 -0400)] 
t9814: simplify convoluted check that command correctly errors out

This test uses a convoluted method to verify that "p4 help" errors
out when asked for help about an unknown command. In doing so, it
intentionally breaks the &&-chain. Simplify by employing the typical
"! command" idiom and a normal &&-chain instead.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot9001: fix broken "invoke hook" test
Eric Sunshine [Mon, 2 Jul 2018 00:23:53 +0000 (20:23 -0400)] 
t9001: fix broken "invoke hook" test

This test has been dysfunctional since it was added by 6489660b4b
(send-email: support validate hook, 2017-05-12), however, the problem
went unnoticed due to a broken &&-chain late in the test.

The test wants to verify that a non-zero exit code from the
'sendemail-validate' hook causes git-send-email to abort with a
particular error message. A command which is expected to fail should be
run with 'test_must_fail', however, the test neglects to do so.

Fix this problem, as well as the broken &&-chain behind which the
problem hid.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot7810: use test_expect_code() instead of hand-rolled comparison
Eric Sunshine [Mon, 2 Jul 2018 00:23:52 +0000 (20:23 -0400)] 
t7810: use test_expect_code() instead of hand-rolled comparison

This test manually checks the exit code of git-grep for a particular
value. In doing so, it intentionally breaks the &&-chain. Modernize the
test by taking advantage of test_expect_code() and a normal &&-chain.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot7400: fix broken "submodule add/reconfigure --force" test
Eric Sunshine [Mon, 2 Jul 2018 00:23:51 +0000 (20:23 -0400)] 
t7400: fix broken "submodule add/reconfigure --force" test

This test has been dysfunctional since it was added by 619acfc78c
(submodule add: extend force flag to add existing repos, 2016-10-06),
however, two problems early in the test went unnoticed due to a broken
&&-chain later in the test.

First, it tries configuring the submodule with repository "bogus-url",
however, "git submodule add" insists that the repository be either an
absolute URL or a relative pathname requiring prefix "./" or "../" (this
is true even with --force), but "bogus-url" does not meet those
criteria, thus the command fails.

Second, it then tries configuring a submodule with a path which is
.gitignore'd, which is disallowed. This restriction can be overridden
with --force, but the test neglects to use that option.

Fix both problems, as well as the broken &&-chain behind which they hid.

Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agovcbuild/README: update to accommodate for missing common-cmds.h
Johannes Schindelin [Fri, 22 Jun 2018 11:09:11 +0000 (13:09 +0200)] 
vcbuild/README: update to accommodate for missing common-cmds.h

In 60f487ac0ef (Remove common-cmds.h, 2018-05-10), we forgot to adjust
this README when removing the common-cmds.h file.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>