rugged 0.24.0b14 → 0.24.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Rugged
2
- Version = VERSION = '0.24.0b14'
2
+ Version = VERSION = '0.24.0'
3
3
  end
@@ -682,6 +682,10 @@ IF (BUILD_CLAR)
682
682
  ELSE ()
683
683
  ADD_TEST(libgit2_clar libgit2_clar -v)
684
684
  ENDIF ()
685
+
686
+ # Add a test target which runs the cred callback tests, to be
687
+ # called after setting the url and user
688
+ ADD_TEST(libgit2_clar-cred_callback libgit2_clar -v -sonline::clone::cred_callback)
685
689
  ENDIF ()
686
690
 
687
691
  IF (TAGS)
@@ -7,12 +7,12 @@
7
7
  #ifndef INCLUDE_git_version_h__
8
8
  #define INCLUDE_git_version_h__
9
9
 
10
- #define LIBGIT2_VERSION "0.23.0"
10
+ #define LIBGIT2_VERSION "0.24.0"
11
11
  #define LIBGIT2_VER_MAJOR 0
12
- #define LIBGIT2_VER_MINOR 23
12
+ #define LIBGIT2_VER_MINOR 24
13
13
  #define LIBGIT2_VER_REVISION 0
14
14
  #define LIBGIT2_VER_PATCH 0
15
15
 
16
- #define LIBGIT2_SOVERSION 23
16
+ #define LIBGIT2_SOVERSION 24
17
17
 
18
18
  #endif
@@ -12,6 +12,7 @@
12
12
  #include "openssl_stream.h"
13
13
  #include "thread-utils.h"
14
14
  #include "git2/global.h"
15
+ #include "transports/ssh.h"
15
16
 
16
17
  #if defined(GIT_MSVC_CRTDBG)
17
18
  #include "win32/w32_stack.h"
@@ -56,7 +57,8 @@ static int init_common(void)
56
57
  /* Initialize any other subsystems that have global state */
57
58
  if ((ret = git_hash_global_init()) == 0 &&
58
59
  (ret = git_sysdir_global_init()) == 0 &&
59
- (ret = git_filter_global_init()) == 0)
60
+ (ret = git_filter_global_init()) == 0 &&
61
+ (ret = git_transport_ssh_global_init()) == 0)
60
62
  ret = git_openssl_stream_global_init();
61
63
 
62
64
  GIT_MEMORY_BARRIER;
@@ -15,6 +15,7 @@
15
15
  #include "smart.h"
16
16
  #include "cred.h"
17
17
  #include "socket_stream.h"
18
+ #include "ssh.h"
18
19
 
19
20
  #ifdef GIT_SSH
20
21
 
@@ -876,3 +877,18 @@ int git_transport_ssh_with_paths(git_transport **out, git_remote *owner, void *p
876
877
  return -1;
877
878
  #endif
878
879
  }
880
+
881
+ int git_transport_ssh_global_init(void)
882
+ {
883
+ #ifdef GIT_SSH
884
+
885
+ libssh2_init(0);
886
+ return 0;
887
+
888
+ #else
889
+
890
+ /* Nothing to initialize */
891
+ return 0;
892
+
893
+ #endif
894
+ }
@@ -0,0 +1,12 @@
1
+ /*
2
+ * Copyright (C) the libgit2 contributors. All rights reserved.
3
+ *
4
+ * This file is part of libgit2, distributed under the GNU GPL v2 with
5
+ * a Linking Exception. For full terms see the included COPYING file.
6
+ */
7
+ #ifndef INCLUDE_ssh_h__
8
+ #define INCLUDE_ssh_h__
9
+
10
+ int git_transport_ssh_global_init(void);
11
+
12
+ #endif
@@ -926,10 +926,11 @@ replay:
926
926
  if (parse_unauthorized_response(s->request, &allowed_types, &t->auth_mechanism) < 0)
927
927
  return -1;
928
928
 
929
- if (allowed_types &&
930
- (!t->cred || 0 == (t->cred->credtype & allowed_types))) {
929
+ if (allowed_types) {
931
930
  int cred_error = 1;
932
931
 
932
+ git_cred_free(t->cred);
933
+ t->cred = NULL;
933
934
  /* Start with the user-supplied credential callback, if present */
934
935
  if (t->owner->cred_acquire_cb) {
935
936
  cred_error = t->owner->cred_acquire_cb(&t->cred, t->owner->url,
@@ -757,7 +757,8 @@ int git_treebuilder_insert(
757
757
  if (!valid_entry_name(bld->repo, filename))
758
758
  return tree_error("Failed to insert entry. Invalid name for a tree entry", filename);
759
759
 
760
- if (!git_object__is_valid(bld->repo, id, otype_from_mode(filemode)))
760
+ if (filemode != GIT_FILEMODE_COMMIT &&
761
+ !git_object__is_valid(bld->repo, id, otype_from_mode(filemode)))
761
762
  return tree_error("Failed to insert entry; invalid object specified", filename);
762
763
 
763
764
  pos = git_strmap_lookup_index(bld->map, filename);
@@ -633,8 +633,11 @@ int xdl_merge(mmfile_t *orig, mmfile_t *mf1, mmfile_t *mf2,
633
633
  result->ptr = NULL;
634
634
  result->size = 0;
635
635
 
636
- if (xdl_do_diff(orig, mf1, xpp, &xe1) < 0 ||
637
- xdl_do_diff(orig, mf2, xpp, &xe2) < 0) {
636
+ if (xdl_do_diff(orig, mf1, xpp, &xe1) < 0) {
637
+ return -1;
638
+ }
639
+ if (xdl_do_diff(orig, mf2, xpp, &xe2) < 0) {
640
+ xdl_free_env(&xe1);
638
641
  return -1;
639
642
  }
640
643
  if (xdl_change_compact(&xe1.xdf1, &xe1.xdf2, xpp->flags) < 0 ||
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rugged
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.0b14
5
- prerelease: 6
4
+ version: 0.24.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Scott Chacon
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-03-02 00:00:00.000000000 Z
13
+ date: 2016-03-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake-compiler
@@ -246,6 +246,7 @@ files:
246
246
  - vendor/libgit2/src/transports/cred.h
247
247
  - vendor/libgit2/src/transports/auth_negotiate.h
248
248
  - vendor/libgit2/src/transports/smart_pkt.c
249
+ - vendor/libgit2/src/transports/ssh.h
249
250
  - vendor/libgit2/src/hash.c
250
251
  - vendor/libgit2/src/socket_stream.c
251
252
  - vendor/libgit2/src/reflog.c
@@ -537,9 +538,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
537
538
  required_rubygems_version: !ruby/object:Gem::Requirement
538
539
  none: false
539
540
  requirements:
540
- - - ! '>'
541
+ - - ! '>='
541
542
  - !ruby/object:Gem::Version
542
- version: 1.3.1
543
+ version: '0'
543
544
  requirements: []
544
545
  rubyforge_project:
545
546
  rubygems_version: 1.8.23