summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-06-05diff-tree: convert diff_tree_sha1 to struct object_idLibravatar Brandon Williams16-46/+47
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-05notes-merge: convert write_note_to_worktree to struct object_idLibravatar Brandon Williams1-10/+10
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-05notes-merge: convert verify_notes_filepair to struct object_idLibravatar Brandon Williams1-10/+10
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-05notes-merge: convert find_notes_merge_pair_ps to struct object_idLibravatar Brandon Williams1-12/+12
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-05notes-merge: convert merge_from_diffs to struct object_idLibravatar Brandon Williams1-15/+16
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-05notes-merge: convert notes_merge* to struct object_idLibravatar Brandon Williams3-42/+42
Convert notes_merge and notes_merge_commit to use struct object_id. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02tree-diff: convert diff_root_tree_sha1 to struct object_idLibravatar Brandon Williams5-8/+8
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02combine-diff: convert find_paths_* to struct object_idLibravatar Brandon Williams1-6/+6
Convert find_paths_generic and find_paths_multitree to use struct object_id. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02combine-diff: convert diff_tree_combined to struct object_idLibravatar Brandon Williams3-7/+7
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02diff: convert diff_flush_patch_id to struct object_idLibravatar Brandon Williams3-8/+8
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02patch-ids: convert to struct object_idLibravatar Brandon Williams3-13/+13
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02diff: finish conversion for prepare_temp_file to struct object_idLibravatar Brandon Williams1-2/+2
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02diff: convert reuse_worktree_file to struct object_idLibravatar Brandon Williams1-5/+5
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02diff: convert fill_filespec to struct object_idLibravatar Brandon Williams10-21/+21
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02diff: convert diff_change to struct object_idLibravatar Brandon Williams5-20/+19
Convert diff_change to take a struct object_id. In addition convert the function pointer type 'change_fn_t' to also take a struct object_id. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02diff: convert run_diff_files to struct object_idLibravatar Brandon Williams1-6/+6
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02diff: convert diff_addremove to struct object_idLibravatar Brandon Williams5-17/+17
Convert diff_addremove to take a struct object_id. In addtion convert the function pointer type 'add_remove_fn_t' to also take a struct object_id. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02diff: convert diff_index_show_file to struct object_idLibravatar Brandon Williams1-5/+5
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02diff: convert get_stat_data to struct object_idLibravatar Brandon Williams1-13/+13
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02grep: convert to struct object_idLibravatar Brandon Williams4-21/+27
Convert the remaining parts of grep to use struct object_id. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02notes: convert some accessor functions to struct object_idLibravatar brian m. carlson7-41/+41
Convert add_note, get_note, and copy_note to take struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02builtin/notes: convert to struct object_idLibravatar brian m. carlson5-60/+60
Convert most of the static functions to use struct object_id. In addition, convert copy_notes_for_rewrite and its callers. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02notes: convert format_display_notes to struct object_idLibravatar brian m. carlson4-7/+7
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02notes: make get_note return pointer to struct object_idLibravatar brian m. carlson5-28/+28
Make get_note return a pointer to a const struct object_id. Add a defensive check to ensure we don't accidentally dereference a NULL pointer. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02notes: convert for_each_note to struct object_idLibravatar brian m. carlson4-21/+21
Convert for_each_note and each of the callbacks to use struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02notes: convert internal parts to struct object_idLibravatar brian m. carlson1-31/+33
Convert several portions of the internals of the code to struct object_id. Introduce two macros to denote the different constants in the code: KEY_INDEX for the last byte of the object ID, and FANOUT_PATH_SEPARATORS for the number of possible path separators (on Unix, "/"). While these constants are both 19 (one less than the number of bytes in the hash), distinguish them to make the code more understandable, and define them logically based on their intended purpose. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-02notes: convert internal structures to struct object_idLibravatar brian m. carlson1-47/+51
Convert the internal structures using unsigned char [20] to take struct object_id using the following semantic patch and the standard object_id transforms: @@ struct leaf_node E1; @@ - E1.key_sha1 + E1.key_oid.hash @@ struct leaf_node *E1; @@ - E1->key_sha1 + E1->key_oid.hash @@ struct leaf_node E1; @@ - E1.key_sha1 + E1.key_oid.hash @@ struct leaf_node *E1; @@ - E1->key_sha1 + E1->key_oid.hash @@ struct non_note E1; @@ - E1.sha1 + E1.oid.hash @@ struct non_note *E1; @@ - E1->sha1 + E1->oid.hash Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-30Fourth batch for 2.14Libravatar Junio C Hamano1-0/+55
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-30Merge branch 'dt/unpack-save-untracked-cache-extension'Libravatar Junio C Hamano4-0/+30
When "git checkout", "git merge", etc. manipulates the in-core index, various pieces of information in the index extensions are discarded from the original state, as it is usually not the case that they are kept up-to-date and in-sync with the operation on the main index. The untracked cache extension is copied across these operations now, which would speed up "git status" (as long as the cache is properly invalidated). * dt/unpack-save-untracked-cache-extension: unpack-trees: preserve index extensions
2017-05-30Merge branch 'js/larger-timestamps'Libravatar Junio C Hamano1-1/+1
A follow-up hotfix for a topic already in 'master'. * js/larger-timestamps: name-rev: change a "long" variable to timestamp_t
2017-05-30Merge branch 'dk/send-email-avoid-net-smtp-ssl-when-able'Libravatar Junio C Hamano1-19/+35
"git send-email" now uses Net::SMTP::SSL, which is obsolete, only when needed. Recent versions of Net::SMTP can do TLS natively. * dk/send-email-avoid-net-smtp-ssl-when-able: send-email: Net::SMTP::SSL is obsolete, use only when necessary
2017-05-30Merge branch 'jc/skip-test-in-the-middle'Libravatar Junio C Hamano2-50/+56
A recent update to t5545-push-options.sh started skipping all the tests in the script when a web server testing is disabled or unavailable, not just the ones that require a web server. Non HTTP tests have been salvaged to always run in this script. * jc/skip-test-in-the-middle: t5545: enhance test coverage when no http server is installed test: allow skipping the remainder
2017-05-30Merge branch 'ab/conditional-config-with-symlinks'Libravatar Junio C Hamano3-0/+49
The recently introduced "[includeIf "gitdir:$dir"] path=..." mechansim has further been taught to take symlinks into account. The directory "$dir" specified in "gitdir:$dir" may be a symlink to a real location, not something that $(getcwd) may return. In such a case, a realpath of "$dir" is compared with the real path of the current repository to determine if the contents from the named path should be included. * ab/conditional-config-with-symlinks: config: match both symlink & realpath versions in IncludeIf.gitdir:*
2017-05-30Merge branch 'jt/fetch-allow-tip-sha1-implicitly'Libravatar Junio C Hamano2-2/+73
There is no good reason why "git fetch $there $sha1" should fail when the $sha1 names an object at the tip of an advertised ref, even when the other side hasn't enabled allowTipSHA1InWant. * jt/fetch-allow-tip-sha1-implicitly: fetch-pack: always allow fetching of literal SHA1s
2017-05-30Merge branch 'jt/send-email-validate-hook'Libravatar Junio C Hamano4-1/+68
"git send-email" learned to run sendemail-validate hook to inspect and reject a message before sending it out. * jt/send-email-validate-hook: send-email: support validate hook
2017-05-30Merge branch 'jh/memihash-opt'Libravatar Junio C Hamano1-5/+42
perf-test update. * jh/memihash-opt: p0004: don't error out if test repo is too small p0004: don't abort if multi-threaded is too slow p0004: use test_perf p0004: avoid using pipes p0004: simplify calls of test-lazy-init-name-hash
2017-05-30Merge branch 'bp/sub-process-convert-filter'Libravatar Junio C Hamano7-129/+293
Code from "conversion using external process" codepath has been extracted to a separate sub-process.[ch] module. * bp/sub-process-convert-filter: convert: update subprocess_read_status() to not die on EOF sub-process: move sub-process functions into separate files convert: rename reusable sub-process functions convert: update generic functions to only use generic data structures convert: separate generic structures and variables from the filter specific ones convert: split start_multi_file_filter() into two separate functions pkt-line: annotate packet_writel with LAST_ARG_MUST_BE_NULL convert: move packet_write_line() into pkt-line as packet_writel() pkt-line: add packet_read_line_gently() pkt-line: fix packet_read_line() to handle len < 0 errors convert: remove erroneous tests for errno == EPIPE
2017-05-30Merge branch 'bw/forking-and-threading'Libravatar Junio C Hamano9-134/+449
The "run-command" API implementation has been made more robust against dead-locking in a threaded environment. * bw/forking-and-threading: usage.c: drop set_error_handle() run-command: restrict PATH search to executable files run-command: expose is_executable function run-command: block signals between fork and execve run-command: add note about forking and threading run-command: handle dup2 and close errors in child run-command: eliminate calls to error handling functions in child run-command: don't die in child when duping /dev/null run-command: prepare child environment before forking string-list: add string_list_remove function run-command: use the async-signal-safe execv instead of execvp run-command: prepare command before forking t0061: run_command executes scripts without a #! line t5550: use write_script to generate post-update hook
2017-05-30Merge branch 'ab/perf-wildmatch'Libravatar Junio C Hamano3-4/+59
Add perf-test for wildmatch. * ab/perf-wildmatch: perf: add test showing exponential growth in path globbing perf: add function to setup a fresh test repo
2017-05-30Merge branch 'bw/pathspec-sans-the-index'Libravatar Junio C Hamano11-116/+124
Simplify parse_pathspec() codepath and stop it from looking at the default in-core index. * bw/pathspec-sans-the-index: pathspec: convert find_pathspecs_matching_against_index to take an index pathspec: remove PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP ls-files: prevent prune_cache from overeagerly pruning submodules pathspec: remove PATHSPEC_STRIP_SUBMODULE_SLASH_EXPENSIVE flag submodule: add die_in_unpopulated_submodule function pathspec: provide a more descriptive die message
2017-05-30Merge branch 'jc/name-rev-lw-tag'Libravatar Junio C Hamano2-8/+53
"git describe --contains" penalized light-weight tags so much that they were almost never considered. Instead, give them about the same chance to be considered as an annotated tag that is the same age as the underlying commit would. * jc/name-rev-lw-tag: name-rev: favor describing with tags and use committer date to tiebreak name-rev: refactor logic to see if a new candidate is a better name
2017-05-29Third batch for 2.14Libravatar Junio C Hamano1-0/+93
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-29Merge branch 'jk/ignore-broken-tags-when-ignoring-missing-links'Libravatar Junio C Hamano2-2/+27
Tag objects, which are not reachable from any ref, that point at missing objects were mishandled by "git gc" and friends (they should silently be ignored instead) * jk/ignore-broken-tags-when-ignoring-missing-links: revision.c: ignore broken tags with ignore_missing_links
2017-05-29Merge branch 'jk/alternate-ref-optim'Libravatar Junio C Hamano1-1/+4
A test allowed both "git push" and "git receive-pack" on the other end write their traces into the same file. This is OK on platforms that allows atomically appending to a file opened with O_APPEND, but on other platforms led to a mangled output, causing intermittent test failures. This has been fixed by disabling traces from "receive-pack" in the test. * jk/alternate-ref-optim: t5400: avoid concurrent writes into a trace file
2017-05-29Merge branch 'bm/interpret-trailers-cut-line-is-eom'Libravatar Junio C Hamano5-13/+32
"git interpret-trailers", when used as GIT_EDITOR for "git commit -v", looked for and appended to a trailer block at the very end, i.e. at the end of the "diff" output. The command has been corrected to pay attention to the cut-mark line "commit -v" adds to the buffer---the real trailer block should appear just before it. * bm/interpret-trailers-cut-line-is-eom: interpret-trailers: honor the cut line
2017-05-29Merge branch 'tg/stash-push-fixup'Libravatar Junio C Hamano1-1/+4
The shell completion script (in contrib/) learned "git stash" has a new "push" subcommand. * tg/stash-push-fixup: completion: add git stash push
2017-05-29Merge branch 'pw/rebase-i-regression-fix'Libravatar Junio C Hamano1-1/+4
Regression fix to topic recently merged to 'master'. * pw/rebase-i-regression-fix: rebase -i: add missing newline to end of message rebase -i: silence stash apply rebase -i: fix reflog message
2017-05-29Merge branch 'kn/ref-filter-branch-list'Libravatar Junio C Hamano1-7/+9
"git for-each-ref --format=..." with %(HEAD) in the format used to resolve the HEAD symref as many times as it had processed refs, which was wasteful, and "git branch" shared the same problem. * kn/ref-filter-branch-list: ref-filter: resolve HEAD when parsing %(HEAD) atom
2017-05-29Merge branch 'km/log-showsignature-doc'Libravatar Junio C Hamano1-0/+4
* km/log-showsignature-doc: config.txt: add an entry for log.showSignature
2017-05-29Merge branch 'jk/update-links-in-docs'Libravatar Junio C Hamano3-3/+3
A few http:// links that are redirected to https:// in the documentation have been updated to https:// links. * jk/update-links-in-docs: doc: use https links to Wikipedia to avoid http redirects