summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-12-01Merge branch 'ns/test-desc-typofix'Libravatar Junio C Hamano1-2/+2
Typofix. * ns/test-desc-typofix: t: fix typo in test descriptions
2019-12-01Merge branch 'en/t6024-style'Libravatar Junio C Hamano1-63/+67
Test updates. * en/t6024-style: t6024: modernize style
2019-12-01Merge branch 'en/misc-doc-fixes'Libravatar Junio C Hamano3-5/+5
Misc doc fixes. * en/misc-doc-fixes: name-hash.c: remove duplicate word in comment hashmap: fix documentation misuses of -> versus . git-filter-branch.txt: correct argument name typo
2019-12-01Merge branch 'js/fetch-multi-lockfix'Libravatar Junio C Hamano2-2/+12
Fetching from multiple remotes into the same repository in parallel had a bad interaction with the recent change to (optionally) update the commit-graph after a fetch job finishes, as these parallel fetches compete with each other. Which has been corrected. * js/fetch-multi-lockfix: fetch: avoid locking issues between fetch.jobs/fetch.writeCommitGraph fetch: add the command-line option `--write-commit-graph`
2019-12-01Merge branch 'rs/trace2-dots'Libravatar Junio C Hamano1-15/+2
Code cleanup. * rs/trace2-dots: trace2: add dots directly to strbuf in perf_fmt_prepare()
2019-12-01Merge branch 'kw/fsmonitor-watchman-fix'Libravatar Junio C Hamano2-18/+8
The watchman integration for fsmonitor was racy, which has been corrected to be more conservative. * kw/fsmonitor-watchman-fix: fsmonitor: fix watchman integration
2019-12-01Merge branch 'cb/curl-use-xmalloc'Libravatar Junio C Hamano1-10/+8
HTTP transport had possible allocator/deallocator mismatch, which has been corrected. * cb/curl-use-xmalloc: remote-curl: unbreak http.extraHeader with custom allocators
2019-12-01Merge branch 'rt/fetch-message-fix'Libravatar Junio C Hamano1-1/+1
A small message update. * rt/fetch-message-fix: fetch.c: fix typo in a warning message
2019-12-01Merge branch 'es/myfirstcontrib-updates'Libravatar Junio C Hamano1-3/+50
Doc updates. * es/myfirstcontrib-updates: myfirstcontrib: hint to find gitgitgadget allower myfirstcontrib: add dependency installation step myfirstcontrib: add 'psuh' to command-list.txt
2019-12-01Merge branch 'hw/config-doc-in-header'Libravatar Junio C Hamano2-319/+335
Follow recent push to move API docs from Documentation/ to header files and update config.h * hw/config-doc-in-header: config: move documentation to config.h
2019-12-01Merge branch 'dl/doc-diff-no-index-implies-exit-code'Libravatar Junio C Hamano1-1/+1
Doc update. * dl/doc-diff-no-index-implies-exit-code: git-diff.txt: document return code of `--no-index`
2019-12-01Merge branch 'js/vreportf-wo-buffering'Libravatar Junio C Hamano1-4/+16
Messages from die() etc. can be mixed up from multiple processes without even line buffering on Windows, which has been worked around. * js/vreportf-wo-buffering: vreportf(): avoid relying on stdio buffering
2019-12-01Merge branch 'pb/no-recursive-reset-hard-in-worktree-add'Libravatar Junio C Hamano2-1/+25
"git worktree add" internally calls "reset --hard" that should not descend into submodules, even when submodule.recurse configuration is set, but it was affected. This has been corrected. * pb/no-recursive-reset-hard-in-worktree-add: worktree: teach "add" to ignore submodule.recurse config
2019-12-01Merge branch 'pb/help-list-gitsubmodules-among-guides'Libravatar Junio C Hamano2-1/+2
Help update. * pb/help-list-gitsubmodules-among-guides: help: add gitsubmodules to the list of guides
2019-12-01Merge branch 'sg/blame-indent-heuristics-is-now-the-default'Libravatar Junio C Hamano1-8/+0
Message update. * sg/blame-indent-heuristics-is-now-the-default: builtin/blame.c: remove '--indent-heuristic' from usage string
2019-12-01Merge branch 'mr/clone-dir-exists-to-path-exists'Libravatar Junio C Hamano1-4/+4
Code cleanup. * mr/clone-dir-exists-to-path-exists: clone: rename static function `dir_exists()`.
2019-12-01Merge branch 'ma/bisect-doc-sample-update'Libravatar Junio C Hamano1-1/+1
"git merge --no-commit" needs "--no-ff" if you do not want to move HEAD, which has been corrected in the manual page for "git bisect". * ma/bisect-doc-sample-update: Documentation/git-bisect.txt: add --no-ff to merge command
2019-12-01Merge branch 'js/git-path-head-dot-lock-fix'Libravatar Junio C Hamano3-8/+18
"git rev-parse --git-path HEAD.lock" did not give the right path when run in a secondary worktree. * js/git-path-head-dot-lock-fix: git_path(): handle `.lock` files correctly t1400: wrap setup code in test case
2019-12-01Merge branch 'jc/log-graph-simplify'Libravatar Junio C Hamano6-326/+659
The implementation of "git log --graph" got refactored and then its output got simplified. * jc/log-graph-simplify: t4215: use helper function to check output graph: fix coloring of octopus dashes graph: flatten edges that fuse with their right neighbor graph: smooth appearance of collapsing edges on commit lines graph: rename `new_mapping` to `old_mapping` graph: commit and post-merge lines for left-skewed merges graph: tidy up display of left-skewed merges graph: example of graph output that can be simplified graph: extract logic for moving to GRAPH_PRE_COMMIT state graph: remove `mapping_idx` and `graph_update_width()` graph: reduce duplication in `graph_insert_into_new_columns()` graph: reuse `find_new_column_by_commit()` graph: handle line padding in `graph_next_line()` graph: automatically track display width of graph lines
2019-12-01Merge branch 'jk/cleanup-object-parsing-and-fsck'Libravatar Junio C Hamano9-302/+312
Crufty code and logic accumulated over time around the object parsing and low-level object access used in "git fsck" have been cleaned up. * jk/cleanup-object-parsing-and-fsck: (23 commits) fsck: accept an oid instead of a "struct tree" for fsck_tree() fsck: accept an oid instead of a "struct commit" for fsck_commit() fsck: accept an oid instead of a "struct tag" for fsck_tag() fsck: rename vague "oid" local variables fsck: don't require an object struct in verify_headers() fsck: don't require an object struct for fsck_ident() fsck: drop blob struct from fsck_finish() fsck: accept an oid instead of a "struct blob" for fsck_blob() fsck: don't require an object struct for report() fsck: only require an oid for skiplist functions fsck: only provide oid/type in fsck_error callback fsck: don't require object structs for display functions fsck: use oids rather than objects for object_name API fsck_describe_object(): build on our get_object_name() primitive fsck: unify object-name code fsck: require an actual buffer for non-blobs fsck: stop checking tag->tagged fsck: stop checking commit->parent counts fsck: stop checking commit->tree value commit, tag: don't set parsed bit for parse failures ...
2019-11-13t4215: use helper function to check outputLibravatar Denton Liu1-111/+97
When git commands are placed in the upstream of a pipe, their return codes are lost. In this particular case, it is especially bad since we are testing the intricacies of `git log --graph` behavior and if we hit an unexpected failure or segfault, we want to know this. Extract the common output checking logic into check_graph() where we redirect the output of git commands upstream of pipe into a file and have sed read from that file so that git failures are detected. This patch is best viewed with `--color-moved`. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-10The first batch post 2.24 cycleLibravatar Junio C Hamano3-2/+70
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-10Merge branch 'bc/hash-independent-tests-part-6'Libravatar Junio C Hamano16-155/+277
Test updates to prepare for SHA-2 transition continues. * bc/hash-independent-tests-part-6: t4048: abstract away SHA-1-specific constants t4045: make hash-size independent t4044: update test to work with SHA-256 t4039: abstract away SHA-1-specific constants t4038: abstract away SHA-1 specific constants t4034: abstract away SHA-1-specific constants t4027: make hash-size independent t4015: abstract away SHA-1-specific constants t4011: abstract away SHA-1-specific constants t4010: abstract away SHA-1-specific constants t3429: remove SHA1 annotation t1305: avoid comparing extensions rev-parse: add a --show-object-format option t/oid-info: add empty tree and empty blob values t/oid-info: allow looking up hash algorithm name
2019-11-10Merge branch 'js/update-index-ignore-removal-for-skip-worktree'Libravatar Junio C Hamano6-4/+42
"git stash save" in a working tree that is sparsely checked out mistakenly removed paths that are outside the area of interest. * js/update-index-ignore-removal-for-skip-worktree: stash: handle staged changes in skip-worktree files correctly update-index: optionally leave skip-worktree entries alone
2019-11-10Merge branch 'pb/pretty-email-without-domain-part'Libravatar Junio C Hamano5-62/+111
The custom format for "git log --format=<format>" learned the l/L placeholder that is similar to e/E that fills in the e-mail address, but only the local part on the left side of '@'. * pb/pretty-email-without-domain-part: pretty: add "%aL" etc. to show local-part of email addresses t4203: use test-lib.sh definitions t6006: use test-lib.sh definitions
2019-11-10Merge branch 'hw/remove-api-docs-placeholder'Libravatar Junio C Hamano4-40/+0
Docfix. * hw/remove-api-docs-placeholder: documentation: remove empty doc files
2019-11-10Merge branch 'sg/commit-graph-usage-fix'Libravatar Junio C Hamano1-1/+0
Message fix. * sg/commit-graph-usage-fix: builtin/commit-graph.c: remove subcommand-less usage string
2019-11-10Merge branch 'dl/apply-3way-diff3'Libravatar Junio C Hamano2-27/+30
"git apply --3way" learned to honor merge.conflictStyle configuration variable, like merges would. * dl/apply-3way-diff3: apply: respect merge.conflictStyle in --3way t4108: demonstrate bug in apply t4108: use `test_config` instead of `git config` t4108: remove git command upstream of pipe t4108: replace create_file with test_write_lines
2019-11-10Merge branch 'sg/dir-trie-fixes'Libravatar Junio C Hamano3-60/+74
Code clean-up and a bugfix in the logic used to tell worktree local and repository global refs apart. * sg/dir-trie-fixes: path.c: don't call the match function without value in trie_find() path.c: clarify two field names in 'struct common_dir' path.c: mark 'logs/HEAD' in 'common_list' as file path.c: clarify trie_find()'s in-code comment Documentation: mention more worktree-specific exceptions
2019-11-10Merge branch 'jc/am-show-current-patch-docfix'Libravatar Junio C Hamano1-1/+1
Doc update. * jc/am-show-current-patch-docfix: doc: am --show-current-patch gives an entire e-mail message
2019-11-10Merge branch 'wb/midx-progress'Libravatar Junio C Hamano6-27/+149
The code to generate multi-pack index learned to show (or not to show) progress indicators. * wb/midx-progress: multi-pack-index: add [--[no-]progress] option. midx: honor the MIDX_PROGRESS flag in midx_repack midx: honor the MIDX_PROGRESS flag in verify_midx_file midx: add progress to expire_midx_packs midx: add progress to write_midx_file midx: add MIDX_PROGRESS flag
2019-11-10Merge branch 'en/merge-recursive-directory-rename-fixes'Libravatar Junio C Hamano4-336/+582
When all files from some subdirectory were renamed to the root directory, the directory rename heuristics would fail to detect that as a rename/merge of the subdirectory to the root directory, which has been corrected. * en/merge-recursive-directory-rename-fixes: t604[236]: do not run setup in separate tests merge-recursive: fix merging a subdirectory into the root directory merge-recursive: clean up get_renamed_dir_portion()
2019-11-10Merge branch 'js/rebase-deprecate-preserve-merges'Libravatar Junio C Hamano1-3/+4
"git rebase --preserve-merges" has been marked as deprecated; this release stops advertising it in the "git rebase -h" output. * js/rebase-deprecate-preserve-merges: rebase: hide --preserve-merges option
2019-11-10Merge branch 'hv/bitshift-constants-in-blame'Libravatar Junio C Hamano1-12/+12
Move the definition of a set of bitmask constants from 0ctal literal to (1U<<count) notation. * hv/bitshift-constants-in-blame: builtin/blame.c: constants into bit shift format
2019-11-10Merge branch 'dd/notes-copy-default-dst-to-head'Libravatar Junio C Hamano3-8/+46
"git notes copy $original" ought to copy the notes attached to the original object to HEAD, but a mistaken tightening to command line parameter validation made earlier disabled that feature by mistake. * dd/notes-copy-default-dst-to-head: notes: fix minimum number of parameters to "copy" subcommand t3301: test diagnose messages for too few/many paramters
2019-11-10Merge branch 'pw/post-commit-from-sequencer'Libravatar Junio C Hamano6-265/+432
"rebase -i" ceased to run post-commit hook by mistake in an earlier update, which has been corrected. * pw/post-commit-from-sequencer: sequencer: run post-commit hook move run_commit_hook() to libgit and use it there sequencer.h fix placement of #endif t3404: remove uneeded calls to set_fake_editor t3404: set $EDITOR in subshell t3404: remove unnecessary subshell
2019-11-10Merge branch 'dl/format-patch-cover-from-desc'Libravatar Junio C Hamano5-34/+296
The branch description ("git branch --edit-description") has been used to fill the body of the cover letters by the format-patch command; this has been enhanced so that the subject can also be filled. * dl/format-patch-cover-from-desc: format-patch: teach --cover-from-description option format-patch: use enum variables format-patch: replace erroneous and condition
2019-11-10Merge branch 'es/walken-tutorial'Libravatar Junio C Hamano2-0/+907
A tutorial on object enumeration. * es/walken-tutorial: documentation: add tutorial for object walking
2019-11-10Merge branch 'jt/fetch-pack-record-refs-in-the-dot-promisor'Libravatar Junio C Hamano3-4/+58
Debugging support for lazy cloning has been a bit improved. * jt/fetch-pack-record-refs-in-the-dot-promisor: fetch-pack: write fetched refs to .promisor
2019-11-07t: fix typo in test descriptionsLibravatar Nathan Stocks1-2/+2
Fix two test descriptions which stated "git -ls-files" when the actual command being tested was "git ls-files". Signed-off-by: Nathan Stocks <cleancut@github.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-07t6024: modernize styleLibravatar Elijah Newren1-63/+67
No substantive changes, just a few cosmetic changes: * Indent steps of an individual test * Don't have logic between the "test_expect_success" blocks that the next block will depend upon, move it into the test_expect_success section itself * Fix spacing around redirection operators to match git style Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-07name-hash.c: remove duplicate word in commentLibravatar Elijah Newren1-1/+1
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-07hashmap: fix documentation misuses of -> versus .Libravatar Elijah Newren1-3/+3
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-07git-filter-branch.txt: correct argument name typoLibravatar Elijah Newren1-1/+1
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-07remote-curl: unbreak http.extraHeader with custom allocatorsLibravatar Johannes Schindelin1-10/+8
In 93b980e58f5 (http: use xmalloc with cURL, 2019-08-15), we started to ask cURL to use `xmalloc()`, and if compiled with nedmalloc, that means implicitly a different allocator than the system one. Which means that all of cURL's allocations and releases now _need_ to use that allocator. However, the `http_options()` function used `slist_append()` to add any configured extra HTTP header(s) _before_ asking cURL to use `xmalloc()`, and `http_cleanup()` would release them _afterwards_, i.e. in the presence of custom allocators, cURL would attempt to use the wrong allocator to release the memory. A naïve attempt at fixing this would move the call to `curl_global_init()` _before_ the config is parsed (i.e. before that call to `slist_append()`). However, that does not work, as we _also_ parse the config setting `http.sslbackend` and if found, call `curl_global_sslset()` which *must* be called before `curl_global_init()`, for details see: https://curl.haxx.se/libcurl/c/curl_global_sslset.html So let's instead make the config parsing entirely independent from cURL's data structures. Incidentally, this deletes two more lines than it introduces, which is nice. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-06fsmonitor: fix watchman integrationLibravatar Kevin Willford2-18/+8
When running Git commands quickly -- such as in a shell script or the test suite -- the Git commands frequently complete and start again during the same second. The example fsmonitor hooks to integrate with Watchman truncate the nanosecond times to seconds. In principle, this is fine, as Watchman claims to use inclusive comparisons [1]. The result should only be an over-representation of the changed paths since the last Git command. However, Watchman's own documentation claims "Using a timestamp is prone to race conditions in understanding the complete state of the file tree" [2]. All of their documented examples use a "clockspec" that looks like 'c:123:234'. Git should eventually learn how to store this type of string to provide a stronger integration, but that will be a more invasive change. When using GIT_TEST_FSMONITOR="$(pwd)/t7519/fsmonitor-watchman", scripts such as t7519-wtstatus.sh fail due to these race conditions. In fact, running any test script with GIT_TEST_FSMONITOR pointing at t/t7519/fsmonitor-wathcman will cause failures in the test_commit function. The 'git add "$indir$file"' command fails due to not enough time between the creation of '$file' and the 'git add' command. For now, subtract one second from the timestamp we pass to Watchman. This will make our window large enough to avoid these race conditions. Increasing the window causes tests like t7519-wtstatus.sh to pass. When the integration was introduced in def437671 (fsmonitor: add a sample integration script for Watchman, 2018-09-22), the query included an expression that would ignore files created and deleted in that window. The performance reason for this change was to ignore temporary files created by a build between Git commands. However, this causes failures in script scenarios where Git is creating or deleting files quickly. When using GIT_TEST_FSMONITOR as before, t2203-add-intent.sh fails due to this add-and-delete race condition. By removing the "expression" from the Watchman query, we remove this race condition. It will lead to some performance degradation in the case of users creating and deleting temporary files inside their working directory between Git commands. However, that is a cost we need to pay to be correct. [1] https://github.com/facebook/watchman/blob/master/query/since.cpp#L35-L39 [2] https://facebook.github.io/watchman/docs/clockspec.html Helped-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Kevin Willford <Kevin.Willford@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-06trace2: add dots directly to strbuf in perf_fmt_prepare()Libravatar René Scharfe1-15/+2
The initialization function of the Trace2 performance format target sets aside a stash of dots for indenting output. Get rid of it and use strbuf_addchars() to provide dots on demand instead. This shortens the code, gets rid of a small heap allocation and is a bit more efficient. Signed-off-by: René Scharfe <l.s.r@web.de> Acked-by: Jeff King <peff@peff.net> Acked-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-06fetch: avoid locking issues between fetch.jobs/fetch.writeCommitGraphLibravatar Johannes Schindelin1-1/+2
When both `fetch.jobs` and `fetch.writeCommitGraph` is set, we currently try to write the commit graph in each of the concurrent fetch jobs, which frequently leads to error messages like this one: fatal: Unable to create '.../.git/objects/info/commit-graphs/commit-graph-chain.lock': File exists. Let's avoid this by holding off from writing the commit graph until all fetch jobs are done. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-06fetch: add the command-line option `--write-commit-graph`Libravatar Johannes Schindelin2-1/+10
This option overrides the config setting `fetch.writeCommitGraph`, if both are set. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-04Git 2.24Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>