summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-05-05*.[ch]: remove extern from function declarations using sedDenton Liu
There has been a push to remove extern from function declarations. Finish the job by removing all instances of "extern" for function declarations in headers using sed. This was done by running the following on my system with sed 4.2.2: $ git ls-files \*.{c,h} | grep -v ^compat/ | xargs sed -i'' -e 's/^\(\s*\)extern \([^(]*([^*]\)/\1\2/' Files under `compat/` are intentionally excluded as some are directly copied from external sources and we should avoid churning them as much as possible. Then, leftover instances of extern were found by running $ git grep -w -C3 extern \*.{c,h} and manually checking the output. No other instances were found. Note that the regex used specifically excludes function variables which _should_ be left as extern. Not the most elegant way to do it but it gets the job done. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-05*.[ch]: remove extern from function declarations using spatchDenton Liu
There has been a push to remove extern from function declarations. Remove some instances of "extern" for function declarations which are caught by Coccinelle. Note that Coccinelle has some difficulty with processing functions with `__attribute__` or varargs so some `extern` declarations are left behind to be dealt with in a future patch. This was the Coccinelle patch used: @@ type T; identifier f; @@ - extern T f(...); and it was run with: $ git ls-files \*.{c,h} | grep -v ^compat/ | xargs spatch --sp-file contrib/coccinelle/noextern.cocci --in-place Files under `compat/` are intentionally excluded as some are directly copied from external sources and we should avoid churning them as much as possible. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-16The fifth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-16Merge branch 'sg/t5318-cleanup'Junio C Hamano
Code cleanup. * sg/t5318-cleanup: t5318-commit-graph: remove unused variable
2019-04-16Merge branch 'jt/t5551-protocol-v2-does-not-have-half-auth'Junio C Hamano
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'Junio C Hamano
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'Junio C Hamano
"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'Junio C Hamano
Unicode update. * bb/unicode-12: unicode: update the width tables to Unicode 12
2019-04-16Merge branch 'jk/refs-double-abort'Junio C Hamano
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'Junio C Hamano
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'Junio C Hamano
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'Junio C Hamano
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'Junio C Hamano
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'Junio C Hamano
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'Junio C Hamano
Retire scripted "git rebase" implementation. * ab/drop-scripted-rebase: rebase: remove the rebase.useBuiltin setting
2019-04-16Merge branch 'jk/perf-lib-tee'Junio C Hamano
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'Junio C Hamano
Typofixes. * ab/doc-misc-typofixes: doc: fix typos in man pages
2019-04-16Merge branch 'mh/pack-protocol-doc-fix'Junio C Hamano
Docfix. * mh/pack-protocol-doc-fix: fix pack protocol example client/server communication
2019-04-16Merge branch 'tg/glossary-overlay'Junio C Hamano
Doc update. * tg/glossary-overlay: glossary: add definition for overlay
2019-04-16Merge branch 'nd/checkout-f-while-conflicted-fix'Junio C Hamano
"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'Junio C Hamano
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'Junio C Hamano
"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'Junio C Hamano
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'Junio C Hamano
"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'Junio C Hamano
"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'Junio C Hamano
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'Junio C Hamano
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'Junio C Hamano
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'Junio C Hamano
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'Junio C Hamano
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'Junio C Hamano
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-09The fourth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-09Merge branch 'jt/submodule-fetch-errmsg'Junio C Hamano
Error message update. * jt/submodule-fetch-errmsg: submodule: explain first attempt failure clearly
2019-04-09Merge branch 'jk/sha1dc'Junio C Hamano
Build update for SHA-1 with collision detection. * jk/sha1dc: Makefile: fix unaligned loads in sha1dc with UBSan
2019-04-09Merge branch 'jk/promote-ggg'Junio C Hamano
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-09Merge branch 'ar/t4150-remove-cruft'Junio C Hamano
Test cleanup. * ar/t4150-remove-cruft: t4150: remove unused variable
2019-04-09Merge branch 'js/rebase-deprecate-preserve-merges'Junio C Hamano
"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-09Merge branch 'ms/worktree-add-atomic-mkdir'Junio C Hamano
"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-09Merge branch 'jk/line-log-with-patch'Junio C Hamano
"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-09Merge branch 'ra/t3600-test-path-funcs'Junio C Hamano
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-09Merge branch 'nd/rewritten-ref-is-per-worktree'Junio C Hamano
"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-09Merge branch 'jh/resize-convert-scratch-buffer'Junio C Hamano
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-09Merge branch 'dl/ignore-docs'Junio C Hamano
Doc update. * dl/ignore-docs: docs: move core.excludesFile from git-add to gitignore git-clean.txt: clarify ignore pattern files
2019-04-09Merge branch 'ja/dir-rename-doc-markup-fix'Junio C Hamano
Doc update. * ja/dir-rename-doc-markup-fix: Doc: fix misleading asciidoc formating
2019-04-09Merge branch 'dl/reset-doc-no-wrt-abbrev'Junio C Hamano
Doc update. * dl/reset-doc-no-wrt-abbrev: git-reset.txt: clarify documentation
2019-03-24t5318-commit-graph: remove unused variableSZEDER Gábor
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-onlyJonathan Tan
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 conversionJeff King
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 fetchesJeff King
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 normalizationJeff King
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>