summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-05-23Merge branch 'sg/t5516-fixes'Libravatar Junio C Hamano1-5/+5
Test fixes. * sg/t5516-fixes: t5516-fetch-push: fix broken &&-chain t5516-fetch-push: fix 'push with dry-run' test
2018-05-23Merge branch 'sg/t5310-jgit-bitmap-test'Libravatar Junio C Hamano1-4/+4
Test update. * sg/t5310-jgit-bitmap-test: t5310-pack-bitmaps: make JGit tests work with GIT_TEST_SPLIT_INDEX
2018-05-23Merge branch 'nd/pack-format-doc'Libravatar Junio C Hamano2-0/+97
Doc update. * nd/pack-format-doc: pack-format.txt: more details on pack file format
2018-05-23Merge branch 'jk/apply-p-doc'Libravatar Junio C Hamano1-2/+4
Doc update. * jk/apply-p-doc: apply: clarify "-p" documentation
2018-05-23Merge branch 'ao/config-api-doc'Libravatar Junio C Hamano1-8/+10
Doc update. * ao/config-api-doc: doc: fix config API documentation about config_with_options
2018-05-23Merge branch 'bc/mailmap-self'Libravatar Junio C Hamano1-2/+2
* bc/mailmap-self: mailmap: update brian m. carlson's email address
2018-05-23Merge branch 'sb/object-store-replace'Libravatar Junio C Hamano3-1/+7
Hotfix. * sb/object-store-replace: get_main_ref_store: BUG() when outside a repository object.c: clear replace map before freeing it replace-object.c: remove the_repository from prepare_replace_object object.c: free replace map in raw_object_store_clear
2018-05-23Merge branch 'hn/sort-ls-remote'Libravatar Junio C Hamano1-1/+1
Hotfix. * hn/sort-ls-remote: t5512: run git fetch inside test
2018-05-21get_main_ref_store: BUG() when outside a repositoryLibravatar Jeff King1-0/+3
If we don't have a repository, then we can't initialize the ref store. Prior to 64a741619d (refs: store the main ref store inside the repository struct, 2018-04-11), we'd try to access get_git_dir(), and outside a repository that would trigger a BUG(). After that commit, though, we directly use the_repository->git_dir; if it's NULL we'll just segfault. Let's catch this case and restore the BUG() behavior. Obviously we don't ever want to hit this code, but a BUG() is a lot more helpful than a segfault if we do. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-05-18object.c: clear replace map before freeing itLibravatar Stefan Beller1-0/+2
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-05-14t5512: run git fetch inside testLibravatar René Scharfe1-1/+1
Do the preparatory fetch inside the test of ls-remote --symref to avoid cluttering the test output and to be able to catch unexpected fetch failures. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-05-13pack-format.txt: more details on pack file formatLibravatar Nguyễn Thái Ngọc Duy2-0/+97
The current document mentions OBJ_* constants without their actual values. A git developer would know these are from cache.h but that's not very friendly to a person who wants to read this file to implement a pack file parser. Similarly, the deltified representation is not documented at all (the "document" is basically patch-delta.c). Translate that C code to English with a bit more about what ofs-delta and ref-delta mean. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-05-11apply: clarify "-p" documentationLibravatar Jeff King1-2/+4
We're not really removing slashes, but slash-separated path components. Let's make that more clear. Reported-by: kelly elton <its.the.doc@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-05-11t5516-fetch-push: fix broken &&-chainLibravatar SZEDER Gábor1-1/+1
b2dc968e60 (t5516: refactor oddball tests, 2008-11-07) accidentaly broke the &&-chain in the test 'push does not update local refs on failure', but since it was in a subshell, chain-lint couldn't notice it. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-05-11t5516-fetch-push: fix 'push with dry-run' testLibravatar SZEDER Gábor1-4/+4
In a while-at-it cleanup replacing a 'cd dir && <...> && cd ..' with a subshell, commit 28391a80a9 (receive-pack: allow deletion of corrupt refs, 2007-11-29) also moved the assignment of the $old_commit variable to that subshell. This variable, however, is used outside of that subshell as a parameter of check_push_result(), to check that a ref still points to the commit where it is supposed to. With the variable remaining unset outside the subshell check_push_result() doesn't perform that check at all. Use 'git -C <dir> cmd...', so we don't need to change directory, and thus don't need the subshell either when setting $old_commit. Furthermore, change check_push_result() to require at least three parameters (the repo, the oid, and at least one ref), so it will catch similar issues earlier should they ever arise. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-05-11t5310-pack-bitmaps: make JGit tests work with GIT_TEST_SPLIT_INDEXLibravatar SZEDER Gábor1-4/+4
The two JGit tests 'we can read jgit bitmaps' and 'jgit can read our bitmaps' in 't5310-pack-bitmaps.sh' fail when run with GIT_TEST_SPLIT_INDEX=YesPlease. Both tests create a clone of the test repository to check bitmap interoperability with JGit. With split indexes enabled the index in the clone repositories contains the 'link' extension, which JGit doesn't support and, consequently, an exception aborts it: <...> org.eclipse.jgit.api.errors.JGitInternalException: DIRC extension 'link' not supported by this version. at org.eclipse.jgit.dircache.DirCache.readFrom(DirCache.java:562) <...> Since testing bitmaps doesn't need a worktree in the first place, let's just create bare clones for the two JGit tests, so the cloned won't have an index, and these two tests can be executed even with split index enabled. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-05-11doc: fix config API documentation about config_with_optionsLibravatar Antonio Ospite1-8/+10
In commit dc8441fdb ("config: don't implicitly use gitdir or commondir", 2017-06-14) the function git_config_with_options was renamed to config_with_options to better reflect the fact that it does not access the git global config or the repo config by default. However Documentation/technical/api-config.txt still refers to the previous name, fix that. While at it also update the documentation about the extra parameters, because they too changed since the initial definition. Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-05-10replace-object.c: remove the_repository from prepare_replace_objectLibravatar Stefan Beller1-1/+1
This was missed in 5982da9d2ce (replace-object: allow prepare_replace_object to handle arbitrary repositories, 2018-04-11) Technically the code works correctly as the replace_map is the same size in different repositories, however it is hard to read. So convert the code to the familiar pattern of dereferencing the pointer that we assign in the sizeof itself. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-05-10object.c: free replace map in raw_object_store_clearLibravatar Stefan Beller1-0/+1
The replace map for objects was missed to free in the object store in the conversion of 174774cd519 (Merge branch 'sb/object-store-replace', 2018-05-08) Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-05-08The fifth batch for 2.18Libravatar Junio C Hamano1-0/+112
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-05-08Merge branch 'ma/http-walker-no-partial'Libravatar Junio C Hamano6-40/+24
"git http-fetch" (deprecated) had an optional and experimental "feature" to fetch only commits and/or trees, which nobody used. This has been removed. * ma/http-walker-no-partial: walker: drop fields of `struct walker` which are always 1 http-fetch: make `-a` standard behaviour
2018-05-08Merge branch 'js/runtime-prefix'Libravatar Junio C Hamano4-9/+17
* js/runtime-prefix: Avoid multiple PREFIX definitions git_setup_gettext: plug memory leak gettext: avoid initialization if the locale dir is not present
2018-05-08Merge branch 'js/colored-push-errors'Libravatar Junio C Hamano8-15/+211
Error messages from "git push" can be painted for more visibility. * js/colored-push-errors: config: document the settings to colorize push errors/hints push: test to verify that push errors are colored push: colorize errors color: introduce support for colorizing stderr
2018-05-08Merge branch 'jc/parseopt-expiry-errors'Libravatar Junio C Hamano3-2/+20
"git gc --prune=nonsense" spent long time repacking and then silently failed when underlying "git prune --expire=nonsense" failed to parse its command line. This has been corrected. * jc/parseopt-expiry-errors: parseopt: handle malformed --expire arguments more nicely gc: do not upcase error message shown with die()
2018-05-08Merge branch 'ma/fast-export-skip-merge-fix'Libravatar Junio C Hamano2-1/+22
"git fast-export" had a regression in v2.15.0 era where it skipped some merge commits in certain cases, which has been corrected. * ma/fast-export-skip-merge-fix: fast-export: fix regression skipping some merge-commits
2018-05-08Merge branch 'tz/doc-git-urls-reference'Libravatar Junio C Hamano1-1/+1
Doc fix. * tz/doc-git-urls-reference: doc/clone: update caption for GIT URLS cross-reference
2018-05-08Merge branch 'tg/demote-stash-save-in-completion'Libravatar Junio C Hamano1-2/+10
The command line completion (in contrib/) has been taught that "git stash save" has been deprecated ("git stash push" is the preferred spelling in the new world) and does not offer it as a possible completion candidate when "git stash push" can be. * tg/demote-stash-save-in-completion: completion: make stash -p and alias for stash push -p completion: stop showing 'save' for stash by default
2018-05-08Merge branch 'sa/send-email-dedup-some-headers'Libravatar Junio C Hamano1-1/+6
When fed input that already has In-Reply-To: and/or References: headers and told to add the same information, "git send-email" added these headers separately, instead of appending to an existing one, which is a violation of the RFC. This has been corrected. * sa/send-email-dedup-some-headers: send-email: avoid duplicate In-Reply-To/References
2018-05-08Merge branch 'nd/submodule-status-fix'Libravatar Junio C Hamano1-2/+6
"git submodule status" did not check the symbolic revision name it computed for the submodule HEAD is not the NULL, and threw it at printf routines, which has been corrected. * nd/submodule-status-fix: submodule--helper: don't print null in 'submodule status'
2018-05-08Merge branch 'js/ident-date-fix'Libravatar Junio C Hamano1-0/+2
During a "rebase -i" session, the code could give older timestamp to commits created by later "pick" than an earlier "reword", which has been corrected. * js/ident-date-fix: sequencer: reset the committer date before commits
2018-05-08Merge branch 'bt/gpg-interface'Libravatar Junio C Hamano3-34/+71
What is queued here is only the obviously correct and uncontroversial code clean-up part, which is an earlier 7 patches, of a larger series. The remainder that is not queued introduces a few configuration variables to deal with e-signature backends with different signature format. * bt/gpg-interface: gpg-interface: find the last gpg signature line gpg-interface: extract gpg line matching helper gpg-interface: fix const-correctness of "eol" pointer gpg-interface: use size_t for signature buffer size gpg-interface: modernize function declarations gpg-interface: handle bool user.signingkey t7004: fix mistaken tag name
2018-05-08Merge branch 'hn/sort-ls-remote'Libravatar Junio C Hamano3-11/+89
"git ls-remote" learned an option to allow sorting its output based on the refnames being shown. * hn/sort-ls-remote: ls-remote: create '--sort' option
2018-05-08Merge branch 'ab/git-svn-get-record-typofix'Libravatar Junio C Hamano1-1/+1
"git svn" had a minor thinko/typo which has been fixed. * ab/git-svn-get-record-typofix: git-svn: avoid warning on undef readline()
2018-05-08Merge branch 'tb/config-default'Libravatar Junio C Hamano6-0/+127
"git config --get" learned the "--default" option, to help the calling script. Building on top of the tb/config-type topic, the "git config" learns "--type=color" type. Taken together, you can do things like "git config --get foo.color --default blue" and get the ANSI color sequence for the color given to foo.color variable, or "blue" if the variable does not exist. * tb/config-default: builtin/config: introduce `color` type specifier config.c: introduce 'git_config_color' to parse ANSI colors builtin/config: introduce `--default`
2018-05-08Merge branch 'tb/config-type'Libravatar Junio C Hamano3-60/+180
The "git config" command uses separate options e.g. "--int", "--bool", etc. to specify what type the caller wants the value to be interpreted as. A new "--type=<typename>" option has been introduced, which would make it cleaner to define new types. * tb/config-type: builtin/config.c: support `--type=<type>` as preferred alias for `--<type>` builtin/config.c: treat type specifiers singularly
2018-05-08Merge branch 'sg/doc-gc-quote-mismatch-fix'Libravatar Junio C Hamano1-1/+1
Doc formatting fix. * sg/doc-gc-quote-mismatch-fix: docs/git-gc: fix minor rendering issue
2018-05-08Merge branch 'sg/completion-clear-cached'Libravatar Junio C Hamano1-1/+5
The completion script (in contrib/) learned to clear cached list of command line options upon dot-sourcing it again in a more efficient way. * sg/completion-clear-cached: completion: reduce overhead of clearing cached --options
2018-05-08Merge branch 'sb/worktree-remove-opt-force'Libravatar Junio C Hamano2-3/+4
"git worktree remove" learned that "-f" is a shorthand for "--force" option, just like for "git worktree add". * sb/worktree-remove-opt-force: worktree: accept -f as short for --force for removal
2018-05-08Merge branch 'ma/double-dashes-in-docs'Libravatar Junio C Hamano6-12/+12
Doc formatting updates. * ma/double-dashes-in-docs: git-submodule.txt: quote usage in monospace, drop backslash git-[short]log.txt: unify quoted standalone -- doc: convert [\--] to [--] doc: convert \--option to --option
2018-05-08Merge branch 'tq/t1510'Libravatar Junio C Hamano1-1/+0
Test cleanup. * tq/t1510: t1510-repo-setup.sh: remove useless mkdir
2018-05-08Merge branch 'so/glossary-ancestor'Libravatar Junio C Hamano1-1/+1
Docfix. * so/glossary-ancestor: glossary: substitute "ancestor" for "direct ancestor" in 'push' description.
2018-05-08Merge branch 'ls/checkout-encoding'Libravatar Junio C Hamano13-5/+737
The new "checkout-encoding" attribute can ask Git to convert the contents to the specified encoding when checking out to the working tree (and the other way around when checking in). * ls/checkout-encoding: convert: add round trip check based on 'core.checkRoundtripEncoding' convert: add tracing for 'working-tree-encoding' attribute convert: check for detectable errors in UTF encodings convert: add 'working-tree-encoding' attribute utf8: add function to detect a missing UTF-16/32 BOM utf8: add function to detect prohibited UTF-16/32 BOM utf8: teach same_encoding() alternative UTF encoding names strbuf: add a case insensitive starts_with() strbuf: add xstrdup_toupper() strbuf: remove unnecessary NUL assignment in xstrdup_tolower()
2018-05-08Merge branch 'ab/nuke-emacs-contrib'Libravatar Junio C Hamano5-2228/+25
The scripts in contrib/emacs/ have outlived their usefulness and have been replaced with a stub that errors out and tells the user there are replacements. * ab/nuke-emacs-contrib: git{,-blame}.el: remove old bitrotting Emacs code
2018-05-08Merge branch 'nd/warn-more-for-devs'Libravatar Junio C Hamano4-11/+117
The build procedure "make DEVELOPER=YesPlease" learned to enable a bit more warning options depending on the compiler used to help developers more. There also is "make DEVOPTS=tokens" knob available now, for those who want to help fixing warnings we usually ignore, for example. * nd/warn-more-for-devs: Makefile: add a DEVOPTS to get all of -Wextra Makefile: add a DEVOPTS to suppress -Werror under DEVELOPER Makefile: detect compiler and enable more warnings in DEVELOPER=1 connect.c: mark die_initial_contact() NORETURN
2018-05-08Merge branch 'sb/object-store-replace'Libravatar Junio C Hamano17-150/+134
The effort to pass the repository in-core structure throughout the API continues. This round deals with the code that implements the refs/replace/ mechanism. * sb/object-store-replace: replace-object: allow lookup_replace_object to handle arbitrary repositories replace-object: allow do_lookup_replace_object to handle arbitrary repositories replace-object: allow prepare_replace_object to handle arbitrary repositories refs: allow for_each_replace_ref to handle arbitrary repositories refs: store the main ref store inside the repository struct replace-object: add repository argument to lookup_replace_object replace-object: add repository argument to do_lookup_replace_object replace-object: add repository argument to prepare_replace_object refs: add repository argument to for_each_replace_ref refs: add repository argument to get_main_ref_store replace-object: check_replace_refs is safe in multi repo environment replace-object: eliminate replace objects prepared flag object-store: move lookup_replace_object to replace-object.h replace-object: move replace_map to object store replace_object: use oidmap
2018-05-08Merge branch 'ds/commit-graph'Libravatar Junio C Hamano30-21/+1587
Precompute and store information necessary for ancestry traversal in a separate file to optimize graph walking. * ds/commit-graph: commit-graph: implement "--append" option commit-graph: build graph from starting commits commit-graph: read only from specific pack-indexes commit: integrate commit graph with commit parsing commit-graph: close under reachability commit-graph: add core.commitGraph setting commit-graph: implement git commit-graph read commit-graph: implement git-commit-graph write commit-graph: implement write_commit_graph() commit-graph: create git-commit-graph builtin graph: add commit graph design document commit-graph: add format document csum-file: refactor finalize_hashfile() method csum-file: rename hashclose() to finalize_hashfile()
2018-05-08Merge branch 'js/empty-config-section-fix'Libravatar Junio C Hamano3-136/+439
"git config --unset a.b", when "a.b" is the last variable in an otherwise empty section "a", left an empty section "a" behind, and worse yet, a subsequent "git config a.c value" did not reuse that empty shell and instead created a new one. These have been (partially) corrected. * js/empty-config-section-fix: git_config_set: reuse empty sections git config --unset: remove empty sections (in the common case) git_config_set: make use of the config parser's event stream git_config_set: do not use a state machine config_set_store: rename some fields for consistency config: avoid using the global variable `store` config: introduce an optional event stream while parsing t1300: `--unset-all` can leave an empty section behind (bug) t1300: add a few more hairy examples of sections becoming empty t1300: remove unreasonable expectation from TODO t1300: avoid relying on a bug config --replace-all: avoid extra line breaks t1300: demonstrate that --replace-all can "invent" newlines t1300: rename it to reflect that `repo-config` was deprecated git_config_set: fix off-by-two
2018-05-08Merge branch 'ot/libify-get-ref-atom-value'Libravatar Junio C Hamano3-101/+206
Code restructuring, in preparation for further work. * ot/libify-get-ref-atom-value: ref-filter: libify get_ref_atom_value() ref-filter: add return value to parsers ref-filter: change parsing function error handling ref-filter: add return value && strbuf to handlers ref-filter: start adding strbufs with errors ref-filter: add shortcut to work with strbufs
2018-05-08Merge branch 'sb/submodule-move-nested'Libravatar Junio C Hamano15-79/+140
Moving a submodule that itself has submodule in it with "git mv" forgot to make necessary adjustment to the nested sub-submodules; now the codepath learned to recurse into the submodules. * sb/submodule-move-nested: submodule: fixup nested submodules after moving the submodule submodule-config: remove submodule_from_cache submodule-config: add repository argument to submodule_from_{name, path} submodule-config: allow submodule_free to handle arbitrary repositories grep: remove "repo" arg from non-supporting funcs submodule.h: drop declaration of connect_work_tree_and_git_dir
2018-05-08Merge branch 'dj/runtime-prefix'Libravatar Junio C Hamano14-55/+412
A build-time option has been added to allow Git to be told to refer to its associated files relative to the main binary, in the same way that has been possible on Windows for quite some time, for Linux, BSDs and Darwin. * dj/runtime-prefix: Makefile: quote $INSTLIBDIR when passing it to sed Makefile: remove unused @@PERLLIBDIR@@ substitution variable mingw/msvc: use the new-style RUNTIME_PREFIX helper exec_cmd: provide a new-style RUNTIME_PREFIX helper for Windows exec_cmd: RUNTIME_PREFIX on some POSIX systems Makefile: add Perl runtime prefix support Makefile: generate Perl header from template file