summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-03-14sha1_file: convert sha1_object_info* to object_idLibravatar brian m. carlson33-72/+71
Convert sha1_object_info and sha1_object_info_extended to take pointers to struct object_id and rename them to use "oid" instead of "sha1" in their names. Update the declaration and definition and apply the following semantic patch, plus the standard object_id transforms: @@ expression E1, E2; @@ - sha1_object_info(E1.hash, E2) + oid_object_info(&E1, E2) @@ expression E1, E2; @@ - sha1_object_info(E1->hash, E2) + oid_object_info(E1, E2) @@ expression E1, E2, E3; @@ - sha1_object_info_extended(E1.hash, E2, E3) + oid_object_info_extended(&E1, E2, E3) @@ expression E1, E2, E3; @@ - sha1_object_info_extended(E1->hash, E2, E3) + oid_object_info_extended(E1, E2, E3) Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14Convert remaining callers of sha1_object_info_extended to object_idLibravatar brian m. carlson2-4/+15
Convert the remaining caller of sha1_object_info_extended to use struct object_id. Introduce temporaries, which will be removed later, since there is a dependency loop between sha1_object_info_extended and lookup_replace_object_extended. This allows us to convert the code in a piecemeal fashion instead of all at once. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14packfile: convert unpack_entry to struct object_idLibravatar brian m. carlson1-11/+11
Convert unpack_entry and read_object to use struct object_id. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14sha1_file: convert retry_bad_packed_offset to struct object_idLibravatar brian m. carlson1-4/+4
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14sha1_file: convert assert_sha1_type to object_idLibravatar brian m. carlson4-7/+7
Convert this function to take a pointer to struct object_id and rename it to assert_oid_type. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14builtin/mktree: convert to struct object_idLibravatar brian m. carlson1-12/+12
Convert this file to use struct object_id. Modify one use of get_sha1_hex into parse_oid_hex; this is safe since we get the data from a strbuf. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14streaming: convert open_istream to use struct object_idLibravatar brian m. carlson7-9/+9
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14sha1_file: convert check_sha1_signature to struct object_idLibravatar brian m. carlson7-14/+23
Convert this function to take a pointer to struct object_id and rename it check_object_signature. Introduce temporaries to convert the return values of lookup_replace_object and lookup_replace_object_extended into struct object_id. The temporaries are needed because in order to convert lookup_replace_object, open_istream needs to be converted, and open_istream needs check_sha1_signature to be converted, causing a loop of dependencies. The temporaries will be removed in a future patch. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14sha1_file: convert read_loose_object to use struct object_idLibravatar brian m. carlson3-8/+8
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14builtin/index-pack: convert struct ref_delta_entry to object_idLibravatar brian m. carlson1-17/+17
Convert this struct to use a member of type object_id. Convert various static functions as well. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14archive: convert sha1_file_to_archive to struct object_idLibravatar brian m. carlson4-12/+12
Convert this function to take a pointer to struct object_id and rename it object_file_to_archive. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14archive: convert write_archive_entry_fn_t to object_idLibravatar brian m. carlson4-29/+29
Convert the write_archive_entry_fn_t type to use a pointer to struct object_id. Convert various static functions in the tar and zip archivers also. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14builtin/mktag: convert to struct object_idLibravatar brian m. carlson1-9/+9
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14replace_object: convert struct replace_object to object_idLibravatar brian m. carlson1-7/+7
Convert the two members of this struct to be instances of struct object_id. Adjust the various functions in this file accordingly. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14send-pack: convert remaining functions to struct object_idLibravatar brian m. carlson1-6/+6
Convert the remaining function, feed_object, to use struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14http-walker: convert struct object_request to use struct object_idLibravatar brian m. carlson1-8/+8
Convert struct object_request to use struct object_id by updating the definition and applying the following semantic patch, plus the standard object_id transforms: @@ struct object_request E1; @@ - E1.sha1 + E1.oid.hash @@ struct object_request *E1; @@ - E1->sha1 + E1->oid.hash Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14Convert find_unique_abbrev* to struct object_idLibravatar brian m. carlson28-59/+61
Convert find_unique_abbrev and find_unique_abbrev_r to each take a pointer to struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14wt-status: convert struct wt_status_state to object_idLibravatar brian m. carlson2-9/+9
Convert the various *_sha1 members to use struct object_id instead. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14strbuf: convert strbuf_add_unique_abbrev to use struct object_idLibravatar brian m. carlson10-21/+27
Convert the declaration and definition of strbuf_add_unique_abbrev to make it take a pointer to struct object_id. Predeclare the struct in strbuf.h, as cache.h includes strbuf.h before it declares the struct, and otherwise the struct declaration would have the wrong scope. Apply the following semantic patch, along with the standard object_id transforms, to adjust the callers: @@ expression E1, E2, E3; @@ - strbuf_add_unique_abbrev(E1, E2.hash, E3); + strbuf_add_unique_abbrev(E1, &E2, E3); @@ expression E1, E2, E3; @@ - strbuf_add_unique_abbrev(E1, E2->hash, E3); + strbuf_add_unique_abbrev(E1, E2, E3); Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14ref-filter: convert grab_objectname to struct object_idLibravatar brian m. carlson1-6/+6
This is necessary in order to convert find_unique_abbrev. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14tree: convert read_tree_recursive to struct object_idLibravatar brian m. carlson7-20/+20
Convert the callback functions for read_tree_recursive to take a pointer to struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14resolve-undo: convert struct resolve_undo_info to object_idLibravatar brian m. carlson3-9/+10
Convert the sha1 member of this struct to be an array of struct object_id instead. This change is needed to convert find_unique_abbrev. Convert some instances of hard-coded constants to use the_hash_algo as well. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14cache-tree: convert remnants to struct object_idLibravatar brian m. carlson1-14/+15
Convert the remaining portions of cache-tree.c to use struct object_id. Convert several instances of 20 to use the_hash_algo instead. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14cache-tree: convert write_*_as_tree to object_idLibravatar brian m. carlson6-15/+15
Convert write_index_as_tree and write_cache_as_tree to use struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14builtin/write-tree: convert to struct object_idLibravatar brian m. carlson1-3/+3
This is needed to convert parts of the cache-tree code. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-14bulk-checkin: convert index_bulk_checkin to struct object_idLibravatar brian m. carlson3-11/+11
Convert the index_bulk_checkin function, and the static functions it calls, to use pointers to struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-08Eighth batch for 2.17Libravatar Junio C Hamano1-5/+40
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-08Merge branch 'ag/userdiff-go-funcname'Libravatar Junio C Hamano8-0/+37
"git diff" and friends learned funcname patterns for Go language source files. * ag/userdiff-go-funcname: userdiff: add built-in pattern for golang
2018-03-08Merge branch 'ab/gc-auto-in-commit'Libravatar Junio C Hamano1-0/+2
"git commit" used to run "gc --auto" near the end, which was lost when the command was reimplemented in C by mistake. * ab/gc-auto-in-commit: commit: run git gc --auto just before the post-commit hook
2018-03-08Merge branch 'bp/untracked-cache-noflush'Libravatar Junio C Hamano2-2/+16
Writing out the index file when the only thing that changed in it is the untracked cache information is often wasteful, and this has been optimized out. * bp/untracked-cache-noflush: untracked cache: use git_env_bool() not getenv() for customization dir.c: don't flag the index as dirty for changes to the untracked cache
2018-03-08Merge branch 'rs/perf-repeat-thrice-by-default'Libravatar Junio C Hamano1-5/+3
Perf test regression fix. * rs/perf-repeat-thrice-by-default: perf: use GIT_PERF_REPEAT_COUNT=3 by default even without config file
2018-03-08Merge branch 'mk/doc-pretty-fill'Libravatar Junio C Hamano1-1/+1
Docfix. * mk/doc-pretty-fill: docs/pretty-formats: fix typo '% <(<N>)' -> '%<|(<N>)'
2018-03-08Merge branch 'jc/test-must-be-empty'Libravatar Junio C Hamano1-1/+5
Test framework tweak to catch developer thinko. * jc/test-must-be-empty: test_must_be_empty: make sure the file exists, not just empty
2018-03-08Merge branch 'ds/mark-parents-uninteresting-optim'Libravatar Junio C Hamano1-1/+2
Micro optimization in revision traversal code. * ds/mark-parents-uninteresting-optim: revision.c: reduce object database queries
2018-03-08Merge branch 'ds/find-unique-abbrev-optim'Libravatar Junio C Hamano1-7/+7
While finding unique object name abbreviation, the code may accidentally have read beyond the end of the array of object names in a pack. * ds/find-unique-abbrev-optim: sha1_name: fix uninitialized memory errors
2018-03-08Merge branch 'sg/subtree-signed-commits'Libravatar Junio C Hamano1-6/+6
"git subtree" script (in contrib/) scripted around "git log", whose output got affected by end-user configuration like log.showsignature * sg/subtree-signed-commits: subtree: fix add and pull for GPG-signed commits
2018-03-08Merge branch 'rv/grep-cleanup'Libravatar Junio C Hamano1-13/+20
Threaded "git grep" has been optimized to avoid allocation in code section that is covered under a mutex. * rv/grep-cleanup: grep: simplify grep_oid and grep_file grep: move grep_source_init outside critical section
2018-03-08Merge branch 'ot/ref-filter-cleanup'Libravatar Junio C Hamano1-27/+24
Code cleanup. * ot/ref-filter-cleanup: ref-filter: get rid of goto ref-filter: get rid of duplicate code
2018-03-08Merge branch 'jh/status-no-ahead-behind'Libravatar Junio C Hamano10-35/+196
"git status" can spend a lot of cycles to compute the relation between the current branch and its upstream, which can now be disabled with "--no-ahead-behind" option. * jh/status-no-ahead-behind: status: support --no-ahead-behind in long format status: update short status to respect --no-ahead-behind status: add --[no-]ahead-behind to status and commit for V2 format. stat_tracking_info: return +1 when branches not equal
2018-03-08Merge branch 'sg/travis-build-during-script-phase'Libravatar Junio C Hamano3-15/+3
Build the executable in 'script' phase in Travis CI integration, to follow the established practice, rather than during 'before_script' phase. This allows the CI categorize the failures better ('failed' is project's fault, 'errored' is build environment's). * sg/travis-build-during-script-phase: travis-ci: build Git during the 'script' phase
2018-03-06Seventh batch for 2.17Libravatar Junio C Hamano1-0/+50
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-06Merge branch 'bw/perl-timegm-timelocal-fix'Libravatar Junio C Hamano4-4/+8
Y2k20 fix ;-) for our perl scripts. * bw/perl-timegm-timelocal-fix: perl: call timegm and timelocal with 4-digit year
2018-03-06Merge branch 'jk/strbuf-read-file-close-error'Libravatar Junio C Hamano1-1/+5
Code clean-up. * jk/strbuf-read-file-close-error: strbuf_read_file(): preserve errno across close() call
2018-03-06Merge branch 'bw/c-plus-plus'Libravatar Junio C Hamano63-662/+663
Avoid using identifiers that clash with C++ keywords. Even though it is not a goal to compile Git with C++ compilers, changes like this help use of code analysis tools that targets C++ on our codebase. * bw/c-plus-plus: (37 commits) replace: rename 'new' variables trailer: rename 'template' variables tempfile: rename 'template' variables wrapper: rename 'template' variables environment: rename 'namespace' variables diff: rename 'template' variables environment: rename 'template' variables init-db: rename 'template' variables unpack-trees: rename 'new' variables trailer: rename 'new' variables submodule: rename 'new' variables split-index: rename 'new' variables remote: rename 'new' variables ref-filter: rename 'new' variables read-cache: rename 'new' variables line-log: rename 'new' variables imap-send: rename 'new' variables http: rename 'new' variables entry: rename 'new' variables diffcore-delta: rename 'new' variables ...
2018-03-06Merge branch 'rs/strbuf-read-file-or-whine'Libravatar Junio C Hamano1-46/+28
Code clean-up. * rs/strbuf-read-file-or-whine: sequencer: factor out strbuf_read_file_or_whine()
2018-03-06Merge branch 'ms/non-ascii-ticks'Libravatar Junio C Hamano1-7/+7
Doc markup fix. * ms/non-ascii-ticks: Documentation/gitsubmodules.txt: avoid non-ASCII apostrophes
2018-03-06Merge branch 'jk/test-helper-v-output-fix'Libravatar Junio C Hamano1-10/+10
Test framework update. * jk/test-helper-v-output-fix: t: send verbose test-helper output to fd 4
2018-03-06Merge branch 'jk/cached-commit-buffer'Libravatar Junio C Hamano5-46/+1
Code clean-up. * jk/cached-commit-buffer: revision: drop --show-all option commit: drop uses of get_cached_commit_buffer()
2018-03-06Merge branch 'bw/doc-submodule-recurse-config-with-clone'Libravatar Junio C Hamano1-1/+2
Doc update. * bw/doc-submodule-recurse-config-with-clone: submodule: indicate that 'submodule.recurse' doesn't apply to clone
2018-03-06Merge branch 'jc/allow-ff-merging-kept-tags'Libravatar Junio C Hamano4-7/+79
Since Git 1.7.9, "git merge" defaulted to --no-ff (i.e. even when the side branch being merged is a descendant of the current commit, create a merge commit instead of fast-forwarding) when merging a tag object. This was appropriate default for integrators who pull signed tags from their downstream contributors, but caused an unnecessary merges when used by downstream contributors who habitually "catch up" their topic branches with tagged releases from the upstream. Update "git merge" to default to --no-ff only when merging a tag object that does *not* sit at its usual place in refs/tags/ hierarchy, and allow fast-forwarding otherwise, to mitigate the problem. * jc/allow-ff-merging-kept-tags: merge: allow fast-forward when merging a tracked tag