summaryrefslogtreecommitdiff
path: root/builtin
AgeCommit message (Collapse)AuthorFilesLines
2019-05-13Merge branch 'pw/clean-sequencer-state-upon-final-commit'Libravatar Junio C Hamano1-2/+1
"git chery-pick" (and "revert" that shares the same runtime engine) that deals with multiple commits got confused when the final step gets stopped with a conflict and the user concluded the sequence with "git commit". Attempt to fix it by cleaning up the state files used by these commands in such a situation. * pw/clean-sequencer-state-upon-final-commit: fix cherry-pick/revert status after commit commit/reset: try to clean up sequencer state
2019-05-13Merge branch 'pw/rebase-i-internal'Libravatar Junio C Hamano2-490/+465
The internal implementation of "git rebase -i" has been updated to avoid forking a separate "rebase--interactive" process. * pw/rebase-i-internal: rebase -i: run without forking rebase--interactive rebase: use a common action enum rebase -i: use struct rebase_options in do_interactive_rebase() rebase -i: use struct rebase_options to parse args rebase -i: use struct object_id for squash_onto rebase -i: use struct commit when parsing options rebase -i: remove duplication rebase -i: combine rebase--interactive.c with rebase.c rebase: use OPT_RERERE_AUTOUPDATE() rebase: rename write_basic_state() rebase: don't translate trace strings sequencer: always discard index after checkout
2019-05-13Merge branch 'ew/repack-with-bitmaps-by-default'Libravatar Junio C Hamano2-2/+5
The connectivity bitmaps are created by default in bare repositories now; also the pathname hash-cache is created by default to avoid making crappy deltas when repacking. * ew/repack-with-bitmaps-by-default: pack-objects: default to writing bitmap hash-cache t5310: correctly remove bitmaps for jgit test repack: enable bitmaps by default on bare repos
2019-05-13Merge branch 'js/partial-clone-connectivity-check'Libravatar Junio C Hamano1-2/+4
During an initial "git clone --depth=..." partial clone, it is pointless to spend cycles for a large portion of the connectivity check that enumerates and skips promisor objects (which by definition is all objects fetched from the other side). This has been optimized out. * js/partial-clone-connectivity-check: t/perf: add perf script for partial clones clone: do faster object check for partial clones
2019-05-09Merge branch 'js/misc-doc-fixes'Libravatar Junio C Hamano1-30/+0
"make check-docs", "git help -a", etc. did not account for cases where a particular build may deliberately omit some subcommands, which has been corrected. * js/misc-doc-fixes: Turn `git serve` into a test helper test-tool: handle the `-C <directory>` option just like `git` check-docs: do not bother checking for legacy scripts' documentation docs: exclude documentation for commands that have been excluded check-docs: allow command-list.txt to contain excluded commands help -a: do not list commands that are excluded from the build Makefile: drop the NO_INSTALL variable remote-testgit: move it into the support directory for t5801
2019-05-09Merge branch 'jt/clone-server-option'Libravatar Junio C Hamano1-0/+6
"git clone" learned a new --server-option option when talking over the protocol version 2. * jt/clone-server-option: clone: send server options when using protocol v2 transport: die if server options are unsupported
2019-05-09Merge branch 'tb/unexpected'Libravatar Junio C Hamano1-1/+3
Code tightening against a "wrong" object appearing where an object of a different type is expected, instead of blindly assuming that the connection between objects are correctly made. * tb/unexpected: rev-list: detect broken root trees rev-list: let traversal die when --missing is not in use get_commit_tree(): return NULL for broken tree list-objects.c: handle unexpected non-tree entries list-objects.c: handle unexpected non-blob entries t: introduce tests for unexpected object types t: move 'hex2oct' into test-lib-functions.sh
2019-05-09Merge branch 'nd/sha1-name-c-wo-the-repository'Libravatar Junio C Hamano2-5/+6
Further code clean-up to allow the lowest level of name-to-object mapping layer to work with a passed-in repository other than the default one. * nd/sha1-name-c-wo-the-repository: (34 commits) sha1-name.c: remove the_repo from get_oid_mb() sha1-name.c: remove the_repo from other get_oid_* sha1-name.c: remove the_repo from maybe_die_on_misspelt_object_name submodule-config.c: use repo_get_oid for reading .gitmodules sha1-name.c: add repo_get_oid() sha1-name.c: remove the_repo from get_oid_with_context_1() sha1-name.c: remove the_repo from resolve_relative_path() sha1-name.c: remove the_repo from diagnose_invalid_index_path() sha1-name.c: remove the_repo from handle_one_ref() sha1-name.c: remove the_repo from get_oid_1() sha1-name.c: remove the_repo from get_oid_basic() sha1-name.c: remove the_repo from get_describe_name() sha1-name.c: remove the_repo from get_oid_oneline() sha1-name.c: add repo_interpret_branch_name() sha1-name.c: remove the_repo from interpret_branch_mark() sha1-name.c: remove the_repo from interpret_nth_prior_checkout() sha1-name.c: remove the_repo from get_short_oid() sha1-name.c: add repo_for_each_abbrev() sha1-name.c: store and use repo in struct disambiguate_state sha1-name.c: add repo_find_unique_abbrev_r() ...
2019-05-09Merge branch 'cc/replace-graft-peel-tags'Libravatar Junio C Hamano1-7/+13
When given a tag that points at a commit-ish, "git replace --graft" failed to peel the tag before writing a replace ref, which did not make sense because the old graft mechanism the feature wants to mimick only allowed to replace one commit object with another. This has been fixed. * cc/replace-graft-peel-tags: replace: peel tag when passing a tag first to --graft replace: peel tag when passing a tag as parent to --graft t6050: redirect expected error output to a file t6050: use test_line_count instead of wc -l
2019-05-09Merge branch 'dl/merge-cleanup-scissors-fix'Libravatar Junio C Hamano5-42/+80
The list of conflicted paths shown in the editor while concluding a conflicted merge was shown above the scissors line when the clean-up mode is set to "scissors", even though it was commented out just like the list of updated paths and other information to help the user explain the merge better. * dl/merge-cleanup-scissors-fix: cherry-pick/revert: add scissors line on merge conflict sequencer.c: save and restore cleanup mode merge: add scissors line on merge conflict merge: cleanup messages like commit parse-options.h: extract common --cleanup option commit: extract cleanup_mode functions to sequencer t7502: clean up style t7604: clean up style t3507: clean up style t7600: clean up style
2019-05-09Merge branch 'jk/pack-objects-reports-num-objects-to-trace2'Libravatar Junio C Hamano1-0/+2
The "git pack-objects" command learned to report the number of objects it packed via the trace2 mechanism. * jk/pack-objects-reports-num-objects-to-trace2: pack-objects: write objects packed to trace2
2019-05-09Merge branch 'km/empty-repo-is-still-a-repo'Libravatar Junio C Hamano1-1/+2
Running "git add" on a repository created inside the current repository is an explicit indication that the user wants to add it as a submodule, but when the HEAD of the inner repository is on an unborn branch, it cannot be added as a submodule. Worse, the files in its working tree can be added as if they are a part of the outer repository, which is not what the user wants. These problems are being addressed. * km/empty-repo-is-still-a-repo: add: error appropriately on repository with no commits dir: do not traverse repositories with no commits submodule: refuse to add repository with no commits
2019-05-09Merge branch 'dl/warn-tagging-a-tag'Libravatar Junio C Hamano1-6/+17
"git tag" learned to give an advice suggesting it might be a mistake when creating an annotated or signed tag that points at another tag. * dl/warn-tagging-a-tag: tag: advise on nested tags tag: fix formatting
2019-05-09Merge branch 'en/merge-directory-renames'Libravatar Junio C Hamano2-2/+2
"git merge-recursive" backend recently learned a new heuristics to infer file movement based on how other files in the same directory moved. As this is inherently less robust heuristics than the one based on the content similarity of the file itself (rather than based on what its neighbours are doing), it sometimes gives an outcome unexpected by the end users. This has been toned down to leave the renamed paths in higher/conflicted stages in the index so that the user can examine and confirm the result. * en/merge-directory-renames: merge-recursive: switch directory rename detection default merge-recursive: give callers of handle_content_merge() access to contents merge-recursive: track information associated with directory renames t6043: fix copied test description to match its purpose merge-recursive: switch from (oid,mode) pairs to a diff_filespec merge-recursive: cleanup handle_rename_* function signatures merge-recursive: track branch where rename occurred in rename struct merge-recursive: remove ren[12]_other fields from rename_conflict_info merge-recursive: shrink rename_conflict_info merge-recursive: move some struct declarations together merge-recursive: use 'ci' for rename_conflict_info variable name merge-recursive: rename locals 'o' and 'a' to 'obuf' and 'abuf' merge-recursive: rename diff_filespec 'one' to 'o' merge-recursive: rename merge_options argument from 'o' to 'opt' Use 'unsigned short' for mode, like diff_filespec does
2019-04-25Merge branch 'nd/submodule-foreach-quiet'Libravatar Junio C Hamano1-4/+4
"git submodule foreach <command> --quiet" did not pass the option down correctly, which has been corrected. * nd/submodule-foreach-quiet: submodule foreach: fix "<command> --quiet" not being respected
2019-04-25Merge branch 'sg/blame-in-bare-start-at-head'Libravatar Junio C Hamano1-0/+13
"git blame -- path" in a non-bare repository starts blaming from the working tree, and the same command in a bare repository errors out because there is no working tree by definition. The command has been taught to instead start blaming from the commit at HEAD, which is more useful. * sg/blame-in-bare-start-at-head: blame: default to HEAD in a bare repo when no start commit is given
2019-04-25Merge branch 'tg/ls-files-debug-format-fix'Libravatar Junio C Hamano1-5/+5
Debugging code fix. * tg/ls-files-debug-format-fix: ls-files: use correct format string
2019-04-25Merge branch 'dl/submodule-set-branch'Libravatar Junio C Hamano1-5/+12
"git submodule" learns "set-branch" subcommand that allows the submodule.*.branch settings to be modified. * dl/submodule-set-branch: submodule: teach set-branch subcommand submodule--helper: teach config subcommand --unset git-submodule.txt: "--branch <branch>" option defaults to 'master'
2019-04-25Merge branch 'bc/hash-transition-16'Libravatar Junio C Hamano7-27/+39
Conversion from unsigned char[20] to struct object_id continues. * bc/hash-transition-16: (35 commits) gitweb: make hash size independent Git.pm: make hash size independent read-cache: read data in a hash-independent way dir: make untracked cache extension hash size independent builtin/difftool: use parse_oid_hex refspec: make hash size independent archive: convert struct archiver_args to object_id builtin/get-tar-commit-id: make hash size independent get-tar-commit-id: parse comment record hash: add a function to lookup hash algorithm by length remote-curl: make hash size independent http: replace sha1_to_hex http: compute hash of downloaded objects using the_hash_algo http: replace hard-coded constant with the_hash_algo http-walker: replace sha1_to_hex http-push: remove remaining uses of sha1_to_hex http-backend: allow 64-character hex names http-push: convert to use the_hash_algo builtin/pull: make hash-size independent builtin/am: make hash size independent ...
2019-04-25Merge branch 'sg/index-pack-progress'Libravatar Junio C Hamano1-1/+9
A progress indicator has been added to the "index-pack" step, which often makes users wait for completion during "git clone". * sg/index-pack-progress: index-pack: show progress while checking objects
2019-04-25Merge branch 'ab/commit-graph-fixes'Libravatar Junio C Hamano1-4/+19
Code cleanup with more careful error checking before using data read from the commit-graph file. * ab/commit-graph-fixes: commit-graph: improve & i18n error messages commit-graph write: don't die if the existing graph is corrupt commit-graph verify: detect inability to read the graph commit-graph: don't pass filename to load_commit_graph_one_fd_st() commit-graph: don't early exit(1) on e.g. "git status" commit-graph: fix segfault on e.g. "git status" commit-graph tests: test a graph that's too small commit-graph tests: split up corrupt_graph_and_verify()
2019-04-25Merge branch 'ab/gc-reflog'Libravatar Junio C Hamano1-8/+29
Fix various glitches in "git gc" around reflog handling. * ab/gc-reflog: gc: handle & check gc.reflogExpire config reflog tests: assert lack of early exit with expiry="never" reflog tests: test for the "points nowhere" warning reflog tests: make use of "test_config" idiom gc: refactor a "call me once" pattern gc: convert to using the_hash_algo gc: remove redundant check for gc_auto_threshold
2019-04-25Merge branch 'nd/checkout-m'Libravatar Junio C Hamano2-2/+10
"git checkout -m <other>" was about carrying the differences between HEAD and the working-tree files forward while checking out another branch, and ignored the differences between HEAD and the index. The command has been taught to abort when the index and the HEAD are different. * nd/checkout-m: checkout: prevent losing staged changes with --merge read-tree: add --quiet unpack-trees: rename "gently" flag to "quiet" unpack-trees: keep gently check inside add_rejected_path
2019-04-25Merge branch 'js/difftool-no-index'Libravatar Junio C Hamano1-4/+10
"git difftool" can now run outside a repository. * js/difftool-no-index: difftool: allow running outside Git worktrees with --no-index parse-options: make OPT_ARGUMENT() more useful difftool: remove obsolete (and misleading) comment
2019-04-25Merge branch 'nd/commit-a-with-paths-msg-update'Libravatar Junio C Hamano1-1/+2
The message given when "git commit -a <paths>" errors out has been updated. * nd/commit-a-with-paths-msg-update: commit: improve error message in "-a <paths>" case
2019-04-25Merge branch 'nd/diff-parseopt-4'Libravatar Junio C Hamano3-41/+11
Fourth batch to teach the diff machinery to use the parse-options API. * nd/diff-parseopt-4: am: avoid diff_opt_parse() diff --no-index: use parse_options() instead of diff_opt_parse() range-diff: use parse_options() instead of diff_opt_parse() diff.c: allow --no-color-moved-ws diff-parseopt: convert --color-moved-ws diff-parseopt: convert --[no-]color-moved diff-parseopt: convert --inter-hunk-context diff-parseopt: convert --no-prefix diff-parseopt: convert --line-prefix diff-parseopt: convert --[src|dst]-prefix diff-parseopt: convert --[no-]abbrev diff-parseopt: convert --diff-filter diff-parseopt: convert --find-object diff-parseopt: convert -O diff-parseopt: convert --pickaxe-all|--pickaxe-regex diff-parseopt: convert -S|-G diff-parseopt: convert -l diff-parseopt: convert -z diff-parseopt: convert --ita-[in]visible-in-index diff-parseopt: convert --ws-error-highlight
2019-04-25Merge branch 'jk/unused-params-even-more'Libravatar Junio C Hamano12-28/+23
Code cleanup. * jk/unused-params-even-more: parse_opt_ref_sorting: always use with NONEG flag pretty: drop unused strbuf from parse_padding_placeholder() pretty: drop unused "type" parameter in needs_rfc2047_encoding() parse-options: drop unused ctx parameter from show_gitcomp() fetch_pack(): drop unused parameters report_path_error(): drop unused prefix parameter unpack-trees: drop unused error_type parameters unpack-trees: drop name_entry from traverse_by_cache_tree() test-date: drop unused "now" parameter from parse_dates() update-index: drop unused prefix_length parameter from do_reupdate() log: drop unused "len" from show_tagger() log: drop unused rev_info from early output revision: drop some unused "revs" parameters
2019-04-25Merge branch 'ag/sequencer-reduce-rewriting-todo'Libravatar Junio C Hamano1-21/+123
The scripted version of "git rebase -i" wrote and rewrote the todo list many times during a single step of its operation, and the recent C-rewrite made a faithful conversion of the logic to C. The implementation has been updated to carry necessary information around in-core to avoid rewriting the same file over and over unnecessarily. * ag/sequencer-reduce-rewriting-todo: rebase--interactive: move transform_todo_file() sequencer: use edit_todo_list() in complete_action() rebase-interactive: rewrite edit_todo_list() to handle the initial edit rebase-interactive: append_todo_help() changes rebase-interactive: use todo_list_write_to_file() in edit_todo_list() sequencer: refactor skip_unnecessary_picks() to work on a todo_list rebase--interactive: move rearrange_squash_in_todo_file() rebase--interactive: move sequencer_add_exec_commands() sequencer: change complete_action() to use the refactored functions sequencer: make sequencer_make_script() write its script to a strbuf sequencer: refactor rearrange_squash() to work on a todo_list sequencer: refactor sequencer_add_exec_commands() to work on a todo_list sequencer: refactor check_todo_list() to work on a todo_list sequencer: introduce todo_list_write_to_file() sequencer: refactor transform_todos() to work on a todo_list sequencer: remove the 'arg' field from todo_item sequencer: make the todo_list structure public sequencer: changes in parse_insn_buffer()
2019-04-25Merge branch 'bp/post-index-change-hook'Libravatar Junio C Hamano2-0/+3
A new hook "post-index-change" is called when the on-disk index file changes, which can help e.g. a virtualized working tree implementation. * bp/post-index-change-hook: read-cache: add post-index-change hook
2019-04-22Merge branch 'tg/stash-in-c-show-default-to-p-fix'Libravatar Junio C Hamano1-0/+4
A regression fix. * tg/stash-in-c-show-default-to-p-fix: stash: setup default diff output format if necessary
2019-04-22Merge branch 'js/stash-in-c-pathspec-fix'Libravatar Junio C Hamano1-31/+40
Further fixes to "git stash" reimplemented in C. * js/stash-in-c-pathspec-fix: stash: pass pathspec as pointer built-in stash: handle :(glob) pathspecs again legacy stash: fix "rudimentary backport of -q"
2019-04-22Merge branch 'tb/stash-in-c-unused-param-fix'Libravatar Junio C Hamano1-4/+4
Code clean-up. * tb/stash-in-c-unused-param-fix: stash: drop unused parameter
2019-04-22Merge branch 'ps/stash-in-c'Libravatar Junio C Hamano1-0/+1635
"git stash" rewritten in C. * ps/stash-in-c: (28 commits) tests: add a special setup where stash.useBuiltin is off stash: optionally use the scripted version again stash: add back the original, scripted `git stash` stash: convert `stash--helper.c` into `stash.c` stash: replace all `write-tree` child processes with API calls stash: optimize `get_untracked_files()` and `check_changes()` stash: convert save to builtin stash: make push -q quiet stash: convert push to builtin stash: convert create to builtin stash: convert store to builtin stash: convert show to builtin stash: convert list to builtin stash: convert pop to builtin stash: convert branch to builtin stash: convert drop and clear to builtin stash: convert apply to builtin stash: mention options in `show` synopsis stash: add tests for `git stash show` config stash: rename test cases to be more descriptive ...
2019-04-21clone: do faster object check for partial clonesLibravatar Josh Steadmon1-2/+4
For partial clones, doing a full connectivity check is wasteful; we skip promisor objects (which, for a partial clone, is all known objects), and enumerating them all to exclude them from the connectivity check can take a significant amount of time on large repos. At most, we want to make sure that we get the objects referred to by any wanted refs. For partial clones, just check that these objects were transferred. Signed-off-by: Josh Steadmon <steadmon@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19rebase -i: run without forking rebase--interactiveLibravatar Phillip Wood1-135/+86
When the builtin rebase starts an interactive rebase it parses the options and then repackages them and forks `rebase--interactive`. Separate the option parsing in cmd_rebase__interactive() from the business logic to allow interactive rebases can be run without forking `rebase__interactive` by calling run_rebase_interactive() directly. Starting interactive rebases without forking makes it easy to debug the sequencer without worrying about attaching to child processes. Ævar has also reported that some of the rebase perf tests are 30% faster [1]. This patch also makes it easy to remove cmd_rebase__interactive() in the future when git-legacy-rebase.sh and git-rebase--preserve-merges.sh are retired. [1] https://public-inbox.org/git/87y359cfjj.fsf@evledraar.gmail.com/ Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19rebase: use a common action enumLibravatar Phillip Wood1-43/+48
cmd_rebase() and cmd_rebase__interactive() used different enums to hold the current action. Change to using a common enum so the values are the same when we change `rebase -i` to avoid forking `rebase--interactive`. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19rebase -i: use struct rebase_options in do_interactive_rebase()Libravatar Phillip Wood1-33/+36
All the parameters that are passed to do_interactive_rebase() apart from `flags` are already in `struct rebase_options` so there is no need to pass them separately. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19rebase -i: use struct rebase_options to parse argsLibravatar Phillip Wood1-91/+112
In order to run `rebase -i` without forking `rebase--interactive` it will be convenient to use the same structure when parsing the options in cmd_rebase() and cmd_rebase__interactive(). Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19rebase -i: use struct object_id for squash_ontoLibravatar Phillip Wood1-8/+13
More preparation for using `struct rebase_options` in cmd_rebase__interactive(). Using a string was a hangover from the scripted version of rebase, update the functions that use `squash_onto` to take a `sturct object_id`. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19rebase -i: use struct commit when parsing optionsLibravatar Phillip Wood1-18/+24
This is in preparation for using `struct rebase_options` when parsing options in cmd_rebase__interactive(). Using a string for onto, restrict_revision and upstream, was a hangover from the scripted version of rebase. The functions that use these variables are updated to take a `struct commit`. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19rebase -i: remove duplicationLibravatar Phillip Wood1-3/+2
path_state_dir() and merge_dir() refer to the same path so remove one of them. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19rebase -i: combine rebase--interactive.c with rebase.cLibravatar Phillip Wood2-377/+367
In order to run `rebase -i` without forking `rebase--interactive` it will be convenient to have all the code from rebase--interactive.c in rebase.c. This is a straight forward copy of the code from rebase--interactive.c, it will be simplified slightly in the next commit. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19rebase: use OPT_RERERE_AUTOUPDATE()Libravatar Phillip Wood1-17/+13
As we have a macro for this it makes sense to use it. Having cmd_rebase() and cmd_rebase__interactive() use the same values for this option will be helpful when we start running interactive rebases without forking rebase--interactive. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19rebase: rename write_basic_state()Libravatar Phillip Wood1-2/+2
This clashes with a function in sequencer.c Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19rebase: don't translate trace stringsLibravatar Phillip Wood1-8/+7
commit b3a5d5a80c ("trace2:data: add subverb for rebase", 2019-02-22) mistakenly marked the subverb names for translation and unnecessarily NULL terminated the array. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19sequencer: always discard index after checkoutLibravatar Phillip Wood1-1/+1
As the checkout runs in a separate process our index will be out of date so it should be discarded. The existing callers are not doing this consistently so do it here to avoid the callers having to worry about it. This fixes some test failures that happen if do_interactive_rebase() is called without forking rebase--interactive which we will implement shortly. Running git rebase -i master topic starting on master created empty todo lists because all the commits in topic were marked as cherry-picks. After topic was checked out in prepare_branch_to_be_rebased() the working tree contained the contents from topic but the index contained master and the cache entries were still valid. This meant that diff_populate_filespec() which loads the blobs when calculating patch-id's ended up reading the contents for master from the working tree which actually contained topic. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19Merge branch 'ag/sequencer-reduce-rewriting-todo' into pw/rebase-i-internalLibravatar Junio C Hamano1-21/+123
* ag/sequencer-reduce-rewriting-todo: rebase--interactive: move transform_todo_file() sequencer: use edit_todo_list() in complete_action() rebase-interactive: rewrite edit_todo_list() to handle the initial edit rebase-interactive: append_todo_help() changes rebase-interactive: use todo_list_write_to_file() in edit_todo_list() sequencer: refactor skip_unnecessary_picks() to work on a todo_list rebase--interactive: move rearrange_squash_in_todo_file() rebase--interactive: move sequencer_add_exec_commands() sequencer: change complete_action() to use the refactored functions sequencer: make sequencer_make_script() write its script to a strbuf sequencer: refactor rearrange_squash() to work on a todo_list sequencer: refactor sequencer_add_exec_commands() to work on a todo_list sequencer: refactor check_todo_list() to work on a todo_list sequencer: introduce todo_list_write_to_file() sequencer: refactor transform_todos() to work on a todo_list sequencer: remove the 'arg' field from todo_item sequencer: make the todo_list structure public sequencer: changes in parse_insn_buffer()
2019-04-19Turn `git serve` into a test helperLibravatar Johannes Schindelin1-30/+0
The `git serve` built-in was introduced in ed10cb952d31 (serve: introduce git-serve, 2018-03-15) as a backend to serve Git protocol v2, probably originally intended to be spawned by `git upload-pack`. However, in the version that the protocol v2 patches made it into core Git, `git upload-pack` calls the `serve()` function directly instead of spawning `git serve`; The only reason in life for `git serve` to survive as a built-in command is to provide a way to test the protocol v2 functionality. Meaning that it does not even have to be a built-in that is installed with end-user facing Git installations, but it can be a test helper instead. Let's make it so. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19cherry-pick/revert: add scissors line on merge conflictLibravatar Denton Liu2-8/+9
Fix a bug where the scissors line is placed after the Conflicts: section, in the case where a merge conflict occurs and commit.cleanup = scissors. Helped-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-18merge: add scissors line on merge conflictLibravatar Denton Liu2-5/+31
This fixes a bug where the scissors line is placed after the Conflicts: section, in the case where a merge conflict occurs and commit.cleanup = scissors. Next, if commit.cleanup = scissors is specified, don't produce a scissors line in commit if one already exists in the MERGE_MSG file. Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>