summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-05-23ref_store: take a `msg` parameter when deleting referencesLibravatar Michael Haggerty9-19/+23
Just because the files backend can't retain reflogs for deleted references is no reason that they shouldn't be supported by the virtual method interface. Also, `delete_ref()` and `refs_delete_ref()` have already gained `msg` parameters. Now let's add them to `delete_refs()` and `refs_delete_refs()`. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-23refs: use `size_t` indexes when iterating over ref transaction updatesLibravatar Michael Haggerty2-3/+5
Eliminate any chance of integer overflow on platforms where the two types have different sizes. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-23refs_ref_iterator_begin(): don't check prefixes redundantlyLibravatar Michael Haggerty1-1/+7
The backend already correctly restricts its output to references whose names start with the prefix. By passing the prefix again to `prefix_ref_iterator`, we were forcing that iterator to do redundant prefix comparisons. So set it to the empty string. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-23prefix_ref_iterator: don't trim too muchLibravatar Michael Haggerty1-1/+17
The `trim` parameter can be set independently of `prefix`. So if some caller were to set `trim` to be greater than `strlen(prefix)`, we could end up pointing the `refname` field of the iterator past the NUL of the actual reference name string. That can't happen currently, because `trim` is always set either to zero or to `strlen(prefix)`. But even the latter could lead to confusion, if a refname is exactly equal to the prefix, because then we would set the outgoing `refname` to the empty string. And we're about to decouple the `prefix` and `trim` arguments even more, so let's be cautious here. Report a bug if ever asked to trim a reference whose name is not longer than `trim`. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-23files-backend: use `die("BUG: ...")`, not `die("internal error: ...")`Libravatar Michael Haggerty1-4/+4
The former is by far more common in our codebase. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-23ref_iterator_begin_fn(): fix docstringLibravatar Michael Haggerty1-3/+4
The iterator returned by this function only includes references whose names start with the whole prefix, not all of those in `find_containing_dir(prefix)` as the old docstring claimed. This docstring was probably copy-pasted from old ref-cache code, which had the old specification. But now, `cache_ref_iterator_begin()` (from which the files reference iterator gets its values) automatically wraps its output using `prefix_ref_iterator_begin()` when necessary, so it has the stricter behavior. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-23refs.h: clarify docstring for the ref_transaction_update()-related fnsLibravatar Michael Haggerty1-0/+13
In particular, make it clear that they make copies of the sha1 arguments. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-23t3600: clean up permissions test properlyLibravatar Michael Haggerty1-2/+2
The test of failing `git rm -f` removes the write permissions on the test directory, but fails to restore them if the test fails. This means that the test temporary directory cannot be cleaned up, which means that subsequent attempts to run the test fail mysteriously. Instead, do the cleanup in a `test_when_finished` block so that it can't be skipped. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-23Merge branch 'bc/object-id'Libravatar Junio C Hamano106-1134/+1173
* bc/object-id: (53 commits) object: convert parse_object* to take struct object_id tree: convert parse_tree_indirect to struct object_id sequencer: convert do_recursive_merge to struct object_id diff-lib: convert do_diff_cache to struct object_id builtin/ls-tree: convert to struct object_id merge: convert checkout_fast_forward to struct object_id sequencer: convert fast_forward_to to struct object_id builtin/ls-files: convert overlay_tree_on_cache to object_id builtin/read-tree: convert to struct object_id sha1_name: convert internals of peel_onion to object_id upload-pack: convert remaining parse_object callers to object_id revision: convert remaining parse_object callers to object_id revision: rename add_pending_sha1 to add_pending_oid http-push: convert process_ls_object and descendants to object_id refs/files-backend: convert many internals to struct object_id refs: convert struct ref_update to use struct object_id ref-filter: convert some static functions to struct object_id Convert struct ref_array_item to struct object_id Convert the verify_pack callback to struct object_id Convert lookup_tag to struct object_id ...
2017-05-23Second batch for 2.14Libravatar Junio C Hamano1-0/+29
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-23Merge branch 'ab/fix-poison-tests'Libravatar Junio C Hamano16-37/+48
Update tests to pass under GETTEXT_POISON (a mechanism to ensure that output strings that should not be translated are not translated by mistake), and tell TravisCI to run them. * ab/fix-poison-tests: travis-ci: add job to run tests with GETTEXT_POISON travis-ci: setup "prove cache" in "script" step tests: fix tests broken under GETTEXT_POISON=YesPlease
2017-05-23Merge branch 'tb/dedup-crlf-tests'Libravatar Junio C Hamano2-187/+0
* tb/dedup-crlf-tests: t0027: tests are not expensive; remove t0025
2017-05-23Merge branch 'jt/push-options-doc'Libravatar Junio C Hamano4-11/+114
The receive-pack program now makes sure that the push certificate records the same set of push options used for pushing. * jt/push-options-doc: receive-pack: verify push options in cert docs: correct receive.advertisePushOptions default
2017-05-23Merge branch 'ab/doc-replace-gmane-links'Libravatar Junio C Hamano5-6/+6
The Web interface to gmane news archive is long gone, even though the articles are still accessible via NTTP. Replace the links with ones to public-inbox.org. Because their message identification is based on the actual message-id, it is likely that it will be easier to migrate away from it if/when necessary. * ab/doc-replace-gmane-links: doc: replace more gmane links doc: replace a couple of broken gmane links
2017-05-23Merge branch 'rs/checkout-am-fix-unborn'Libravatar Junio C Hamano2-2/+3
A few codepaths in "checkout" and "am" working on an unborn branch tried to access an uninitialized piece of memory. * rs/checkout-am-fix-unborn: am: check return value of resolve_refdup before using hash checkout: check return value of resolve_refdup before using hash
2017-05-23Merge branch 'ls/travis-relays-for-windows-ci'Libravatar Junio C Hamano1-3/+23
* ls/travis-relays-for-windows-ci: travis-ci: retry if Git for Windows CI returns HTTP error 502 or 503 travis-ci: handle Git for Windows CI status "failed" explicitly
2017-05-23Merge branch 'ah/log-decorate-default-to-auto'Libravatar Junio C Hamano2-2/+14
Setting "log.decorate=false" in the configuration file did not take effect in v2.13, which has been corrected. * ah/log-decorate-default-to-auto: builtin/log: honor log.decorate
2017-05-23Merge branch 'bw/submodule-with-bs-path'Libravatar Junio C Hamano1-1/+1
A hotfix to a topic that is already in v2.13. * bw/submodule-with-bs-path: t7400: add !CYGWIN prerequisite to 'add with \\ in path'
2017-05-16Start post 2.13 cycleLibravatar Junio C Hamano3-2/+99
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-16Merge branch 'js/larger-timestamps'Libravatar Junio C Hamano55-220/+257
Some platforms have ulong that is smaller than time_t, and our historical use of ulong for timestamp would mean they cannot represent some timestamp that the platform allows. Invent a separate and dedicated timestamp_t (so that we can distingiuish timestamps and a vanilla ulongs, which along is already a good move), and then declare uintmax_t is the type to be used as the timestamp_t. * js/larger-timestamps: archive-tar: fix a sparse 'constant too large' warning use uintmax_t for timestamps date.c: abort if the system time cannot handle one of our timestamps timestamp_t: a new data type for timestamps PRItime: introduce a new "printf format" for timestamps parse_timestamp(): specify explicitly where we parse timestamps t0006 & t5000: skip "far in the future" test when time_t is too limited t0006 & t5000: prepare for 64-bit timestamps ref-filter: avoid using `unsigned long` for catch-all data type
2017-05-16Merge branch 'jc/apply-fix-mismerge'Libravatar Junio C Hamano1-169/+169
* jc/apply-fix-mismerge: apply.c: fix whitespace-only mismerge
2017-05-16Merge branch 'ab/aix-needs-compat-regex'Libravatar Junio C Hamano1-0/+1
Build fix. * ab/aix-needs-compat-regex: config.mak.uname: set NO_REGEX=NeedsStartEnd on AIX
2017-05-16Merge branch 'jn/credential-doc-on-clear'Libravatar Junio C Hamano1-10/+10
Doc update. * jn/credential-doc-on-clear: credential doc: make multiple-helper behavior more prominent
2017-05-16Merge branch 'jn/clone-add-empty-config-from-command-line'Libravatar Junio C Hamano2-1/+11
"git clone --config var=val" is a way to populate the per-repository configuration file of the new repository, but it did not work well when val is an empty string. This has been fixed. * jn/clone-add-empty-config-from-command-line: clone: handle empty config values in -c
2017-05-16Merge branch 'bw/submodule-has-commits-update'Libravatar Junio C Hamano1-156/+149
Code clean-up and duplicate removal. * bw/submodule-has-commits-update: submodule: refactor logic to determine changed submodules submodule: improve submodule_has_commits() submodule: change string_list changed_submodule_paths submodule: remove add_oid_to_argv() submodule: rename free_submodules_sha1s() submodule: rename add_sha1_to_array()
2017-05-16Merge branch 'ls/travis-doc-asciidoctor'Libravatar Junio C Hamano2-4/+16
Travis CI gained a task to format the documentation with both AsciiDoc and AsciiDoctor. * ls/travis-doc-asciidoctor: travis-ci: check AsciiDoc/AsciiDoctor stderr output travis-ci: unset compiler for jobs that do not need one travis-ci: parallelize documentation build travis-ci: build documentation with AsciiDoc and Asciidoctor
2017-05-16Merge branch 'rs/large-zip'Libravatar Junio C Hamano3-84/+181
"git archive --format=zip" learned to use zip64 extension when necessary to go beyond the 4GB limit. * rs/large-zip: t5004: require 64-bit support for big ZIP tests archive-zip: set version field for big files correctly archive-zip: support files bigger than 4GB archive-zip: support archives bigger than 4GB archive-zip: write ZIP dir entry directly to strbuf archive-zip: use strbuf for ZIP directory archive-zip: add tests for big ZIP archives
2017-05-16Merge branch 'ab/clone-no-tags'Libravatar Junio C Hamano5-14/+117
"git clone" learned the "--no-tags" option not to fetch all tags initially, and also set up the tagopt not to follow any tags in subsequent fetches. * ab/clone-no-tags: tests: rename a test having to do with shallow submodules clone: add a --no-tags option to clone without tags tests: change "cd ... && git fetch" to "cd &&\n\tgit fetch"
2017-05-16Merge branch 'sk/status-short-branch-color-config'Libravatar Junio C Hamano5-7/+125
The colors in which "git status --short --branch" showed the names of the current branch and its remote-tracking branch are now configurable. * sk/status-short-branch-color-config: status: add color config slots for branch info in "--short --branch" status: fix missing newline when comment chars are disabled
2017-05-16Merge branch 'jk/am-leakfix'Libravatar Junio C Hamano1-20/+14
The codepath in "git am" that is used when running "git rebase" leaked memory held for the log message of the commits being rebased. * jk/am-leakfix: am: shorten ident_split variable name in get_commit_info() am: simplify allocations in get_commit_info() am: fix commit buffer leak in get_commit_info()
2017-05-16Merge branch 'jt/use-trailer-api-in-commands'Libravatar Junio C Hamano2-7/+48
"git cherry-pick" and other uses of the sequencer machinery mishandled a trailer block whose last line is an incomplete line. This has been fixed so that an additional sign-off etc. are added after completing the existing incomplete line. * jt/use-trailer-api-in-commands: sequencer: add newline before adding footers
2017-05-16Merge branch 'nd/worktree-kill-parse-ref'Libravatar Junio C Hamano10-174/+177
"git gc" did not interact well with "git worktree"-managed per-worktree refs. * nd/worktree-kill-parse-ref: refs: kill set_worktree_head_symref() worktree.c: kill parse_ref() in favor of refs_resolve_ref_unsafe() refs: introduce get_worktree_ref_store() refs: add REFS_STORE_ALL_CAPS refs.c: make submodule ref store hashmap generic environment.c: fix potential segfault by get_git_common_dir()
2017-05-16Merge branch 'dt/gc-ignore-old-gc-logs'Libravatar Junio C Hamano1-4/+8
Attempt to allow us notice "fishy" situation where we fail to remove the temporary directory used during the test. * dt/gc-ignore-old-gc-logs: test-lib: retire $remove_trash variable test-lib.sh: do not barf under --debug at the end of the test test-lib: abort when can't remove trash directory
2017-05-16Merge branch 'jk/no-null-sha1-in-cache-tree'Libravatar Junio C Hamano4-2/+35
Code to update the cache-tree has been tightened so that we won't accidentally write out any 0{40} entry in the tree object. * jk/no-null-sha1-in-cache-tree: cache-tree: reject entries with null sha1
2017-05-16Merge branch 'dt/raise-core-packed-git-limit'Libravatar Junio C Hamano1-1/+1
The default packed-git limit value has been raised on larger platforms to save "git fetch" from a (recoverable) failure while "gc" is running in parallel. * dt/raise-core-packed-git-limit: Increase core.packedGitLimit
2017-05-15builtin/log: honor log.decorateLibravatar brian m. carlson2-2/+14
The recent change that introduced autodecorating of refs accidentally broke the ability of users to set log.decorate = false to override it. When the git_log_config was traversed a second time with an option other than log.decorate, the decoration style would be set to the automatic style, even if the user had already overridden it. Instead of setting the option in config parsing, set it in init_log_defaults instead. Add a test for this case. The actual additional config option doesn't matter, but it needs to be something not already set in the configuration file. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Acked-by: Alex Henrie <alexhenrie24@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-11travis-ci: add job to run tests with GETTEXT_POISONLibravatar Lars Schneider1-0/+5
Add a job to run Git tests with GETTEXT_POISON. In this job we don't run the git-p4, git-svn, and HTTPD tests to save resources/time (those tests are already executed in other jobs). Since we don't run these tests, we can also skip the "before_install" step (which would install the necessary dependencies) with an empty override. Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-11travis-ci: setup "prove cache" in "script" stepLibravatar Lars Schneider1-3/+5
The command that made the "prove cache" persistent across builds was executed in the "before_install" step. Consequently, every job that wanted to make use of the cache had to run this step. The "prove cache" is only used in the "script" step for the "make test" command. Therefore, we should configure the "prove cache" in this step. This change is useful for a subsequent patch that adds a job which does not need the "before_install" step but wants to run the "script" step to execute the tests. Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-11tests: fix tests broken under GETTEXT_POISON=YesPleaseLibravatar Ævar Arnfjörð Bjarmason15-34/+38
The GETTEXT_POISON=YesPlease compile-time testing option added in my bb946bba76 ("i18n: add GETTEXT_POISON to simulate unfriendly translator", 2011-02-22) has been slowly bitrotting as strings have been marked for translation, and new tests have been added without running it. I brought this up on the list ("[BUG] test suite broken with GETTEXT_POISON=YesPlease", [1]) asking whether this mode was useful at all anymore. At least one person occasionally uses it, and Lars Schneider offered to change one of the the Travis builds to run in this mode, so fix up the failing ones. My test setup runs most of the tests, with the notable exception of skipping all the p4 tests, so it's possible that there's still some lurking regressions I haven't fixed. 1. <CACBZZX62+acvi1dpkknadTL827mtCm_QesGSZ=6+UnyeMpg8+Q@mail.gmail.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-10t0027: tests are not expensive; remove t0025Libravatar Torsten Bögershausen2-187/+0
The purpose of t0027 is to test all CRLF related conversions at "git checkout" and "git add". Running t0027 under Git for Windows takes 3-4 minutes, so the whole script had been marked as "EXPENSIVE". However, the "Git for Windows" fork overrides this since 2014: "t0027 is marked expensive, but really, for MinGW we want to run these tests always." The test seems not to be expensive on other platforms at all: it takes less than 14 seconds under Linux, and 63 seconds under Mac Os X, and this is more or less the same with a SSD or a spinning disk. So let's drop the "EXPENSIVE" prereq. While at it, retire t0025; recent "stress" tests show that t0025 is flaky, reported by Lars Schneider <larsxschneider@gmail.com>, but all tests in t0025 are covered by t0027 already. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-10receive-pack: verify push options in certLibravatar Jonathan Tan3-8/+112
In commit f6a4e61 ("push: accept push options", 2016-07-14), send-pack was taught to include push options both within the signed cert (if the push is a signed push) and outside the signed cert; however, receive-pack ignores push options within the cert, only handling push options outside the cert. Teach receive-pack, in the case that push options are provided for a signed push, to verify that the push options both within the cert and outside the cert are consistent. This sets in stone the requirement that send-pack redundantly send its push options in 2 places, but I think that this is better than the alternatives. Sending push options only within the cert is backwards-incompatible with existing Git servers (which read push options only from outside the cert), and sending push options only outside the cert means that the push options are not signed for. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-09doc: replace more gmane linksLibravatar Junio C Hamano4-4/+4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-09Git 2.13Libravatar Junio C Hamano3-1/+14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-09Merge tag 'l10n-2.13.0-rnd2.1' of git://github.com/git-l10n/git-poLibravatar Junio C Hamano9-19174/+23732
l10n for Git 2.13.0 round 2.1 * tag 'l10n-2.13.0-rnd2.1' of git://github.com/git-l10n/git-po: l10n: zh_CN: for git v2.13.0 l10n round 2 l10n: sv.po: Update Swedish translation (3195t0f0u) l10n: zh_CN: review for git v2.13.0 l10n round 1 l10n: Update Catalan translation l10n: bg.po: Updated Bulgarian translation (3195t) l10n: fr.po v2.13 rnd 2 l10n: de.po: translate 4 new messages l10n: de.po: update German translation l10n: de.po: lower case after semi-colon l10n: vi.po(3195t): Update translation for v2.13.0 round 2 l10n: git.pot: v2.13.0 round 2 (4 new, 7 removed) l10n: zh_CN: for git v2.13.0 l10n round 1 l10n: fr.po v2.13 round 1 l10n: pt_PT: update Portuguese translation l10n: bg.po: Updated Bulgarian translation (3201t) l10n: vi.po(3198t): Updated Vietnamese translation for v2.13.0-rc0 l10n: sv.po: Update Swedish translation (3199t0f0u) l10n: git.pot: v2.13.0 round 1 (96 new, 37 removed)
2017-05-09Merge branch 'master' of git://github.com/nafmo/git-l10n-svLibravatar Jiang Xin1-434/+439
* 'master' of git://github.com/nafmo/git-l10n-sv: l10n: sv.po: Update Swedish translation (3195t0f0u)
2017-05-09l10n: zh_CN: for git v2.13.0 l10n round 2Libravatar Jiang Xin1-429/+436
Translate 4 messages (3195t0f0u) for git v2.13.0-rc2. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2017-05-09l10n: sv.po: Update Swedish translation (3195t0f0u)Libravatar Peter Krefting1-434/+439
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2017-05-08Sync with v2.12.3Libravatar Junio C Hamano11-11/+116
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-09Merge branch 'jh/verify-index-checksum-only-in-fsck'Libravatar Junio C Hamano1-8/+26
* jh/verify-index-checksum-only-in-fsck: t1450: avoid use of "sed" on the index, which is a binary file
2017-05-09docs: correct receive.advertisePushOptions defaultLibravatar Jonathan Tan1-3/+2
In commit c714e45 ("receive-pack: implement advertising and receiving push options", 2016-07-14), receive-pack was taught to (among other things) advertise that it understood push options, depending on configuration. It was documented that it advertised such ability by default; however, it actually does not. (In that commit, notice that advertise_push_options defaults to 0, unlike advertise_atomic_push which defaults to 1.) Update the documentation to state that it does not advertise the ability by default. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>