rugged 1.6.2 → 1.6.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 352d7cd2514026a9539c7b3bca08450118cc29721d7ea969548aceb7a10a42f2
4
- data.tar.gz: cba7b10bdc897406044a8205b8278fd6bd042e714df11fc868d663d9e6f39c73
3
+ metadata.gz: 12d371c731e1e760c9398e56d9c483b7dd402b0cb8aa7114876979799f8391d7
4
+ data.tar.gz: d8f0d8e3d34848f5c47d417469bed92cadb5f19a22468d82025e0260c068fbdc
5
5
  SHA512:
6
- metadata.gz: dfa9a28f28da9f52660f93ee665bcb0763cd5f1ada9a52fefaf2ea9582dd83f741c8bae512b0fd1337273055bab93dd1d6d0d0d096b7ff9412bc63c562a815fe
7
- data.tar.gz: 348ee2757446376a08aeed8dec122867578963c22d7d491462552391d315cb5a92ff571ea9bb91e1dfacdea98558dc321d914e1030105885cecd936f624c8e04
6
+ metadata.gz: 165ab860c19b8520d8bd4cf9aae47fe03206a4ac2fe2eea06d19680a178e85822778bc122a87792b44ec12e63d3139c30e8a0d466556f307acc72c968daf41b7
7
+ data.tar.gz: 2a9661cf572ea86ef8939b7e9d58f63ce4188d9050dedc461e48d3bf4face25abd87b1eaddafbeabc25a203cbb95710f884d5338577239763e668c4f14162093
@@ -4,5 +4,5 @@
4
4
  # For full terms see the included LICENSE file.
5
5
 
6
6
  module Rugged
7
- Version = VERSION = '1.6.2'
7
+ Version = VERSION = '1.6.5'
8
8
  end
@@ -6,7 +6,7 @@
6
6
 
7
7
  cmake_minimum_required(VERSION 3.5.1)
8
8
 
9
- project(libgit2 VERSION "1.6.2" LANGUAGES C)
9
+ project(libgit2 VERSION "1.6.5" LANGUAGES C)
10
10
 
11
11
  # Add find modules to the path
12
12
  set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
@@ -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.2"
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 2
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
@@ -1,7 +1,6 @@
1
1
  set(CLI_INCLUDES
2
2
  "${libgit2_BINARY_DIR}/src/util"
3
3
  "${libgit2_BINARY_DIR}/include"
4
- "${libgit2_BINARY_DIR}/include/git2"
5
4
  "${libgit2_SOURCE_DIR}/src/util"
6
5
  "${libgit2_SOURCE_DIR}/src/cli"
7
6
  "${libgit2_SOURCE_DIR}/include"
@@ -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 (git_sysdir_find_programdata_file(path, GIT_CONFIG_FILENAME_PROGRAMDATA) < 0 ||
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
- if (*--slash == '/')
1152
- break;
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
- unsigned long min_size = 8 + (4 * 256) + (nr * (p->oid_size + 4 + 4)) + (p->oid_size * 2);
291
- unsigned long max_size = min_size;
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)
@@ -9,7 +9,6 @@ configure_file(git2_features.h.in git2_features.h)
9
9
  set(UTIL_INCLUDES
10
10
  "${PROJECT_BINARY_DIR}/src/util"
11
11
  "${PROJECT_BINARY_DIR}/include"
12
- "${PROJECT_BINARY_DIR}/include/git2"
13
12
  "${PROJECT_SOURCE_DIR}/src/util"
14
13
  "${PROJECT_SOURCE_DIR}/include")
15
14
 
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.2
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: 2023-03-17 00:00:00.000000000 Z
12
+ date: 2024-02-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler