summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-19Merge branch 'cc/apply-am'Libravatar Junio C Hamano9-4877/+5199
"git am" has been taught to make an internal call to "git apply"'s innards without spawning the latter as a separate process. * cc/apply-am: (41 commits) builtin/am: use apply API in run_apply() apply: learn to use a different index file apply: pass apply state to build_fake_ancestor() apply: refactor `git apply` option parsing apply: change error_routine when silent usage: add get_error_routine() and get_warn_routine() usage: add set_warn_routine() apply: don't print on stdout in verbosity_silent mode apply: make it possible to silently apply apply: use error_errno() where possible apply: make some parsing functions static again apply: move libified code from builtin/apply.c to apply.{c,h} apply: rename and move opt constants to apply.h builtin/apply: rename option parsing functions builtin/apply: make create_one_file() return -1 on error builtin/apply: make try_create_file() return -1 on error builtin/apply: make write_out_results() return -1 on error builtin/apply: make write_out_one_result() return -1 on error builtin/apply: make create_file() return -1 on error builtin/apply: make add_index_file() return -1 on error ...
2016-09-15Second batch for 2.11Libravatar Junio C Hamano1-0/+25
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-15Merge branch 'js/git-gui-commit-gpgsign'Libravatar Junio C Hamano1-0/+3
"git commit-tree" stopped reading commit.gpgsign configuration variable that was meant for Porcelain "git commit" in Git 2.9; we forgot to update "git gui" to look at the configuration to match this change. * js/git-gui-commit-gpgsign: git-gui: respect commit.gpgsign again
2016-09-15Merge branch 'js/sequencer-wo-die'Libravatar Junio C Hamano2-75/+131
Lifts calls to exit(2) and die() higher in the callchain in sequencer.c files so that more helper functions in it can be used by callers that want to handle error conditions themselves. * js/sequencer-wo-die: sequencer: ensure to release the lock when we could not read the index sequencer: lib'ify checkout_fast_forward() sequencer: lib'ify fast_forward_to() sequencer: lib'ify save_opts() sequencer: lib'ify save_todo() sequencer: lib'ify save_head() sequencer: lib'ify create_seq_dir() sequencer: lib'ify read_populate_opts() sequencer: lib'ify read_populate_todo() sequencer: lib'ify read_and_refresh_cache() sequencer: lib'ify prepare_revs() sequencer: lib'ify walk_revs_populate_todo() sequencer: lib'ify do_pick_commit() sequencer: lib'ify do_recursive_merge() sequencer: lib'ify write_message() sequencer: do not die() in do_pick_commit() sequencer: lib'ify sequencer_pick_revisions()
2016-09-15Merge branch 'sb/diff-cleanup'Libravatar Junio C Hamano1-21/+10
Code cleanup. * sb/diff-cleanup: diff: remove dead code diff: omit found pointer from emit_callback diff.c: use diff_options directly
2016-09-15Merge branch 'jk/fix-remote-curl-url-wo-proto'Libravatar Junio C Hamano2-1/+9
"git fetch http::/site/path" did not die correctly and segfaulted instead. * jk/fix-remote-curl-url-wo-proto: remote-curl: handle URLs without protocol
2016-09-15Merge branch 'ah/misc-message-fixes'Libravatar Junio C Hamano5-7/+7
Message cleanup. * ah/misc-message-fixes: unpack-trees: do not capitalize "working" git-merge-octopus: do not capitalize "octopus" git-rebase--interactive: fix English grammar cat-file: put spaces around pipes in usage string am: put spaces around pipe in usage string
2016-09-15Merge branch 'sy/git-gui-i18n-ja'Libravatar Junio C Hamano1-1309/+1438
Update Japanese translation for "git-gui". * sy/git-gui-i18n-ja: git-gui: update Japanese information git-gui: update Japanese translation git-gui: add Japanese language code git-gui: apply po template to Japanese translation git-gui: consistently use the same word for "blame" in Japanese git-gui: consistently use the same word for "remote" in Japanese
2016-09-15Merge branch 'jk/pack-tag-of-tag'Libravatar Junio C Hamano2-30/+95
"git pack-objects --include-tag" was taught that when we know that we are sending an object C, we want a tag B that directly points at C but also a tag A that points at the tag B. We used to miss the intermediate tag B in some cases. * jk/pack-tag-of-tag: pack-objects: walk tag chains for --include-tag t5305: simplify packname handling t5305: use "git -C" t5305: drop "dry-run" of unpack-objects t5305: move cleanup into test block
2016-09-12Sync with maintLibravatar Junio C Hamano3-446/+402
* maint: l10n: zh_CN: review for git v2.10.0 l10n l10n: zh_CN: fixed some typos for git 2.10.0 l10n: pt_PT: update Portuguese repository info l10n: pt_PT: update Portuguese translation
2016-09-12First batch for 2.11Libravatar Junio C Hamano1-0/+41
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-12Merge branch 'sb/transport-report-missing-submodule-on-stderr'Libravatar Junio C Hamano1-1/+1
Message cleanup. * sb/transport-report-missing-submodule-on-stderr: transport: report missing submodule pushes consistently on stderr
2016-09-12Merge branch 'ep/use-git-trace-curl-in-tests'Libravatar Junio C Hamano4-9/+19
Update a few tests that used to use GIT_CURL_VERBOSE to use the newer GIT_TRACE_CURL. * ep/use-git-trace-curl-in-tests: t5551-http-fetch-smart.sh: use the GIT_TRACE_CURL environment var t5550-http-fetch-dumb.sh: use the GIT_TRACE_CURL environment var test-lib.sh: preserve GIT_TRACE_CURL from the environment t5541-http-push-smart.sh: use the GIT_TRACE_CURL environment var
2016-09-12Merge branch 'sb/xdiff-remove-unused-static-decl'Libravatar Junio C Hamano1-9/+0
Code cleanup. * sb/xdiff-remove-unused-static-decl: xdiff: remove unneeded declarations
2016-09-12Merge branch 'js/t6026-clean-up'Libravatar Junio C Hamano1-0/+2
A test spawned a short-lived background process, which sometimes prevented the test directory from getting removed at the end of the script on some platforms. * js/t6026-clean-up: t6026-merge-attr: clean up background process at end of test case
2016-09-12Merge branch 'js/t9903-chaining'Libravatar Junio C Hamano1-1/+1
* js/t9903-chaining: t9903: fix broken && chain
2016-09-12Merge branch 'rs/hex2chr'Libravatar Junio C Hamano6-78/+21
* rs/hex2chr: introduce hex2chr() for converting two hexadecimal digits to a character
2016-09-12Merge branch 'rs/compat-strdup'Libravatar Junio C Hamano4-19/+33
* rs/compat-strdup: compat: move strdup(3) replacement to its own file
2016-09-12Merge branch 'jc/forbid-symbolic-ref-d-HEAD'Libravatar Junio C Hamano2-7/+16
"git symbolic-ref -d HEAD" happily removes the symbolic ref, but the resulting repository becomes an invalid one. Teach the command to forbid removal of HEAD. * jc/forbid-symbolic-ref-d-HEAD: symbolic-ref -d: do not allow removal of HEAD
2016-09-12Merge branch 'jc/submodule-anchor-git-dir'Libravatar Junio C Hamano2-0/+36
Having a submodule whose ".git" repository is somehow corrupt caused a few commands that recurse into submodules loop forever. * jc/submodule-anchor-git-dir: submodule: avoid auto-discovery in prepare_submodule_repo_env()
2016-09-12Merge branch 'jk/squelch-false-warning-from-gcc-o3'Libravatar Junio C Hamano3-1/+3
* jk/squelch-false-warning-from-gcc-o3: color_parse_mem: initialize "struct color" temporary error_errno: use constant return similar to error()
2016-09-12Merge branch 'jk/test-lib-drop-pid-from-results'Libravatar Junio C Hamano1-2/+2
The test framework left the number of tests and success/failure count in the t/test-results directory, keyed by the name of the test script plus the process ID. The latter however turned out not to serve any useful purpose. The process ID part of the filename has been removed. * jk/test-lib-drop-pid-from-results: test-lib: drop PID from test-results/*.count
2016-09-12Merge branch 'jc/am-read-author-file'Libravatar Junio C Hamano1-58/+45
Extract a small helper out of the function that reads the authors script file "git am" internally uses. * jc/am-read-author-file: am: refactor read_author_script()
2016-09-12Merge branch 'jk/diff-submodule-diff-inline'Libravatar Junio C Hamano20-161/+1663
The "git diff --submodule={short,log}" mechanism has been enhanced to allow "--submodule=diff" to show the patch between the submodule commits bound to the superproject. * jk/diff-submodule-diff-inline: diff: teach diff to display submodule difference with an inline diff submodule: refactor show_submodule_summary with helper function submodule: convert show_submodule_summary to use struct object_id * allow do_submodule_path to work even if submodule isn't checked out diff: prepare for additional submodule formats graph: add support for --line-prefix on all graph-aware output diff.c: remove output_prefix_length field cache: add empty_tree_oid object and helper function
2016-09-12Merge tag 'l10n-2.10.0-rnd2.3' of git://github.com/git-l10n/git-po into maintLibravatar Junio C Hamano3-446/+402
l10n-2.10.0-rnd2.3 * tag 'l10n-2.10.0-rnd2.3' of git://github.com/git-l10n/git-po: l10n: zh_CN: review for git v2.10.0 l10n l10n: zh_CN: fixed some typos for git 2.10.0 l10n: pt_PT: update Portuguese repository info l10n: pt_PT: update Portuguese translation
2016-09-11Merge branch 'js/commit-gpgsign' of ../git-gui into js/git-gui-commit-gpgsignLibravatar Junio C Hamano1-0/+3
* 'js/commit-gpgsign' of ../git-gui: git-gui: respect commit.gpgsign again
2016-09-11git-gui: respect commit.gpgsign againLibravatar Johannes Schindelin1-0/+3
As of v2.9.0, `git commit-tree` no longer heeds the `commit.gpgsign` config setting. This broke committing with GPG signature in Git GUI. This fixes https://github.com/git-for-windows/git/issues/850 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-11l10n: zh_CN: review for git v2.10.0 l10nLibravatar Ray Chen1-50/+50
Signed-off-by: Ray Chen <oldsharp@gmail.com>
2016-09-11l10n: zh_CN: fixed some typos for git 2.10.0Libravatar Jiang Xin1-4/+4
Reviewed-by: Ray <tvvocold@163.com> Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2016-09-09sequencer: ensure to release the lock when we could not read the indexLibravatar Johannes Schindelin1-2/+6
A future caller of read_and_refresh_cache() may want to do more than just print some helpful advice in case of failure. Suggested by Junio Hamano. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09sequencer: lib'ify checkout_fast_forward()Libravatar Johannes Schindelin1-3/+6
Instead of dying there, let the caller high up in the callchain notice the error and handle it (by dying, still). The only callers of checkout_fast_forward(), cmd_merge(), pull_into_void(), cmd_pull() and sequencer's fast_forward_to(), already check the return value and handle it appropriately. With this step, we make it notice an error return from this function. So this is a safe conversion to make checkout_fast_forward() callable from new callers that want it not to die, without changing the external behaviour of anything existing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09sequencer: lib'ify fast_forward_to()Libravatar Johannes Schindelin1-1/+1
Instead of dying there, let the caller high up in the callchain notice the error and handle it (by dying, still). The only caller of fast_forward_to(), do_pick_commit() already checks the return value and passes it on to its callers, so its caller must be already prepared to handle error returns, and with this step, we make it notice an error return from this function. So this is a safe conversion to make fast_forward_to() callable from new callers that want it not to die, without changing the external behaviour of anything existing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09sequencer: lib'ify save_opts()Libravatar Johannes Schindelin1-11/+14
Instead of dying there, let the caller high up in the callchain notice the error and handle it (by dying, still). The only caller of save_opts(), sequencer_pick_revisions() can already return errors, so its caller must be already prepared to handle error returns, and with this step, we make it notice an error return from this function. So this is a safe conversion to make save_opts() callable from new callers that want it not to die, without changing the external behaviour of anything existing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09sequencer: lib'ify save_todo()Libravatar Johannes Schindelin1-7/+15
Instead of dying there, let the caller high up in the callchain notice the error and handle it (by dying, still). The only caller of save_todo(), pick_commits() can already return errors, so its caller must be already prepared to handle error returns, and with this step, we make it notice an error return from this function. So this is a safe conversion to make save_todo() callable from new callers that want it not to die, without changing the external behaviour of anything existing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09sequencer: lib'ify save_head()Libravatar Johannes Schindelin1-7/+18
Instead of dying there, let the caller high up in the callchain notice the error and handle it (by dying, still). The only caller of save_head(), sequencer_pick_revisions() can already return errors, so its caller must be already prepared to handle error returns, and with this step, we make it notice an error return from this function. So this is a safe conversion to make save_head() callable from new callers that want it not to die, without changing the external behaviour of anything existing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09sequencer: lib'ify create_seq_dir()Libravatar Johannes Schindelin1-2/+2
Instead of dying there, let the caller high up in the callchain notice the error and handle it (by dying, still). The only caller of create_seq_dir(), sequencer_pick_revisions() can already return errors, so its caller must be already prepared to handle error returns, and with this step, we make it notice an error return from this function. So this is a safe conversion to make create_seq_dir() callable from new callers that want it not to die, without changing the external behaviour of anything existing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09sequencer: lib'ify read_populate_opts()Libravatar Johannes Schindelin1-6/+14
Instead of dying there, let the caller high up in the callchain notice the error and handle it (by dying, still). The only caller of read_populate_opts(), sequencer_continue() can already return errors, so its caller must be already prepared to handle error returns, and with this step, we make it notice an error return from this function. So this is a safe conversion to make read_populate_opts() callable from new callers that want it not to die, without changing the external behaviour of anything existing. Note that the function git_config_from_file(), called from read_populate_opts(), can currently still die() (in git_parse_source(), because the do_config_from_file() function sets die_on_error = 1). We do not try to fix that here, as it would have larger ramifications on the config code, and we also assume that we write the opts file programmatically, hence any parse errors would be bugs. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09sequencer: lib'ify read_populate_todo()Libravatar Johannes Schindelin1-5/+9
Instead of dying there, let the caller high up in the callchain notice the error and handle it (by dying, still). The only caller of read_populate_todo(), sequencer_continue() can already return errors, so its caller must be already prepared to handle error returns, and with this step, we make it notice an error return from this function. So this is a safe conversion to make read_populate_todo() callable from new callers that want it not to die, without changing the external behaviour of anything existing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09sequencer: lib'ify read_and_refresh_cache()Libravatar Johannes Schindelin1-5/+10
Instead of dying there, let the caller high up in the callchain notice the error and handle it (by dying, still). There are two call sites of read_and_refresh_cache(), one of which is pick_commits(), whose callers were already prepared to do the right thing given an "error" return from it by an earlier patch, so the conversion is safe. The other one, sequencer_pick_revisions() was also prepared to relay an error return back to its caller in all remaining cases in an earlier patch. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09sequencer: lib'ify prepare_revs()Libravatar Johannes Schindelin1-3/+4
Instead of dying there, let the caller high up in the callchain notice the error and handle it (by dying, still). The only caller of prepare_revs(), walk_revs_populate_todo() was just taught to return errors, after verifying that its callers are prepared to handle error returns, and with this step, we make it notice an error return from this function. So this is a safe conversion to make prepare_revs() callable from new callers that want it not to die, without changing the external behaviour of anything existing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09sequencer: lib'ify walk_revs_populate_todo()Libravatar Johannes Schindelin1-4/+6
Instead of dying there, let the caller high up in the callchain notice the error and handle it (by dying, still). The function sequencer_pick_revisions() is the only caller of walk_revs_populate_todo(), and it already returns errors appropriately, so its caller must be already prepared to handle error returns, and with this step, we make it notice an error return from this function. So this is a safe conversion to make walk_revs_populate_todo() callable from new callers that want it not to die, without changing the external behaviour of anything existing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09sequencer: lib'ify do_pick_commit()Libravatar Johannes Schindelin1-1/+1
Instead of dying there, let the caller high up in the callchain notice the error and handle it (by dying, still). The only two callers of do_pick_commit(), pick_commits() and single_pick() already check the return value and pass it on to their callers, so their callers must be already prepared to handle error returns, and with this step, we make it notice an error return from this function. So this is a safe conversion to make do_pick_commit() callable from new callers that want it not to die, without changing the external behaviour of anything existing. While at it, remove the superfluous space. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09sequencer: lib'ify do_recursive_merge()Libravatar Johannes Schindelin1-1/+2
Instead of dying there, let the caller high up in the callchain notice the error and handle it (by dying, still). The only caller of do_recursive_merge(), do_pick_commit() already checks the return value and passes it on to its callers, so its caller must be already prepared to handle error returns, and with this step, we make it notice an error return from this function. So this is a safe conversion to make do_recursive_merge() callable from new callers that want it not to die, without changing the external behaviour of anything existing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09sequencer: lib'ify write_message()Libravatar Johannes Schindelin1-8/+11
Instead of dying there, let the caller high up in the callchain notice the error and handle it (by dying, still). The only caller of write_message(), do_pick_commit() already checks the return value and passes it on to its callers, so its caller must be already prepared to handle error returns, and with this step, we make it notice an error return from this function. So this is a safe conversion to make write_message() callable from new callers that want it not to die, without changing the external behaviour of anything existing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-08Sync with maintLibravatar Junio C Hamano1-0/+83
* maint: Prepare for 2.9.4
2016-09-08Start the 2.11 cycleLibravatar Junio C Hamano3-2/+58
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-08Merge branch 'bh/diff-highlight-graph'Libravatar Junio C Hamano5-6/+338
"diff-highlight" script (in contrib/) learned to work better with "git log -p --graph" output. * bh/diff-highlight-graph: diff-highlight: avoid highlighting combined diffs diff-highlight: add multi-byte tests diff-highlight: ignore test cruft diff-highlight: add support for --graph output diff-highlight: add failing test for handling --graph output diff-highlight: add some tests
2016-09-08Merge branch 'hv/doc-commit-reference-style'Libravatar Junio C Hamano1-3/+8
A small doc update. * hv/doc-commit-reference-style: SubmittingPatches: use gitk's "Copy commit summary" format
2016-09-08Merge branch 'sb/submodule-clone-rr'Libravatar Junio C Hamano8-121/+379
"git clone --resurse-submodules --reference $path $URL" is a way to reduce network transfer cost by borrowing objects in an existing $path repository when cloning the superproject from $URL; it learned to also peek into $path for presense of corresponding repositories of submodules and borrow objects from there when able. * sb/submodule-clone-rr: clone: recursive and reference option triggers submodule alternates clone: implement optional references clone: clarify option_reference as required clone: factor out checking for an alternate path submodule--helper update-clone: allow multiple references submodule--helper module-clone: allow multiple references t7408: merge short tests, factor out testing method t7408: modernize style
2016-09-08Merge branch 'jh/status-v2-porcelain'Libravatar Junio C Hamano7-112/+1306
Enhance "git status --porcelain" output by collecting more data on the state of the index and the working tree files, which may further be used to teach git-prompt (in contrib/) to make fewer calls to git. * jh/status-v2-porcelain: status: unit tests for --porcelain=v2 test-lib-functions.sh: add lf_to_nul helper git-status.txt: describe --porcelain=v2 format status: print branch info with --porcelain=v2 --branch status: print per-file porcelain v2 status data status: collect per-file data for --porcelain=v2 status: support --porcelain[=<version>] status: cleanup API to wt_status_print status: rename long-format print routines