rugged 1.6.2 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/CMakeLists.txt +1 -1
- data/vendor/libgit2/include/git2/version.h +2 -2
- data/vendor/libgit2/src/cli/CMakeLists.txt +0 -1
- data/vendor/libgit2/src/libgit2/CMakeLists.txt +0 -1
- data/vendor/libgit2/src/libgit2/config.c +5 -2
- data/vendor/libgit2/src/libgit2/index.c +7 -5
- data/vendor/libgit2/src/libgit2/odb.c +19 -0
- data/vendor/libgit2/src/libgit2/pack.c +4 -5
- data/vendor/libgit2/src/libgit2/revparse.c +4 -1
- data/vendor/libgit2/src/libgit2/sysdir.h +2 -0
- data/vendor/libgit2/src/libgit2/transports/smart_pkt.c +2 -1
- data/vendor/libgit2/src/util/CMakeLists.txt +0 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 12d371c731e1e760c9398e56d9c483b7dd402b0cb8aa7114876979799f8391d7
         | 
| 4 | 
            +
              data.tar.gz: d8f0d8e3d34848f5c47d417469bed92cadb5f19a22468d82025e0260c068fbdc
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 165ab860c19b8520d8bd4cf9aae47fe03206a4ac2fe2eea06d19680a178e85822778bc122a87792b44ec12e63d3139c30e8a0d466556f307acc72c968daf41b7
         | 
| 7 | 
            +
              data.tar.gz: 2a9661cf572ea86ef8939b7e9d58f63ce4188d9050dedc461e48d3bf4face25abd87b1eaddafbeabc25a203cbb95710f884d5338577239763e668c4f14162093
         | 
    
        data/lib/rugged/version.rb
    CHANGED
    
    
| @@ -11,7 +11,7 @@ | |
| 11 11 | 
             
             * The version string for libgit2.  This string follows semantic
         | 
| 12 12 | 
             
             * versioning (v2) guidelines.
         | 
| 13 13 | 
             
             */
         | 
| 14 | 
            -
            #define LIBGIT2_VERSION        "1.6. | 
| 14 | 
            +
            #define LIBGIT2_VERSION        "1.6.5"
         | 
| 15 15 |  | 
| 16 16 | 
             
            /** The major version number for this version of libgit2. */
         | 
| 17 17 | 
             
            #define LIBGIT2_VER_MAJOR      1
         | 
| @@ -20,7 +20,7 @@ | |
| 20 20 | 
             
            #define LIBGIT2_VER_MINOR      6
         | 
| 21 21 |  | 
| 22 22 | 
             
            /** The revision ("teeny") version number for this version of libgit2. */
         | 
| 23 | 
            -
            #define LIBGIT2_VER_REVISION    | 
| 23 | 
            +
            #define LIBGIT2_VER_REVISION   5
         | 
| 24 24 |  | 
| 25 25 | 
             
            /** The Windows DLL patch number for this version of libgit2. */
         | 
| 26 26 | 
             
            #define LIBGIT2_VER_PATCH      0
         | 
| @@ -10,7 +10,6 @@ include(PkgBuildConfig) | |
| 10 10 | 
             
            set(LIBGIT2_INCLUDES
         | 
| 11 11 | 
             
            	"${PROJECT_BINARY_DIR}/src/util"
         | 
| 12 12 | 
             
            	"${PROJECT_BINARY_DIR}/include"
         | 
| 13 | 
            -
            	"${PROJECT_BINARY_DIR}/include/git2"
         | 
| 14 13 | 
             
            	"${PROJECT_SOURCE_DIR}/src/libgit2"
         | 
| 15 14 | 
             
            	"${PROJECT_SOURCE_DIR}/src/util"
         | 
| 16 15 | 
             
            	"${PROJECT_SOURCE_DIR}/include")
         | 
| @@ -1174,9 +1174,12 @@ int git_config__find_programdata(git_str *path) | |
| 1174 1174 | 
             
            		GIT_FS_PATH_OWNER_CURRENT_USER |
         | 
| 1175 1175 | 
             
            		GIT_FS_PATH_OWNER_ADMINISTRATOR;
         | 
| 1176 1176 | 
             
            	bool is_safe;
         | 
| 1177 | 
            +
            	int error;
         | 
| 1178 | 
            +
             | 
| 1179 | 
            +
            	if ((error = git_sysdir_find_programdata_file(path, GIT_CONFIG_FILENAME_PROGRAMDATA)) < 0)
         | 
| 1180 | 
            +
            		return error;
         | 
| 1177 1181 |  | 
| 1178 | 
            -
            	if ( | 
| 1179 | 
            -
            	    git_fs_path_owner_is(&is_safe, path->ptr, owner_level) < 0)
         | 
| 1182 | 
            +
            	if (git_fs_path_owner_is(&is_safe, path->ptr, owner_level) < 0)
         | 
| 1180 1183 | 
             
            		return -1;
         | 
| 1181 1184 |  | 
| 1182 1185 | 
             
            	if (!is_safe) {
         | 
| @@ -1148,10 +1148,13 @@ static int has_dir_name(git_index *index, | |
| 1148 1148 | 
             
            		size_t len, pos;
         | 
| 1149 1149 |  | 
| 1150 1150 | 
             
            		for (;;) {
         | 
| 1151 | 
            -
            			 | 
| 1152 | 
            -
             | 
| 1151 | 
            +
            			slash--;
         | 
| 1152 | 
            +
             | 
| 1153 1153 | 
             
            			if (slash <= entry->path)
         | 
| 1154 1154 | 
             
            				return 0;
         | 
| 1155 | 
            +
             | 
| 1156 | 
            +
            			if (*slash == '/')
         | 
| 1157 | 
            +
            				break;
         | 
| 1155 1158 | 
             
            		}
         | 
| 1156 1159 | 
             
            		len = slash - name;
         | 
| 1157 1160 |  | 
| @@ -3397,7 +3400,6 @@ int git_index_add_all( | |
| 3397 3400 | 
             
            {
         | 
| 3398 3401 | 
             
            	int error;
         | 
| 3399 3402 | 
             
            	git_repository *repo;
         | 
| 3400 | 
            -
            	git_iterator *wditer = NULL;
         | 
| 3401 3403 | 
             
            	git_pathspec ps;
         | 
| 3402 3404 | 
             
            	bool no_fnmatch = (flags & GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH) != 0;
         | 
| 3403 3405 |  | 
| @@ -3423,7 +3425,6 @@ int git_index_add_all( | |
| 3423 3425 | 
             
            		git_error_set_after_callback(error);
         | 
| 3424 3426 |  | 
| 3425 3427 | 
             
            cleanup:
         | 
| 3426 | 
            -
            	git_iterator_free(wditer);
         | 
| 3427 3428 | 
             
            	git_pathspec__clear(&ps);
         | 
| 3428 3429 |  | 
| 3429 3430 | 
             
            	return error;
         | 
| @@ -3511,7 +3512,8 @@ static int index_apply_to_wd_diff(git_index *index, int action, const git_strarr | |
| 3511 3512 | 
             
            			GIT_DIFF_RECURSE_UNTRACKED_DIRS;
         | 
| 3512 3513 |  | 
| 3513 3514 | 
             
            		if (flags == GIT_INDEX_ADD_FORCE)
         | 
| 3514 | 
            -
            			opts.flags |= GIT_DIFF_INCLUDE_IGNORED | 
| 3515 | 
            +
            			opts.flags |= GIT_DIFF_INCLUDE_IGNORED |
         | 
| 3516 | 
            +
            			              GIT_DIFF_RECURSE_IGNORED_DIRS;
         | 
| 3515 3517 | 
             
            	}
         | 
| 3516 3518 |  | 
| 3517 3519 | 
             
            	if ((error = git_diff_index_to_workdir(&diff, repo, index, &opts)) < 0)
         | 
| @@ -856,6 +856,25 @@ int git_odb__open( | |
| 856 856 | 
             
            	return 0;
         | 
| 857 857 | 
             
            }
         | 
| 858 858 |  | 
| 859 | 
            +
            #ifdef GIT_EXPERIMENTAL_SHA256
         | 
| 860 | 
            +
             | 
| 861 | 
            +
            int git_odb_open(
         | 
| 862 | 
            +
            	git_odb **out,
         | 
| 863 | 
            +
            	const char *objects_dir,
         | 
| 864 | 
            +
            	const git_odb_options *opts)
         | 
| 865 | 
            +
            {
         | 
| 866 | 
            +
            	return git_odb__open(out, objects_dir, opts);
         | 
| 867 | 
            +
            }
         | 
| 868 | 
            +
             | 
| 869 | 
            +
            #else
         | 
| 870 | 
            +
             | 
| 871 | 
            +
            int git_odb_open(git_odb **out, const char *objects_dir)
         | 
| 872 | 
            +
            {
         | 
| 873 | 
            +
            	return git_odb__open(out, objects_dir, NULL);
         | 
| 874 | 
            +
            }
         | 
| 875 | 
            +
             | 
| 876 | 
            +
            #endif
         | 
| 877 | 
            +
             | 
| 859 878 | 
             
            int git_odb__set_caps(git_odb *odb, int caps)
         | 
| 860 879 | 
             
            {
         | 
| 861 880 | 
             
            	if (caps == GIT_ODB_CAP_FROM_OWNER) {
         | 
| @@ -200,7 +200,7 @@ static void pack_index_free(struct git_pack_file *p) | |
| 200 200 | 
             
            static int pack_index_check_locked(const char *path, struct git_pack_file *p)
         | 
| 201 201 | 
             
            {
         | 
| 202 202 | 
             
            	struct git_pack_idx_header *hdr;
         | 
| 203 | 
            -
            	uint32_t version, nr, i, *index;
         | 
| 203 | 
            +
            	uint32_t version, nr = 0, i, *index;
         | 
| 204 204 | 
             
            	void *idx_map;
         | 
| 205 205 | 
             
            	size_t idx_size;
         | 
| 206 206 | 
             
            	struct stat st;
         | 
| @@ -246,7 +246,6 @@ static int pack_index_check_locked(const char *path, struct git_pack_file *p) | |
| 246 246 | 
             
            		version = 1;
         | 
| 247 247 | 
             
            	}
         | 
| 248 248 |  | 
| 249 | 
            -
            	nr = 0;
         | 
| 250 249 | 
             
            	index = idx_map;
         | 
| 251 250 |  | 
| 252 251 | 
             
            	if (version > 1)
         | 
| @@ -269,7 +268,7 @@ static int pack_index_check_locked(const char *path, struct git_pack_file *p) | |
| 269 268 | 
             
            		 * - 20/32-byte SHA of the packfile
         | 
| 270 269 | 
             
            		 * - 20/32-byte SHA file checksum
         | 
| 271 270 | 
             
            		 */
         | 
| 272 | 
            -
            		if (idx_size != (4 * 256 + (nr * (p->oid_size + 4)) + (p->oid_size * 2))) {
         | 
| 271 | 
            +
            		if (idx_size != (4 * 256 + ((uint64_t) nr * (p->oid_size + 4)) + (p->oid_size * 2))) {
         | 
| 273 272 | 
             
            			git_futils_mmap_free(&p->index_map);
         | 
| 274 273 | 
             
            			return packfile_error("index is corrupted");
         | 
| 275 274 | 
             
            		}
         | 
| @@ -287,8 +286,8 @@ static int pack_index_check_locked(const char *path, struct git_pack_file *p) | |
| 287 286 | 
             
            		 * variable sized table containing 8-byte entries
         | 
| 288 287 | 
             
            		 * for offsets larger than 2^31.
         | 
| 289 288 | 
             
            		 */
         | 
| 290 | 
            -
            		 | 
| 291 | 
            -
            		 | 
| 289 | 
            +
            		uint64_t min_size = 8 + (4 * 256) + ((uint64_t)nr * (p->oid_size + 4 + 4)) + (p->oid_size * 2);
         | 
| 290 | 
            +
            		uint64_t max_size = min_size;
         | 
| 292 291 |  | 
| 293 292 | 
             
            		if (nr)
         | 
| 294 293 | 
             
            			max_size += (nr - 1)*8;
         | 
| @@ -701,6 +701,7 @@ static int revparse( | |
| 701 701 | 
             
            	git_object *base_rev = NULL;
         | 
| 702 702 |  | 
| 703 703 | 
             
            	bool should_return_reference = true;
         | 
| 704 | 
            +
            	bool parsed = false;
         | 
| 704 705 |  | 
| 705 706 | 
             
            	GIT_ASSERT_ARG(object_out);
         | 
| 706 707 | 
             
            	GIT_ASSERT_ARG(reference_out);
         | 
| @@ -710,7 +711,7 @@ static int revparse( | |
| 710 711 | 
             
            	*object_out = NULL;
         | 
| 711 712 | 
             
            	*reference_out = NULL;
         | 
| 712 713 |  | 
| 713 | 
            -
            	while (spec[pos]) {
         | 
| 714 | 
            +
            	while (!parsed && spec[pos]) {
         | 
| 714 715 | 
             
            		switch (spec[pos]) {
         | 
| 715 716 | 
             
            		case '^':
         | 
| 716 717 | 
             
            			should_return_reference = false;
         | 
| @@ -817,6 +818,8 @@ static int revparse( | |
| 817 818 | 
             
            				break;
         | 
| 818 819 | 
             
            			} else if (spec[pos+1] == '\0') {
         | 
| 819 820 | 
             
            				spec = "HEAD";
         | 
| 821 | 
            +
            				identifier_len = 4;
         | 
| 822 | 
            +
            				parsed = true;
         | 
| 820 823 | 
             
            				break;
         | 
| 821 824 | 
             
            			}
         | 
| 822 825 | 
             
            			/* fall through */
         | 
| @@ -134,10 +134,12 @@ extern int git_sysdir_set(git_sysdir_t which, const char *paths); | |
| 134 134 | 
             
             */
         | 
| 135 135 | 
             
            extern int git_sysdir_reset(void);
         | 
| 136 136 |  | 
| 137 | 
            +
            #ifdef GIT_WIN32
         | 
| 137 138 | 
             
            /** Sets the registry system dir to a mock; for testing.  */
         | 
| 138 139 | 
             
            extern int git_win32__set_registry_system_dir(const wchar_t *mock_sysdir);
         | 
| 139 140 |  | 
| 140 141 | 
             
            /** Find the given system dir; for testing. */
         | 
| 141 142 | 
             
            extern int git_win32__find_system_dirs(git_str *out, const char *subdir);
         | 
| 143 | 
            +
            #endif
         | 
| 142 144 |  | 
| 143 145 | 
             
            #endif
         | 
| @@ -226,7 +226,8 @@ static int set_data( | |
| 226 226 |  | 
| 227 227 | 
             
            	GIT_ASSERT_ARG(data);
         | 
| 228 228 |  | 
| 229 | 
            -
            	if ((caps = memchr(line, '\0', len)) != NULL | 
| 229 | 
            +
            	if ((caps = memchr(line, '\0', len)) != NULL &&
         | 
| 230 | 
            +
            	    len > (size_t)((caps - line) + 1)) {
         | 
| 230 231 | 
             
            		caps++;
         | 
| 231 232 |  | 
| 232 233 | 
             
            		if (strncmp(caps, "object-format=", CONST_STRLEN("object-format=")) == 0)
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: rugged
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.6. | 
| 4 | 
            +
              version: 1.6.5
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Scott Chacon
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire:
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date:  | 
| 12 | 
            +
            date: 2024-02-07 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: rake-compiler
         |