summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-19Merge branch 'bc/object-id'Libravatar Junio C Hamano41-639/+667
The "unsigned char sha1[20]" to "struct object_id" conversion continues. Notable changes in this round includes that ce->sha1, i.e. the object name recorded in the cache_entry, turns into an object_id. It had merge conflicts with a few topics in flight (Christian's "apply.c split", Dscho's "cat-file --filters" and Jeff Hostetler's "status --porcelain-v2"). Extra sets of eyes double-checking for mismerges are highly appreciated. * bc/object-id: builtin/reset: convert to use struct object_id builtin/commit-tree: convert to struct object_id builtin/am: convert to struct object_id refs: add an update_ref_oid function. sha1_name: convert get_sha1_mb to struct object_id builtin/update-index: convert file to struct object_id notes: convert init_notes to use struct object_id builtin/rm: convert to use struct object_id builtin/blame: convert file to use struct object_id Convert read_mmblob to take struct object_id. notes-merge: convert struct notes_merge_pair to struct object_id builtin/checkout: convert some static functions to struct object_id streaming: make stream_blob_to_fd take struct object_id builtin: convert textconv_object to use struct object_id builtin/cat-file: convert some static functions to struct object_id builtin/cat-file: convert struct expand_data to use struct object_id builtin/log: convert some static functions to use struct object_id builtin/blame: convert struct origin to use struct object_id builtin/apply: convert static functions to struct object_id cache: convert struct cache_entry to use struct object_id
2016-09-19Merge branch 'mh/ref-store'Libravatar Junio C Hamano5-317/+812
The ref-store abstraction was introduced to the refs API so that we can plug in different backends to store references. * mh/ref-store: (38 commits) refs: implement iteration over only per-worktree refs refs: make lock generic refs: add method to rename refs refs: add methods to init refs db refs: make delete_refs() virtual refs: add method for initial ref transaction commit refs: add methods for reflog refs: add method iterator_begin files_ref_iterator_begin(): take a ref_store argument split_symref_update(): add a files_ref_store argument lock_ref_sha1_basic(): add a files_ref_store argument lock_ref_for_update(): add a files_ref_store argument commit_ref_update(): add a files_ref_store argument lock_raw_ref(): add a files_ref_store argument repack_without_refs(): add a files_ref_store argument refs: make peel_ref() virtual refs: make create_symref() virtual refs: make pack_refs() virtual refs: make verify_refname_available() virtual refs: make read_raw_ref() virtual ...
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-09refs: implement iteration over only per-worktree refsLibravatar David Turner2-1/+13
Alternate refs backends might still use files to store per-worktree refs. So provide a way to iterate over only the per-worktree references in a ref_store. The other backend can set up a files ref_store and iterate using the new DO_FOR_EACH_PER_WORKTREE_ONLY flag when iterating. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09refs: make lock genericLibravatar David Turner2-13/+14
Instead of including a files-backend-specific struct ref_lock, change the generic ref_update struct to include a void pointer that backends can use for their own arbitrary data. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09refs: add method to rename refsLibravatar David Turner3-18/+17
This removes the last caller of function get_files_ref_store(), so remove it. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09refs: add methods to init refs dbLibravatar David Turner5-10/+42
Alternate refs backends might not need the refs/heads directory and so on, so we make ref db initialization part of the backend. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09refs: make delete_refs() virtualLibravatar David Turner3-2/+14
In the file-based backend, delete_refs has some special optimization to deal with packed refs. In other backends, we might be able to make ref deletion faster by putting all deletions into a single transaction. So we need a special backend function for this. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09refs: add method for initial ref transaction commitLibravatar David Turner3-3/+14
Signed-off-by: Ronnie Sahlberg <rsahlberg@google.com> Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09refs: add methods for reflogLibravatar David Turner3-27/+150
In the file-based backend, the reflog piggybacks on the ref lock. Since other backends won't have the same sort of ref lock, ref backends must also handle reflogs. Signed-off-by: Ronnie Sahlberg <rsahlberg@google.com> Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09refs: add method iterator_beginLibravatar Michael Haggerty3-14/+15
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09files_ref_iterator_begin(): take a ref_store argumentLibravatar Michael Haggerty3-7/+7
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09split_symref_update(): add a files_ref_store argumentLibravatar Michael Haggerty1-2/+4
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09lock_ref_sha1_basic(): add a files_ref_store argumentLibravatar Michael Haggerty1-11/+15
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09lock_ref_for_update(): add a files_ref_store argumentLibravatar Michael Haggerty1-5/+6
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09commit_ref_update(): add a files_ref_store argumentLibravatar Michael Haggerty1-6/+8
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09lock_raw_ref(): add a files_ref_store argumentLibravatar Michael Haggerty1-6/+8
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09repack_without_refs(): add a files_ref_store argumentLibravatar Michael Haggerty1-5/+7
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09refs: make peel_ref() virtualLibravatar Michael Haggerty3-2/+14
For now it only supports the main reference store. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09refs: make create_symref() virtualLibravatar Michael Haggerty3-1/+20
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09refs: make pack_refs() virtualLibravatar Michael Haggerty3-2/+15
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-09refs: make verify_refname_available() virtualLibravatar Michael Haggerty3-6/+25
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>