rugged 0.25.0b3 → 0.25.0b4

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
  SHA1:
3
- metadata.gz: decef5bc39de7103a2e879463898551989f0356f
4
- data.tar.gz: 0011b10ea74d9092eaa562c635a1fbfc9aa8603d
3
+ metadata.gz: 9ea4cb60e3267817cda5b2578e0527e5d9310e53
4
+ data.tar.gz: 9831198a4fc9084f713416f1cad54b4e795f6a89
5
5
  SHA512:
6
- metadata.gz: a72e1a7f4f0053397c15a3f995ed11b4fa3255202ff738a148652f4813ce619d62481423084b471659905a023d3c2ed42d83d182c86f0a66cfdb50ab18fe2aef
7
- data.tar.gz: b45c43553374f7eb2ea44728f9fb9e15e2eb8bee4f70261c6336f38d9d8345d7b87b567289e040663426a2a3a0216a46197130ef0b3e386fe0d19cdb40388ba2
6
+ metadata.gz: aeff15bd39959a72b1e0a300d2ee6e87f8e657dfef76aea51815cae86020140f9401f604187cd581894be00e09c35d17bda907c7ad4051dcff2700c8164389a1
7
+ data.tar.gz: 7cfb2950f9ebf716375fb8f522fc6b22c443f869adb689dcf8662ffe000522612c21b6b9a8ec5e502b44c51e57f17b6523d82a986084ac4e280ce8a0a80a0c47
@@ -1,3 +1,3 @@
1
1
  module Rugged
2
- Version = VERSION = '0.25.0b3'
2
+ Version = VERSION = '0.25.0b4'
3
3
  end
@@ -40,7 +40,7 @@ OPTION( USE_ICONV "Link with and use iconv library" OFF )
40
40
  OPTION( USE_SSH "Link with libssh to enable SSH support" ON )
41
41
  OPTION( USE_GSSAPI "Link with libgssapi for SPNEGO auth" OFF )
42
42
  OPTION( VALGRIND "Configure build for valgrind" OFF )
43
- OPTION( CURL "User curl for HTTP if available" ON)
43
+ OPTION( CURL "Use curl for HTTP if available" ON)
44
44
  OPTION( DEBUG_POOL "Enable debug pool allocator" OFF )
45
45
 
46
46
  IF(DEBUG_POOL)
@@ -151,6 +151,10 @@ FUNCTION(TARGET_OS_LIBRARIES target)
151
151
  TARGET_LINK_LIBRARIES(${target} socket nsl)
152
152
  LIST(APPEND LIBGIT2_PC_LIBS "-lsocket" "-lnsl")
153
153
  SET(LIBGIT2_PC_LIBS ${LIBGIT2_PC_LIBS} PARENT_SCOPE)
154
+ ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Haiku")
155
+ TARGET_LINK_LIBRARIES(${target} network)
156
+ LIST(APPEND LIBGIT2_PC_LIBS "-lnetwork")
157
+ SET(LIBGIT2_PC_LIBS ${LIBGIT2_PC_LIBS} PARENT_SCOPE)
154
158
  ENDIF()
155
159
  CHECK_LIBRARY_EXISTS(rt clock_gettime "time.h" NEED_LIBRT)
156
160
  IF(NEED_LIBRT)
@@ -482,7 +482,8 @@ static int checkout_action_with_wd(
482
482
  *action = CHECKOUT_ACTION_IF(SAFE, REMOVE, NONE);
483
483
  break;
484
484
  case GIT_DELTA_MODIFIED: /* case 16, 17, 18 (or 36 but not really) */
485
- if (checkout_is_workdir_modified(data, &delta->old_file, &delta->new_file, wd))
485
+ if (wd->mode != GIT_FILEMODE_COMMIT &&
486
+ checkout_is_workdir_modified(data, &delta->old_file, &delta->new_file, wd))
486
487
  *action = CHECKOUT_ACTION_IF(FORCE, UPDATE_BLOB, CONFLICT);
487
488
  else
488
489
  *action = CHECKOUT_ACTION_IF(SAFE, UPDATE_BLOB, NONE);
@@ -40,7 +40,6 @@ void git_commit__free(void *_commit)
40
40
 
41
41
  static int git_commit__create_buffer_internal(
42
42
  git_buf *out,
43
- git_repository *repo,
44
43
  const git_signature *author,
45
44
  const git_signature *committer,
46
45
  const char *message_encoding,
@@ -51,7 +50,7 @@ static int git_commit__create_buffer_internal(
51
50
  size_t i = 0;
52
51
  const git_oid *parent;
53
52
 
54
- assert(out && repo && tree);
53
+ assert(out && tree);
55
54
 
56
55
  git_oid__writebuf(out, "tree ", tree);
57
56
 
@@ -150,7 +149,7 @@ static int git_commit__create_internal(
150
149
  if ((error = validate_tree_and_parents(&parents, repo, tree, parent_cb, parent_payload, current_id, validate)) < 0)
151
150
  goto cleanup;
152
151
 
153
- error = git_commit__create_buffer_internal(&buf, repo, author, committer,
152
+ error = git_commit__create_buffer_internal(&buf, author, committer,
154
153
  message_encoding, message, tree,
155
154
  &parents);
156
155
 
@@ -813,7 +812,7 @@ int git_commit_create_buffer(git_buf *out,
813
812
  return error;
814
813
 
815
814
  error = git_commit__create_buffer_internal(
816
- out, repo, author, committer,
815
+ out, author, committer,
817
816
  message_encoding, message, tree_id,
818
817
  &parents_arr);
819
818
 
@@ -70,7 +70,7 @@ static int lock_file(git_filebuf *file, int flags, mode_t mode)
70
70
  git_file source;
71
71
  char buffer[FILEIO_BUFSIZE];
72
72
  ssize_t read_bytes;
73
- int error;
73
+ int error = 0;
74
74
 
75
75
  source = p_open(file->path_original, O_RDONLY);
76
76
  if (source < 0) {
@@ -228,6 +228,9 @@ void git__free_tls_data(void)
228
228
 
229
229
  BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpvReserved)
230
230
  {
231
+ GIT_UNUSED(hInstDll);
232
+ GIT_UNUSED(lpvReserved);
233
+
231
234
  /* This is how Windows lets us know our thread is being shut down */
232
235
  if (fdwReason == DLL_THREAD_DETACH) {
233
236
  git__free_tls_data();
@@ -2968,6 +2968,8 @@ int git_index_read_index(
2968
2968
  *remove_entry = NULL;
2969
2969
  int diff;
2970
2970
 
2971
+ error = 0;
2972
+
2971
2973
  if (old_entry && new_entry)
2972
2974
  diff = git_index_entry_cmp(old_entry, new_entry);
2973
2975
  else if (!old_entry && new_entry)
@@ -2985,7 +2987,8 @@ int git_index_read_index(
2985
2987
  /* Path and stage are equal, if the OID is equal, keep it to
2986
2988
  * keep the stat cache data.
2987
2989
  */
2988
- if (git_oid_equal(&old_entry->id, &new_entry->id)) {
2990
+ if (git_oid_equal(&old_entry->id, &new_entry->id) &&
2991
+ old_entry->mode == new_entry->mode) {
2989
2992
  add_entry = (git_index_entry *)old_entry;
2990
2993
  } else {
2991
2994
  dup_entry = (git_index_entry *)new_entry;
@@ -2996,8 +2999,17 @@ int git_index_read_index(
2996
2999
  if (dup_entry) {
2997
3000
  if ((error = index_entry_dup_nocache(&add_entry, index, dup_entry)) < 0)
2998
3001
  goto done;
3002
+
3003
+ index_entry_adjust_namemask(add_entry,
3004
+ ((struct entry_internal *)add_entry)->pathlen);
2999
3005
  }
3000
3006
 
3007
+ /* invalidate this path in the tree cache if this is new (to
3008
+ * invalidate the parent trees)
3009
+ */
3010
+ if (dup_entry && !remove_entry && index->tree)
3011
+ git_tree_cache_invalidate_path(index->tree, dup_entry->path);
3012
+
3001
3013
  if (add_entry) {
3002
3014
  if ((error = git_vector_insert(&new_entries, add_entry)) == 0)
3003
3015
  INSERT_IN_MAP_EX(index, new_entries_map, add_entry, error);
@@ -2827,6 +2827,7 @@ static int merge_check_workdir(size_t *conflicts, git_repository *repo, git_inde
2827
2827
  opts.flags |= GIT_DIFF_DISABLE_PATHSPEC_MATCH;
2828
2828
  opts.pathspec.count = merged_paths->length;
2829
2829
  opts.pathspec.strings = (char **)merged_paths->contents;
2830
+ opts.ignore_submodules = GIT_SUBMODULE_IGNORE_ALL;
2830
2831
 
2831
2832
  if ((error = git_diff_index_to_workdir(&wd_diff_list, repo, NULL, &opts)) < 0)
2832
2833
  goto done;
@@ -1047,15 +1047,12 @@ static int rebase_commit_inmemory(
1047
1047
  const char *message_encoding,
1048
1048
  const char *message)
1049
1049
  {
1050
- git_rebase_operation *operation;
1051
1050
  git_commit *commit = NULL;
1052
1051
  int error = 0;
1053
1052
 
1054
- operation = git_array_get(rebase->operations, rebase->current);
1055
-
1056
- assert(operation);
1057
1053
  assert(rebase->index);
1058
1054
  assert(rebase->last_commit);
1055
+ assert(rebase->current < rebase->operations.size);
1059
1056
 
1060
1057
  if ((error = rebase_commit__create(&commit, rebase, rebase->index,
1061
1058
  rebase->last_commit, author, committer, message_encoding, message)) < 0)
@@ -45,7 +45,7 @@ GIT_INLINE(git_filemode_t) normalize_filemode(git_filemode_t filemode)
45
45
  if (GIT_MODE_TYPE(filemode) == GIT_FILEMODE_COMMIT)
46
46
  return GIT_FILEMODE_COMMIT;
47
47
 
48
- /* 12XXXX means commit */
48
+ /* 12XXXX means symlink */
49
49
  if (GIT_MODE_TYPE(filemode) == GIT_FILEMODE_LINK)
50
50
  return GIT_FILEMODE_LINK;
51
51
 
@@ -1093,6 +1093,15 @@ static int create_popped_tree(tree_stack_entry *current, tree_stack_entry *poppe
1093
1093
  git_oid new_tree;
1094
1094
 
1095
1095
  git_tree_free(popped->tree);
1096
+
1097
+ /* If the tree would be empty, remove it from the one higher up */
1098
+ if (git_treebuilder_entrycount(popped->bld) == 0) {
1099
+ git_treebuilder_free(popped->bld);
1100
+ error = git_treebuilder_remove(current->bld, popped->name);
1101
+ git__free(popped->name);
1102
+ return error;
1103
+ }
1104
+
1096
1105
  error = git_treebuilder_write(&new_tree, popped->bld);
1097
1106
  git_treebuilder_free(popped->bld);
1098
1107
 
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: 0.25.0b3
4
+ version: 0.25.0b4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon
@@ -9,48 +9,48 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-05-24 00:00:00.000000000 Z
12
+ date: 2016-06-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
18
+ - - '>='
19
19
  - !ruby/object:Gem::Version
20
20
  version: 0.9.0
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ">="
25
+ - - '>='
26
26
  - !ruby/object:Gem::Version
27
27
  version: 0.9.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: pry
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ">="
32
+ - - '>='
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ">="
39
+ - - '>='
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: minitest
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - "~>"
46
+ - - ~>
47
47
  - !ruby/object:Gem::Version
48
48
  version: '3.0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - "~>"
53
+ - - ~>
54
54
  - !ruby/object:Gem::Version
55
55
  version: '3.0'
56
56
  description: |
@@ -62,9 +62,30 @@ extensions:
62
62
  - ext/rugged/extconf.rb
63
63
  extra_rdoc_files: []
64
64
  files:
65
- - LICENSE
66
65
  - README.md
67
- - ext/rugged/extconf.rb
66
+ - LICENSE
67
+ - lib/rugged/attributes.rb
68
+ - lib/rugged/blob.rb
69
+ - lib/rugged/branch.rb
70
+ - lib/rugged/commit.rb
71
+ - lib/rugged/console.rb
72
+ - lib/rugged/credentials.rb
73
+ - lib/rugged/diff/delta.rb
74
+ - lib/rugged/diff/hunk.rb
75
+ - lib/rugged/diff/line.rb
76
+ - lib/rugged/diff.rb
77
+ - lib/rugged/index.rb
78
+ - lib/rugged/object.rb
79
+ - lib/rugged/patch.rb
80
+ - lib/rugged/reference.rb
81
+ - lib/rugged/remote.rb
82
+ - lib/rugged/repository.rb
83
+ - lib/rugged/submodule_collection.rb
84
+ - lib/rugged/tag.rb
85
+ - lib/rugged/tree.rb
86
+ - lib/rugged/version.rb
87
+ - lib/rugged/walker.rb
88
+ - lib/rugged.rb
68
89
  - ext/rugged/rugged.c
69
90
  - ext/rugged/rugged.h
70
91
  - ext/rugged/rugged_backend.c
@@ -97,71 +118,12 @@ files:
97
118
  - ext/rugged/rugged_tag.c
98
119
  - ext/rugged/rugged_tag_collection.c
99
120
  - ext/rugged/rugged_tree.c
100
- - lib/rugged.rb
101
- - lib/rugged/attributes.rb
102
- - lib/rugged/blob.rb
103
- - lib/rugged/branch.rb
104
- - lib/rugged/commit.rb
105
- - lib/rugged/console.rb
106
- - lib/rugged/credentials.rb
107
- - lib/rugged/diff.rb
108
- - lib/rugged/diff/delta.rb
109
- - lib/rugged/diff/hunk.rb
110
- - lib/rugged/diff/line.rb
111
- - lib/rugged/index.rb
112
- - lib/rugged/object.rb
113
- - lib/rugged/patch.rb
114
- - lib/rugged/reference.rb
115
- - lib/rugged/remote.rb
116
- - lib/rugged/repository.rb
117
- - lib/rugged/submodule_collection.rb
118
- - lib/rugged/tag.rb
119
- - lib/rugged/tree.rb
120
- - lib/rugged/version.rb
121
- - lib/rugged/walker.rb
122
- - vendor/libgit2/AUTHORS
123
- - vendor/libgit2/CMakeLists.txt
124
- - vendor/libgit2/COPYING
125
121
  - vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
126
122
  - vendor/libgit2/cmake/Modules/FindCoreFoundation.cmake
127
123
  - vendor/libgit2/cmake/Modules/FindGSSAPI.cmake
128
124
  - vendor/libgit2/cmake/Modules/FindHTTP_Parser.cmake
129
125
  - vendor/libgit2/cmake/Modules/FindIconv.cmake
130
126
  - vendor/libgit2/cmake/Modules/FindSecurity.cmake
131
- - vendor/libgit2/deps/http-parser/LICENSE-MIT
132
- - vendor/libgit2/deps/http-parser/http_parser.c
133
- - vendor/libgit2/deps/http-parser/http_parser.h
134
- - vendor/libgit2/deps/regex/config.h
135
- - vendor/libgit2/deps/regex/regcomp.c
136
- - vendor/libgit2/deps/regex/regex.c
137
- - vendor/libgit2/deps/regex/regex.h
138
- - vendor/libgit2/deps/regex/regex_internal.c
139
- - vendor/libgit2/deps/regex/regex_internal.h
140
- - vendor/libgit2/deps/regex/regexec.c
141
- - vendor/libgit2/deps/winhttp/urlmon.h
142
- - vendor/libgit2/deps/winhttp/winhttp.def
143
- - vendor/libgit2/deps/winhttp/winhttp.h
144
- - vendor/libgit2/deps/winhttp/winhttp64.def
145
- - vendor/libgit2/deps/zlib/adler32.c
146
- - vendor/libgit2/deps/zlib/crc32.c
147
- - vendor/libgit2/deps/zlib/crc32.h
148
- - vendor/libgit2/deps/zlib/deflate.c
149
- - vendor/libgit2/deps/zlib/deflate.h
150
- - vendor/libgit2/deps/zlib/infback.c
151
- - vendor/libgit2/deps/zlib/inffast.c
152
- - vendor/libgit2/deps/zlib/inffast.h
153
- - vendor/libgit2/deps/zlib/inffixed.h
154
- - vendor/libgit2/deps/zlib/inflate.c
155
- - vendor/libgit2/deps/zlib/inflate.h
156
- - vendor/libgit2/deps/zlib/inftrees.c
157
- - vendor/libgit2/deps/zlib/inftrees.h
158
- - vendor/libgit2/deps/zlib/trees.c
159
- - vendor/libgit2/deps/zlib/trees.h
160
- - vendor/libgit2/deps/zlib/zconf.h
161
- - vendor/libgit2/deps/zlib/zlib.h
162
- - vendor/libgit2/deps/zlib/zutil.c
163
- - vendor/libgit2/deps/zlib/zutil.h
164
- - vendor/libgit2/include/git2.h
165
127
  - vendor/libgit2/include/git2/annotated_commit.h
166
128
  - vendor/libgit2/include/git2/attr.h
167
129
  - vendor/libgit2/include/git2/blame.h
@@ -239,7 +201,7 @@ files:
239
201
  - vendor/libgit2/include/git2/tree.h
240
202
  - vendor/libgit2/include/git2/types.h
241
203
  - vendor/libgit2/include/git2/version.h
242
- - vendor/libgit2/libgit2.pc.in
204
+ - vendor/libgit2/include/git2.h
243
205
  - vendor/libgit2/src/annotated_commit.c
244
206
  - vendor/libgit2/src/annotated_commit.h
245
207
  - vendor/libgit2/src/array.h
@@ -318,14 +280,14 @@ files:
318
280
  - vendor/libgit2/src/global.c
319
281
  - vendor/libgit2/src/global.h
320
282
  - vendor/libgit2/src/graph.c
321
- - vendor/libgit2/src/hash.c
322
- - vendor/libgit2/src/hash.h
323
283
  - vendor/libgit2/src/hash/hash_common_crypto.h
324
284
  - vendor/libgit2/src/hash/hash_generic.c
325
285
  - vendor/libgit2/src/hash/hash_generic.h
326
286
  - vendor/libgit2/src/hash/hash_openssl.h
327
287
  - vendor/libgit2/src/hash/hash_win32.c
328
288
  - vendor/libgit2/src/hash/hash_win32.h
289
+ - vendor/libgit2/src/hash.c
290
+ - vendor/libgit2/src/hash.h
329
291
  - vendor/libgit2/src/hashsig.c
330
292
  - vendor/libgit2/src/ident.c
331
293
  - vendor/libgit2/src/idxmap.h
@@ -518,6 +480,44 @@ files:
518
480
  - vendor/libgit2/src/xdiff/xutils.h
519
481
  - vendor/libgit2/src/zstream.c
520
482
  - vendor/libgit2/src/zstream.h
483
+ - vendor/libgit2/deps/http-parser/http_parser.c
484
+ - vendor/libgit2/deps/http-parser/http_parser.h
485
+ - vendor/libgit2/deps/http-parser/LICENSE-MIT
486
+ - vendor/libgit2/deps/regex/config.h
487
+ - vendor/libgit2/deps/regex/regcomp.c
488
+ - vendor/libgit2/deps/regex/regex.c
489
+ - vendor/libgit2/deps/regex/regex.h
490
+ - vendor/libgit2/deps/regex/regex_internal.c
491
+ - vendor/libgit2/deps/regex/regex_internal.h
492
+ - vendor/libgit2/deps/regex/regexec.c
493
+ - vendor/libgit2/deps/winhttp/urlmon.h
494
+ - vendor/libgit2/deps/winhttp/winhttp.def
495
+ - vendor/libgit2/deps/winhttp/winhttp.h
496
+ - vendor/libgit2/deps/winhttp/winhttp64.def
497
+ - vendor/libgit2/deps/zlib/adler32.c
498
+ - vendor/libgit2/deps/zlib/crc32.c
499
+ - vendor/libgit2/deps/zlib/crc32.h
500
+ - vendor/libgit2/deps/zlib/deflate.c
501
+ - vendor/libgit2/deps/zlib/deflate.h
502
+ - vendor/libgit2/deps/zlib/infback.c
503
+ - vendor/libgit2/deps/zlib/inffast.c
504
+ - vendor/libgit2/deps/zlib/inffast.h
505
+ - vendor/libgit2/deps/zlib/inffixed.h
506
+ - vendor/libgit2/deps/zlib/inflate.c
507
+ - vendor/libgit2/deps/zlib/inflate.h
508
+ - vendor/libgit2/deps/zlib/inftrees.c
509
+ - vendor/libgit2/deps/zlib/inftrees.h
510
+ - vendor/libgit2/deps/zlib/trees.c
511
+ - vendor/libgit2/deps/zlib/trees.h
512
+ - vendor/libgit2/deps/zlib/zconf.h
513
+ - vendor/libgit2/deps/zlib/zlib.h
514
+ - vendor/libgit2/deps/zlib/zutil.c
515
+ - vendor/libgit2/deps/zlib/zutil.h
516
+ - vendor/libgit2/CMakeLists.txt
517
+ - vendor/libgit2/AUTHORS
518
+ - vendor/libgit2/COPYING
519
+ - vendor/libgit2/libgit2.pc.in
520
+ - ext/rugged/extconf.rb
521
521
  homepage: https://github.com/libgit2/rugged
522
522
  licenses:
523
523
  - MIT
@@ -528,17 +528,17 @@ require_paths:
528
528
  - lib
529
529
  required_ruby_version: !ruby/object:Gem::Requirement
530
530
  requirements:
531
- - - ">="
531
+ - - '>='
532
532
  - !ruby/object:Gem::Version
533
533
  version: 1.9.3
534
534
  required_rubygems_version: !ruby/object:Gem::Requirement
535
535
  requirements:
536
- - - ">"
536
+ - - '>'
537
537
  - !ruby/object:Gem::Version
538
538
  version: 1.3.1
539
539
  requirements: []
540
540
  rubyforge_project:
541
- rubygems_version: 2.5.1
541
+ rubygems_version: 2.0.14.1
542
542
  signing_key:
543
543
  specification_version: 4
544
544
  summary: Rugged is a Ruby binding to the libgit2 linkable library