summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-04-16Merge branch 'sg/t5318-cleanup'Libravatar Junio C Hamano1-1/+1
Code cleanup. * sg/t5318-cleanup: t5318-commit-graph: remove unused variable
2019-04-16Merge branch 'jt/t5551-protocol-v2-does-not-have-half-auth'Libravatar Junio C Hamano1-1/+11
Test update. * jt/t5551-protocol-v2-does-not-have-half-auth: t5551: mark half-auth no-op fetch test as v0-only
2019-04-16Merge branch 'jk/http-walker-status-fix'Libravatar Junio C Hamano4-17/+47
dumb-http walker has been updated to share more error recovery strategy with the normal codepath. * jk/http-walker-status-fix: http: use normalize_curl_result() instead of manual conversion http: normalize curl results for dumb loose and alternates fetches http: factor out curl result code normalization
2019-04-16Merge branch 'jh/midx-verify-too-many-packs'Libravatar Junio C Hamano6-9/+118
"git multi-pack-index verify" did not scale well with the number of packfiles, which is being improved. * jh/midx-verify-too-many-packs: midx: during verify group objects by packfile to speed verification midx: add progress indicators in multi-pack-index verify trace2:data: add trace2 data to midx progress: add sparse mode to force 100% complete message
2019-04-16Merge branch 'bb/unicode-12'Libravatar Junio C Hamano1-13/+25
Unicode update. * bb/unicode-12: unicode: update the width tables to Unicode 12
2019-04-16Merge branch 'jk/refs-double-abort'Libravatar Junio C Hamano2-1/+31
A corner case bug in the refs API has been corrected. * jk/refs-double-abort: refs/files-backend: don't look at an aborted transaction refs/files-backend: handle packed transaction prepare failure
2019-04-16Merge branch 'nd/checkout-m-doc-update'Libravatar Junio C Hamano2-0/+11
Doc about the above. * nd/checkout-m-doc-update: checkout.txt: note about losing staged changes with --merge
2019-04-16Merge branch 'tb/trace2-va-list-fix'Libravatar Junio C Hamano5-9/+16
Fix some code that passed a NULL when a va_list was expected. * tb/trace2-va-list-fix: trace2: NULL is not allowed for va_list
2019-04-16Merge branch 'tz/completion'Libravatar Junio C Hamano4-13/+19
The completion helper code now pays attention to repository-local configuration (when available), which allows --list-cmds to honour a repository specific setting of completion.commands, for example. * tz/completion: completion: use __git when calling --list-cmds completion: fix multiple command removals t9902: test multiple removals via completion.commands git: read local config in --list-cmds
2019-04-16Merge branch 'ma/doc-diff-doc-vs-doctor-comparison'Libravatar Junio C Hamano3-20/+90
Dev support update to make it easier to compare two formatted results from our documentation. * ma/doc-diff-doc-vs-doctor-comparison: doc-diff: add `--cut-header-footer` doc-diff: support diffing from/to AsciiDoc(tor) doc-diff: let `render_tree()` take an explicit directory name Doc: auto-detect changed build flags
2019-04-16Merge branch 'tz/t4038-bash-redirect-target-workaround'Libravatar Junio C Hamano1-4/+4
Work-around extra warning from bash in our tests. * tz/t4038-bash-redirect-target-workaround: t4038-diff-combined: quote paths with whitespace
2019-04-16Merge branch 'ab/drop-scripted-rebase'Libravatar Junio C Hamano8-833/+35
Retire scripted "git rebase" implementation. * ab/drop-scripted-rebase: rebase: remove the rebase.useBuiltin setting
2019-04-16Merge branch 'jk/perf-lib-tee'Libravatar Junio C Hamano1-23/+11
Code cleanup in the test framework. * jk/perf-lib-tee: perf-lib.sh: rely on test-lib.sh for --tee handling
2019-04-16Merge branch 'ab/doc-misc-typofixes'Libravatar Junio C Hamano2-3/+3
Typofixes. * ab/doc-misc-typofixes: doc: fix typos in man pages
2019-04-16Merge branch 'mh/pack-protocol-doc-fix'Libravatar Junio C Hamano1-4/+4
Docfix. * mh/pack-protocol-doc-fix: fix pack protocol example client/server communication
2019-04-16Merge branch 'tg/glossary-overlay'Libravatar Junio C Hamano1-0/+9
Doc update. * tg/glossary-overlay: glossary: add definition for overlay
2019-04-16Merge branch 'nd/checkout-f-while-conflicted-fix'Libravatar Junio C Hamano2-1/+25
"git checkout -f <branch>" while the index has an unmerged path incorrectly left some paths in an unmerged state, which has been corrected. * nd/checkout-f-while-conflicted-fix: unpack-trees: fix oneway_merge accidentally carry over stage index
2019-04-16Merge branch 'pw/rerere-autoupdate'Libravatar Junio C Hamano5-1/+22
Doc updates. * pw/rerere-autoupdate: merge: tweak --rerere-autoupdate documentation am/cherry-pick/rebase/revert: document --rerere-autoupdate
2019-04-16Merge branch 'jc/format-patch-error-check'Libravatar Junio C Hamano2-21/+27
"git format-patch" used overwrite an existing patch/cover-letter file. A new "--no-clobber" option stops it. * jc/format-patch-error-check: format-patch: notice failure to open cover letter for writing builtin/log: downcase the beginning of error messages
2019-04-16Merge branch 'js/get-short-oid-drop-cache'Libravatar Junio C Hamano3-2/+37
A corner-case object name ambiguity while the sequencer machinery is working (e.g. "rebase -i -x") has been (half) fixed. * js/get-short-oid-drop-cache: get_oid(): when an object was not found, try harder sequencer: move stale comment into correct location sequencer: improve error message when an OID could not be parsed rebase -i: demonstrate obscure loose object cache bug
2019-04-16Merge branch 'dl/subtree-limit-to-one-rev'Libravatar Junio C Hamano1-12/+12
"git subtree" (in contrib/) update. * dl/subtree-limit-to-one-rev: contrib/subtree: ensure only one rev is provided
2019-04-16Merge branch 'js/init-db-update-for-mingw'Libravatar Junio C Hamano2-0/+18
"git init" forgot to read platform-specific repository configuration, which made Windows port to ignore settings of core.hidedotfiles, for example. * js/init-db-update-for-mingw: mingw: respect core.hidedotfiles = false in git-init again
2019-04-16Merge branch 'js/remote-curl-i18n'Libravatar Junio C Hamano1-25/+25
Error messages given from the http transport have been updated so that they can be localized. * js/remote-curl-i18n: remote-curl: mark all error messages for translation
2019-04-16Merge branch 'js/anonymize-remote-curl-diag'Libravatar Junio C Hamano1-6/+13
remote-http transport did not anonymize URLs reported in its error messages at places. * js/anonymize-remote-curl-diag: curl: anonymize URLs in error messages and warnings
2019-04-16Merge branch 'ma/asciidoctor-fixes-more'Libravatar Junio C Hamano15-22/+21
Documentation mark-up fixes. * ma/asciidoctor-fixes-more: Documentation: turn middle-of-line tabs into spaces git-svn.txt: drop escaping '\' that ends up being rendered git.txt: remove empty line before list continuation config/fsck.txt: avoid starting line with dash config/diff.txt: drop spurious backtick
2019-04-16Merge branch 'ma/asciidoctor-fixes'Libravatar Junio C Hamano2-7/+7
Build fix around use of asciidoctor instead of asciidoc * ma/asciidoctor-fixes: asciidoctor-extensions: fix spurious space after linkgit Documentation/Makefile: add missing dependency on asciidoctor-extensions Documentation/Makefile: add missing xsl dependencies for manpages
2019-04-16Merge branch 'jt/test-protocol-version'Libravatar Junio C Hamano15-39/+128
Help developers by making it easier to run most of the tests under different versions of over-the-wire protocols. * jt/test-protocol-version: t5552: compensate for v2 filtering ref adv. tests: fix protocol version for overspecifications t5700: only run with protocol version 1 t5512: compensate for v0 only sending HEAD symrefs t5503: fix overspecification of trace expectation tests: always test fetch of unreachable with v0 t5601: check ssh command only with protocol v0 tests: define GIT_TEST_PROTOCOL_VERSION
2019-04-16Merge branch 'nd/diff-parseopt-3'Libravatar Junio C Hamano2-115/+229
Third batch to teach the diff machinery to use the parse-options API. * nd/diff-parseopt-3: diff-parseopt: convert --submodule diff-parseopt: convert --ignore-submodules diff-parseopt: convert --textconv diff-parseopt: convert --ext-diff diff-parseopt: convert --quiet diff-parseopt: convert --exit-code diff-parseopt: convert --color-words diff-parseopt: convert --word-diff-regex diff-parseopt: convert --word-diff diff-parseopt: convert --[no-]color diff-parseopt: convert --[no-]follow diff-parseopt: convert -R diff-parseopt: convert -a|--text diff-parseopt: convert --full-index diff-parseopt: convert --binary diff-parseopt: convert --anchored diff-parseopt: convert --diff-algorithm diff-parseopt: convert --histogram diff-parseopt: convert --patience diff-parseopt: convert --[no-]indent-heuristic
2019-04-10The fourth batchLibravatar Junio C Hamano1-0/+39
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-10Merge branch 'jt/submodule-fetch-errmsg'Libravatar Junio C Hamano2-1/+8
Error message update. * jt/submodule-fetch-errmsg: submodule: explain first attempt failure clearly
2019-04-10Merge branch 'jk/sha1dc'Libravatar Junio C Hamano3-2/+4
Build update for SHA-1 with collision detection. * jk/sha1dc: Makefile: fix unaligned loads in sha1dc with UBSan
2019-04-10Merge branch 'jk/promote-ggg'Libravatar Junio C Hamano2-3/+3
Suggest GitGitGadget instead of submitGit as a way to submit patches based on GitHub PR to us. * jk/promote-ggg: point pull requesters to GitGitGadget
2019-04-10Merge branch 'ar/t4150-remove-cruft'Libravatar Junio C Hamano1-3/+1
Test cleanup. * ar/t4150-remove-cruft: t4150: remove unused variable
2019-04-10Merge branch 'js/rebase-deprecate-preserve-merges'Libravatar Junio C Hamano4-19/+24
"git rebase --rebase-merges" replaces its old "--preserve-merges" option; the latter is now marked as deprecated. * js/rebase-deprecate-preserve-merges: rebase: deprecate --preserve-merges
2019-04-10Merge branch 'ms/worktree-add-atomic-mkdir'Libravatar Junio C Hamano1-5/+7
"git worktree add" used to do a "find an available name with stat and then mkdir", which is race-prone. This has been fixed by using mkdir and reacting to EEXIST in a loop. * ms/worktree-add-atomic-mkdir: worktree: fix worktree add race
2019-04-10Merge branch 'jk/line-log-with-patch'Libravatar Junio C Hamano3-2/+25
"git log -L<from>,<to>:<path>" with "-s" did not suppress the patch output as it should. This has been corrected. * jk/line-log-with-patch: line-log: detect unsupported formats line-log: suppress diff output with "-s"
2019-04-10Merge branch 'ra/t3600-test-path-funcs'Libravatar Junio C Hamano2-171/+187
A GSoC micro. * ra/t3600-test-path-funcs: t3600: use helpers to replace test -d/f/e/s <path> t3600: modernize style test functions: add function `test_file_not_empty`
2019-04-10Merge branch 'nd/rewritten-ref-is-per-worktree'Libravatar Junio C Hamano3-22/+66
"git rebase" uses the refs/rewritten/ hierarchy to store its intermediate states, which inherently makes the hierarchy per worktree, but it didn't quite work well. * nd/rewritten-ref-is-per-worktree: Make sure refs/rewritten/ is per-worktree files-backend.c: reduce duplication in add_per_worktree_entries_to_dir() files-backend.c: factor out per-worktree code in loose_fill_ref_dir()
2019-04-10Merge branch 'jh/resize-convert-scratch-buffer'Libravatar Junio C Hamano1-1/+1
When the "clean" filter can reduce the size of a huge file in the working tree down to a small "token" (a la Git LFS), there is no point in allocating a huge scratch area upfront, but the buffer is sized based on the original file size. The convert mechanism now allocates very minimum and reallocates as it receives the output from the clean filter process. * jh/resize-convert-scratch-buffer: convert: avoid malloc of original file size
2019-04-10Merge branch 'dl/ignore-docs'Libravatar Junio C Hamano3-15/+13
Doc update. * dl/ignore-docs: docs: move core.excludesFile from git-add to gitignore git-clean.txt: clarify ignore pattern files
2019-04-10Merge branch 'ja/dir-rename-doc-markup-fix'Libravatar Junio C Hamano1-2/+2
Doc update. * ja/dir-rename-doc-markup-fix: Doc: fix misleading asciidoc formating
2019-04-10Merge branch 'dl/reset-doc-no-wrt-abbrev'Libravatar Junio C Hamano1-2/+2
Doc update. * dl/reset-doc-no-wrt-abbrev: git-reset.txt: clarify documentation
2019-03-24t5318-commit-graph: remove unused variableLibravatar SZEDER Gábor1-1/+1
This is a remnant from early versions of the commit-graph patch series [1], when 'git commit-graph --write' printed the hash of the created commit-graph file, and tests did look at the command's output, because the commit-graph file's name included that hash as well. [1] https://public-inbox.org/git/1517348383-112294-6-git-send-email-dstolee@microsoft.com/ Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-24t5551: mark half-auth no-op fetch test as v0-onlyLibravatar Jonathan Tan1-1/+11
When using protocol v0, upload-pack over HTTP permits a "half-auth" configuration in which, at the web server layer, the info/refs path is not protected by authentication but the git-upload-pack path is, so that a user can perform fetches that do not download any objects without authentication, but still needs authentication to download objects. But protocol v2 does not support this, because both ref and pack are obtained from the git-upload-pack path. Mark the test verifying this behavior as protocol v0-only, with a description of what needs to be done to make v2 support this. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-24http: use normalize_curl_result() instead of manual conversionLibravatar Jeff King1-11/+2
When we switched off CURLOPT_FAILONERROR in 17966c0a63 (http: avoid disconnecting on 404s for loose objects, 2016-07-11), the fetch_object() function started manually handling 404's. Since we now have normalize_curl_result() for use elsewhere, we can use it here as well, shortening the code. Note that we lose the check for http/https in the URL here. None of the other result-normalizing code paths bother with this. Looking at missing_target(), which checks specifically for an FTP-specific CURLcode and "http" code 550, it seems likely that git-over-ftp has been subtly broken since 17966c0a63. This patch does nothing to fix that, but nor should it make anything worse (in fact, it may be slightly better because we'll actually recognize an error as such, rather than assuming CURLE_OK means we actually got some data). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-24http: normalize curl results for dumb loose and alternates fetchesLibravatar Jeff King2-0/+24
If the dumb-http walker encounters a 404 when fetching a loose object, it then looks at any http-alternates for the object. The 404 check is implemented by missing_target(), which checks not only the http code, but also that we got an http error from the CURLcode. That broke when we stopped using CURLOPT_FAILONERROR in 17966c0a63 (http: avoid disconnecting on 404s for loose objects, 2016-07-11), since our CURLcode will now be CURLE_OK. As a result, fetching over dumb-http from a repository with alternates could result in Git printing "Unable to find abcd1234..." and aborting. We could probably fix this just by loosening missing_target(). However, there's other code which looks at the curl result, and it would have to be tweaked as well. Instead, let's just normalize the result the same way the smart-http code does. There's a similar case in processing the alternates (where we failover from "info/http-alternates" to "info/alternates"). We'll give it the same treatment. After this patch, we should be hitting all code paths that need this normalization (notably absent here is the http_pack_request path, but it does not use FAILONERROR, nor missing_target()). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-24http: factor out curl result code normalizationLibravatar Jeff King2-6/+21
We make some requests with CURLOPT_FAILONERROR and some without, and then handle_curl_result() normalizes any failures to a uniform CURLcode. There are some other code paths in the dumb-http walker which don't use handle_curl_result(); let's pull the normalization into its own function so it can be reused. Arguably those code paths would benefit from the rest of handle_curl_result(), notably the auth handling. But retro-fitting it now would be a lot of work, and in practice it doesn't matter too much (whatever authentication we needed to make the initial contact with the server is generally sufficient for the rest of the dumb-http requests). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-22refs/files-backend: don't look at an aborted transactionLibravatar Jeff King1-1/+5
When deleting refs, we hold packed-refs.lock and prepare a packed transaction to drop the refs from the packed-refs file. If it turns out that we don't need to rewrite the packed refs (e.g., because none of the deletions were present in the file), then we abort the transaction. If that abort succeeds, then the transaction struct will have been freed, and we set our local pointer to NULL so we don't look at it again. However, if it fails, then the struct will _still_ have been freed (because ref_transaction_abort() always frees). But we don't clean up the pointer, and will jump to our cleanup code, which will try to abort it again, causing a use-after-free. It's actually impossible for this to trigger in practice, since packed_transaction_abort() will never return anything but success. But let's fix it anyway, since that's more than we should assume about the packed-refs code (after all, we are already bothering to check for an error result which cannot be triggered). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-22refs/files-backend: handle packed transaction prepare failureLibravatar Jeff King2-0/+26
In files_transaction_prepare(), if we have to delete some refs, we use a subordinate packed_transaction to do so. It's rare for that sub-transaction's prepare step to fail, since we hold the packed-refs lock. But if it does, we trigger a BUG() due to these steps: - we've attached the packed transaction to the files transaction as backend_data->packed_transaction - when the prepare step fails, the packed transaction cleans itself up, putting itself into the CLOSED state - the error value from preparing the packed transaction lets us know in files_transaction_prepare() that we should also clean up and return an error. We call files_transaction_cleanup(), which tries to abort backend_data->packed_transaction. Since it's already CLOSED, that triggers an assertion in ref_transaction_abort(). We can fix that by disconnecting the packed transaction from the outer files transaction, and then free-ing (not aborting!) it ourselves. A few other options/alternatives I considered: - we could just make it a noop to abort a CLOSED transaction. But that seems less safe, since clearly this code expects (and enforces) a particular set of state transitions. - we could have files_transaction_cleanup() selectively call abort() vs free() based on the state of the on the packed transaction. That's basically a more restricted version of the above, but also potentially unsafe. - instead of disconnecting backend_data->packed_transaction on error, we could wait to install it until we successfully prepare. That might make the flow a little simpler, but it introduces a hassle. Earlier parts of files_transaction_prepare() that encounter an error will jump to the cleanup label, and expect that cleaning up the outer transaction will clean up the packed transaction, too. We'd have to adjust those sites to clean up the packed transaction. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-22unicode: update the width tables to Unicode 12Libravatar Beat Bolli1-13/+25
Now that Unicode 12 has been announced[0], update the character width tables to the new version. [0] http://blog.unicode.org/2019/03/announcing-unicode-standard-version-120.html Signed-off-by: Beat Bolli <dev+git@drbeat.li> Signed-off-by: Junio C Hamano <gitster@pobox.com>