summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-10pull: warn if the user didn't say whether to rebase or to mergeAlex Henrie
Often novice Git users forget to say "pull --rebase" and end up with an unnecessary merge from upstream. What they usually want is either "pull --rebase" in the simpler cases, or "pull --ff-only" to update the copy of main integration branches, and rebase their work separately. The pull.rebase configuration variable exists to help them in the simpler cases, but there is no mechanism to make these users aware of it. Issue a warning message when no --[no-]rebase option from the command line and no pull.rebase configuration variable is given. This will inconvenience those who never want to "pull --rebase", who haven't had to do anything special, but the cost of the inconvenience is paid only once per user, which should be a reasonable cost to help a number of new users. Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-25The seventh batch for 2.26Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-25Merge branch 'es/doc-mentoring'Junio C Hamano
Doc for new contributors. * es/doc-mentoring: MyFirstContribution: rephrase contact info MyFirstContribution: add avenues for getting help
2020-02-25Merge branch 'es/bright-colors'Junio C Hamano
The basic 7 colors learned the brighter counterparts (e.g. "brightred"). * es/bright-colors: color.c: alias RGB colors 8-15 to aixterm colors color.c: support bright aixterm colors color.c: refactor color_output arguments
2020-02-25Merge branch 'bw/remote-rename-update-config'Junio C Hamano
"git remote rename X Y" needs to adjust configuration variables (e.g. branch.<name>.remote) whose value used to be X to Y. branch.<name>.pushRemote is now also updated. * bw/remote-rename-update-config: remote rename/remove: gently handle remote.pushDefault config config: provide access to the current line number remote rename/remove: handle branch.<name>.pushRemote config values remote: clean-up config callback remote: clean-up by returning early to avoid one indentation pull --rebase/remote rename: document and honor single-letter abbreviations rebase types
2020-02-17The sixth batch for 2.26Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-17Merge branch 'es/outside-repo-errmsg-hints'Junio C Hamano
Error message clarification. * es/outside-repo-errmsg-hints: prefix_path: show gitdir when arg is outside repo
2020-02-17Merge branch 'jk/doc-credential-helper'Junio C Hamano
Docfix. * jk/doc-credential-helper: doc: move credential helper info into gitcredentials(7)
2020-02-17Merge branch 'js/mingw-open-in-gdb'Junio C Hamano
Dev support. * js/mingw-open-in-gdb: mingw: add a helper function to attach GDB to the current process
2020-02-17Merge branch 'js/test-unc-fetch'Junio C Hamano
Test updates. * js/test-unc-fetch: t5580: test cloning without file://, test fetching via UNC paths
2020-02-17Merge branch 'js/test-avoid-pipe'Junio C Hamano
Test clean-up. * js/test-avoid-pipe: t9001, t9116: avoid pipes
2020-02-17Merge branch 'js/test-write-junit-xml-fix'Junio C Hamano
Testfix. * js/test-write-junit-xml-fix: tests: fix --write-junit-xml with subshells
2020-02-17Merge branch 'jk/mailinfo-cleanup'Junio C Hamano
Code clean-up. * jk/mailinfo-cleanup: mailinfo: factor out some repeated header handling mailinfo: be more liberal with header whitespace mailinfo: simplify parsing of header values mailinfo: treat header values as C strings
2020-02-17Merge branch 'mr/show-config-scope'Junio C Hamano
"git config" learned to show in which "scope", in addition to in which file, each config setting comes from. * mr/show-config-scope: config: add '--show-scope' to print the scope of a config value submodule-config: add subomdule config scope config: teach git_config_source to remember its scope config: preserve scope in do_git_config_sequence config: clarify meaning of command line scoping config: split repo scope to local and worktree config: make scope_name non-static and rename it t1300: create custom config file without special characters t1300: fix over-indented HERE-DOCs config: fix typo in variable name
2020-02-17Merge branch 'rs/strbuf-insertstr'Junio C Hamano
Code clean-up. * rs/strbuf-insertstr: mailinfo: don't insert header prefix for handle_content_type() strbuf: add and use strbuf_insertstr()
2020-02-17Merge branch 'rs/parse-options-concat-dup'Junio C Hamano
Code clean-up. * rs/parse-options-concat-dup: parse-options: simplify parse_options_dup() parse-options: const parse_options_concat() parameters parse-options: factor out parse_options_count() parse-options: use COPY_ARRAY in parse_options_concat()
2020-02-17Merge branch 'bc/hash-independent-tests-part-8'Junio C Hamano
Preparation for SHA-256 migration continues. * bc/hash-independent-tests-part-8: (21 commits) t6024: update for SHA-256 t6006: make hash size independent t6000: abstract away SHA-1-specific constants t5703: make test work with SHA-256 t5607: make hash size independent t5318: update for SHA-256 t5515: make test hash independent t5321: make test hash independent t5313: make test hash independent t5309: make test hash independent t5302: make hash size independent t4060: make test work with SHA-256 t4211: add test cases for SHA-256 t4211: move SHA-1-specific test cases into a directory t4013: make test hash independent t3311: make test work with SHA-256 t3310: make test work with SHA-256 t3309: make test work with SHA-256 t3308: make test work with SHA-256 t3206: make hash size independent ...
2020-02-17Merge branch 'rs/name-rev-memsave'Junio C Hamano
Memory footprint and performance of "git name-rev" has been improved. * rs/name-rev-memsave: name-rev: sort tip names before applying name-rev: release unused name strings name-rev: generate name strings only if they are better name-rev: pre-size buffer in get_parent_name() name-rev: factor out get_parent_name() name-rev: put struct rev_name into commit slab name-rev: don't _peek() in create_or_update_name() name-rev: don't leak path copy in name_ref() name-rev: respect const qualifier name-rev: remove unused typedef name-rev: rewrite create_or_update_name()
2020-02-17Sync with 2.25.1Junio C Hamano
2020-02-17Git 2.25.1v2.25.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-16prefix_path: show gitdir when arg is outside repoEmily Shaffer
When developing a script, it can be painful to understand why Git thinks something is outside the current repo, if the current repo isn't what the user thinks it is. Since this can be tricky to diagnose, especially in cases like submodules or nested worktrees, let's give the user a hint about which repository is offended about that path. Signed-off-by: Emily Shaffer <emilyshaffer@google.com> Acked-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-14doc: move credential helper info into gitcredentials(7)Jeff King
The details of how credential helpers can be called or implemented were originally covered in Documentation/technical/. Those are topics that end users might care about (and we even referenced them in the credentials manpage), but those docs typically don't ship as part of the end user documentation, making them less useful. This situation got slightly worse recently in f3b9055624 (credential: move doc to credential.h, 2019-11-17), where we moved them into the C header file, making them even harder to find. So let's move put this information into the gitcredentials(7) documentation, which is meant to describe the overall concepts of our credential handling. This was already pointing to the API docs for these concepts, so we can just include it inline instead. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-14Sync with maintJunio C Hamano
2020-02-14The fifth batch for 2.26Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-14Merge branch 'tb/commit-graph-object-dir'Junio C Hamano
The code to compute the commit-graph has been taught to use a more robust way to tell if two object directories refer to the same thing. * tb/commit-graph-object-dir: commit-graph.h: use odb in 'load_commit_graph_one_fd_st' commit-graph.c: remove path normalization, comparison commit-graph.h: store object directory in 'struct commit_graph' commit-graph.h: store an odb in 'struct write_commit_graph_context' t5318: don't pass non-object directory to '--object-dir'
2020-02-14Merge branch 'jk/index-pack-dupfix'Junio C Hamano
The index-pack code now diagnoses a bad input packstream that records the same object twice when it is used as delta base; the code used to declare a software bug when encountering such an input, but it is an input error. * jk/index-pack-dupfix: index-pack: downgrade twice-resolved REF_DELTA to die()
2020-02-14Merge branch 'jk/alloc-cleanups'Junio C Hamano
Misc code clean-ups. * jk/alloc-cleanups: tree-walk.c: break circular dependency with unpack-trees traverse_trees(): use stack array for name entries walker_fetch(): avoid raw array length computation normalize_path_copy(): document "dst" size expectations
2020-02-14Merge branch 'jh/notes-fanout-fix'Junio C Hamano
The code to automatically shrink the fan-out in the notes tree had an off-by-one bug, which has been killed. * jh/notes-fanout-fix: notes.c: fix off-by-one error when decreasing notes fanout t3305: check notes fanout more carefully and robustly
2020-02-14Merge branch 'pk/status-of-uncloned-submodule'Junio C Hamano
The way "git submodule status" reports an initialized but not yet populated submodule has not been reimplemented correctly when a part of the "git submodule" command was rewritten in C, which has been corrected. * pk/status-of-uncloned-submodule: t7400: testcase for submodule status on unregistered inner git repos submodule: fix status of initialized but not cloned submodules t7400: add a testcase for submodule status on empty dirs
2020-02-14Merge branch 'mt/use-passed-repo-more-in-funcs'Junio C Hamano
Some codepaths were given a repository instance as a parameter to work in the repository, but passed the_repository instance to its callees, which has been cleaned up (somewhat). * mt/use-passed-repo-more-in-funcs: sha1-file: allow check_object_signature() to handle any repo sha1-file: pass git_hash_algo to hash_object_file() sha1-file: pass git_hash_algo to write_object_file_prepare() streaming: allow open_istream() to handle any repo pack-check: use given repo's hash_algo at verify_packfile() cache-tree: use given repo's hash_algo at verify_one() diff: make diff_populate_filespec() honor its repo argument
2020-02-14Merge branch 'jk/diff-honor-wserrhighlight-in-plumbing'Junio C Hamano
The diff-* plumbing family of subcommands now pay attention to the diff.wsErrorHighlight configuration, which has been ignored before; this allows "git add -p" to also show the whitespace problems to the end user. * jk/diff-honor-wserrhighlight-in-plumbing: diff: move diff.wsErrorHighlight to "basic" config
2020-02-14Merge branch 'ds/sparse-checkout-harden'Junio C Hamano
Some rough edges in the sparse-checkout feature, especially around the cone mode, have been cleaned up. * ds/sparse-checkout-harden: sparse-checkout: fix cone mode behavior mismatch sparse-checkout: improve docs around 'set' in cone mode sparse-checkout: escape all glob characters on write sparse-checkout: use C-style quotes in 'list' subcommand sparse-checkout: unquote C-style strings over --stdin sparse-checkout: write escaped patterns in cone mode sparse-checkout: properly match escaped characters sparse-checkout: warn on globs in cone patterns sparse-checkout: detect short patterns sparse-checkout: cone mode does not recognize "**" sparse-checkout: fix documentation typo for core.sparseCheckoutCone clone: fix --sparse option with URLs sparse-checkout: create leading directories t1091: improve here-docs t1091: use check_files to reduce boilerplate
2020-02-14Merge branch 'ld/p4-cleanup-processes'Junio C Hamano
p4 updates. * ld/p4-cleanup-processes: git-p4: avoid leak of file handle when cloning git-p4: check for access to remote host earlier git-p4: cleanup better on error exit git-p4: create helper function importRevisions() git-p4: disable some pylint warnings, to get pylint output to something manageable git-p4: add P4CommandException to report errors talking to Perforce git-p4: make closeStreams() idempotent
2020-02-14Merge branch 'jt/connectivity-check-optim-in-partial-clone'Junio C Hamano
Unneeded connectivity check is now disabled in a partial clone when fetching into it. * jt/connectivity-check-optim-in-partial-clone: fetch: forgo full connectivity check if --filter connected: verify promisor-ness of partial clone
2020-02-14Merge branch 'jk/get-oid-error-message-i18n'Junio C Hamano
A low-level API function get_oid(), that accepts various ways to name an object, used to issue end-user facing error messages without l10n, which has been updated to be translatable. * jk/get-oid-error-message-i18n: sha1-name: mark get_oid() error messages for translation t1506: drop space after redirection operator t1400: avoid "test" string comparisons
2020-02-14Merge branch 'ag/edit-todo-drop-check'Junio C Hamano
Allow the rebase.missingCommitsCheck configuration to kick in when "rebase --edit-todo" and "rebase --continue" restarts the procedure. * ag/edit-todo-drop-check: rebase-interactive: warn if commit is dropped with `rebase --edit-todo' sequencer: move check_todo_list_from_file() to rebase-interactive.c
2020-02-14Merge branch 'dl/test-must-fail-fixes-2'Junio C Hamano
Test updates. * dl/test-must-fail-fixes-2: t4124: only mark git command with test_must_fail t3507: use test_path_is_missing() t3507: fix indentation t3504: do check for conflict marker after failed cherry-pick t3419: stop losing return code of git command t3415: increase granularity of test_auto_{fixup,squash}() t3415: stop losing return codes of git commands t3310: extract common notes_merge_files_gone() t3030: use test_path_is_missing() t2018: replace "sha" with "oid" t2018: don't lose return code of git commands t2018: teach do_checkout() to accept `!` arg t2018: be more discerning when checking for expected exit codes t2018: improve style of if-statement t2018: add space between function name and () t2018: remove trailing space from test description
2020-02-14Merge branch 'ag/rebase-avoid-unneeded-checkout'Junio C Hamano
"git rebase -i" (and friends) used to unnecessarily check out the tip of the branch to be rebased, which has been corrected. * ag/rebase-avoid-unneeded-checkout: rebase -i: stop checking out the tip of the branch to rebase
2020-02-14Merge branch 'js/rebase-i-with-colliding-hash'Junio C Hamano
"git rebase -i" identifies existing commits in its todo file with their abbreviated object name, which could become ambigous as it goes to create new commits, and has a mechanism to avoid ambiguity in the main part of its execution. A few other cases however were not covered by the protection against ambiguity, which has been corrected. * js/rebase-i-with-colliding-hash: rebase -i: also avoid SHA-1 collisions with missingCommitsCheck rebase -i: re-fix short SHA-1 collision parse_insn_line(): improve error message when parsing failed
2020-02-14Merge branch 'kw/fsmonitor-watchman-racefix'Junio C Hamano
A new version of fsmonitor-watchman hook has been introduced, to avoid races. * kw/fsmonitor-watchman-racefix: fsmonitor: update documentation for hook version and watchman hooks fsmonitor: add fsmonitor hook scripts for version 2 fsmonitor: handle version 2 of the hooks that will use opaque token fsmonitor: change last update timestamp on the index_state to opaque token
2020-02-14Merge branch 'mt/threaded-grep-in-object-store'Junio C Hamano
Traditionally, we avoided threaded grep while searching in objects (as opposed to files in the working tree) as accesses to the object layer is not thread-safe. This limitation is getting lifted. * mt/threaded-grep-in-object-store: grep: use no. of cores as the default no. of threads grep: move driver pre-load out of critical section grep: re-enable threads in non-worktree case grep: protect packed_git [re-]initialization grep: allow submodule functions to run in parallel submodule-config: add skip_if_read option to repo_read_gitmodules() grep: replace grep_read_mutex by internal obj read lock object-store: allow threaded access to object reading replace-object: make replace operations thread-safe grep: fix racy calls in grep_objects() grep: fix race conditions at grep_submodule() grep: fix race conditions on userdiff calls
2020-02-14Merge branch 'jn/promote-proto2-to-default'Junio C Hamano
The transport protocol version 2 becomes the default one. * jn/promote-proto2-to-default: fetch: default to protocol version 2 protocol test: let protocol.version override GIT_TEST_PROTOCOL_VERSION test: request GIT_TEST_PROTOCOL_VERSION=0 when appropriate config doc: protocol.version is not experimental fetch test: use more robust test for filtered objects
2020-02-14Merge branch 'jk/packfile-reuse-cleanup'Junio C Hamano
The way "git pack-objects" reuses objects stored in existing pack to generate its result has been improved. * jk/packfile-reuse-cleanup: pack-bitmap: don't rely on bitmap_git->reuse_objects pack-objects: add checks for duplicate objects pack-objects: improve partial packfile reuse builtin/pack-objects: introduce obj_is_packed() pack-objects: introduce pack.allowPackReuse csum-file: introduce hashfile_total() pack-bitmap: simplify bitmap_has_oid_in_uninteresting() pack-bitmap: uninteresting oid can be outside bitmapped packfile pack-bitmap: introduce bitmap_walk_contains() ewah/bitmap: introduce bitmap_word_alloc() packfile: expose get_delta_base() builtin/pack-objects: report reused packfile objects
2020-02-14Merge branch 'hw/advice-add-nothing'Junio C Hamano
Two help messages given when "git add" notices the user gave it nothing to add have been updated to use advise() API. * hw/advice-add-nothing: add: change advice config variables used by the add API add: use advise function to display hints
2020-02-14Merge branch 'js/convert-typofix' into maintJunio C Hamano
Typofix. * js/convert-typofix: convert: fix typo
2020-02-14Merge branch 'js/ci-squelch-doc-warning' into maintJunio C Hamano
Squelch unhelpful warning message during documentation build. * js/ci-squelch-doc-warning: ci: ignore rubygems warning in the "Documentation" job
2020-02-14Merge branch 'jb/multi-pack-index-docfix' into maintJunio C Hamano
Doc fix. * jb/multi-pack-index-docfix: pack-format: correct multi-pack-index description
2020-02-14Merge branch 'ma/diff-doc-clarify-regexp-example' into maintJunio C Hamano
Doc clarification. * ma/diff-doc-clarify-regexp-example: diff-options.txt: avoid "regex" overload in example
2020-02-14Merge branch 'ms/doc-bundle-format' into maintJunio C Hamano
Technical details of the bundle format has been documented. I think this is in a good enough shape. * ms/doc-bundle-format: doc: describe Git bundle format
2020-02-14Merge branch 'es/submodule-fetch-message-fix' into maintJunio C Hamano
Error message fix. * es/submodule-fetch-message-fix: submodule: add newline on invalid submodule error